Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

Use LSF blaunch command in LSFJob to start the workers in a multitask job

未关闭
#672 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
35/100
Issue 类型
功能
描述清晰度
基本清楚
活跃度
停滞
技术栈
python

调研方向

从 LSFJob 构造函数和 LSFCluster 的 job_cls 入口点开始,然后比较当前的 distributed.cli.dask_worker 命令与提议的 blaunch 调用。完成的标准是:多任务 LSF 作业可以在请求的主机之间为每个任务启动一个 worker,而不需要 span[hosts=1],并且该行为已由相关的 LSF 作业测试覆盖(如果有)。

由索引模型根据 Issue 内容生成。

描述

Hello, I am using Dask with IBM LSF cluster, I noted that the current LSF Cluster implementation does not give the ability to start an LSF job on multiple hosts, which can be achieved by using the LSF blaunch command.

Modification proposal

The current way of starting multiple workers on one job that has multiple tasks (-n bsub option) is by setting the --nworkers option of distributed.cli.dask_worker to the number of tasks. Could it be a better option to use instead the blaunch command provided by LSF to run a command on each requested task ? In this way the workers will be dispatched on the different hosts provided by LSF and the span[hosts=1] will not be required anymore.

Here a test code I made by subclassing LSFJob class to try using blaunch.

class CustomLSFJob(LSFJob):

    def __init__(self, scheduler=None, name=None, **kwargs):
        super().__init__(scheduler=scheduler, name=name, **kwargs)

        self._command_template = (
            f"blaunch '/path/to/python -m distributed.cli.dask_worker {self.scheduler} --name {name}-$LSF_PM_TASKID --nthreads 1 --memory-limit 1.86GiB --nworkers 1 --nanny --death-timeout 60'"
        )

        self.job_header = self.job_header.replace(
            '#BSUB -R "span[hosts=1]"',
            '#BSUB -R "span[hosts=-1]"',
        )


class CustomLSFCluster(LSFCluster):
    job_cls = CustomLSFJob

This code is not usable as is, but I think the changes will only be limited to the constructor of the LSFJob class.

Is this an interesting idea ?

主要语言
Python
星标
256
派生
148
PR 合并指标
30 天内没有已合并 PR

环境准备

  • 没有 Dockerfile 或 Docker Compose 文件
  • 没有 Pull Request 模板
  • 阅读贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

dask/dask-jobqueue 的其他 Issue

查看 dask/dask-jobqueue 的全部 Issue

相似的 Issue

更多 Python Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。