Skip to content

[torchx/schedulers] Add support for kueue_scheduler #1267

@kiukchung

Description

@kiukchung

Description

Add support for Kueue (basically revives: #822) as a scheduler plugin.

Detailed Proposal

The implementation itself should be pretty straight forward. So will discuss where the plugin should live.

We are moving away from registering plugins via entrypoints to using namespace packages (PEP-420). Essentially we'd create {git_root}/torchx_plugins/schedulers/kueue.py and register the KueueScheduler plugin as:

# in kueue.py

class KueueScheduler(Scheduler...):
  ...

@register_scheduler(name="kueue")
def kueue_scheduler() -> Scheduler:
   return KueueScheduler(...)

See torchx.plugins documentation for details.

Schedulers registered this way are automatically discovered at runtime as long as the wheel that provides torchx_plugins/schedulers/kueue.py is installed in the current python environment.

We need to create a top-level torchx_plugins/* dir and move all the builtin plugins that are currently in torchx/schedulers/*_scheduler.py to torchx_plugins/schedulers/builtins/*_schedulers.py and add torchx_plugins/* to the torchx wheel.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions