Skip to content

[torchx/specs + runner] few improvements to runner API and component fn handling #368

@kiukchung

Description

@kiukchung

[WIP] Description and Motivation and Detailed Proposal

NOTE: I'm updating this as I'm looking at the code, will remove the "[WIP]" prefix when I'm done.

Here are a few suggested improvements to the runner API and component function handling

  • Add workspace to the default Runner API as well.
    - Motivation: dryrun_component and run_component APIs in Runner vs WorkspaceRunner have different method signatures but same method name. WorkspaceRunner is a subclass of Runner.
  • Create a new module for handling component function evaluations
    - Motivation: currently this code is in torchx/specs/api.py which is more of a dataclass module than a functional module.
  • Create a DAO-like object to represent .torchxconfig -> Load the configs once in code and pass the TorchXConfig object around.
    - Motivation: historically we only loaded scheduler cfg values from .torchxconfig, but there has been asks to allow users to specify more defaults (e.g. component function arguments) from .torchxconfig. Config loading is currently done ad-hoc via methods specific to loading scheduler configs in the torchx.runner.config module, but as we add other types of configs beyond scheduler cfg, its worth loading the config as a proper config object that can be passed around the APIs.

Alternatives

N/A

Additional context/links

Links will be provided inline in the first section.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions