Skip to content

Add new worker specs in groups #2999

Description

@mrocklin

Currently a subclass of SpecCluster can generate new workers for the spec with SpecCluster.new_worker_spec, which returns a name and a worker configuration. This is typically called by scale.

while len(cluster.worker_spec) < target_workers:
    name, spec = cluster.new_worker_spec()
    cluster.worker_spec[name] = spec

However, in both HPC and GPU cases we want/need to create workers in groups. For this reason it might be nice to change the API here to return a dictionary of new workers

while len(cluster.worker_spec) < target_workers:
    d = cluster.new_worker_spec()
    cluster.worker_spec.update(d)

See dask/dask-jobqueue#307 (comment) for motivation. This also comes up with GPU work, where we want to add a new node and have one worker per GPU on that node.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions