Skip to content

expose runner itself with context manager #1069

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion torchx/runner/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@

from torchx.util.types import none_throws
from torchx.workspace.api import PkgInfo, WorkspaceBuilder, WorkspaceMixin
from typing_extensions import Self

from .config import get_config, get_configs

Expand Down Expand Up @@ -120,7 +121,7 @@ def _get_scheduler_params_from_env(self) -> Dict[str, str]:
scheduler_params[lower_case_key.strip("torchx_")] = value
return scheduler_params

def __enter__(self) -> "Runner":
def __enter__(self) -> Self:
return self

def __exit__(
Expand Down
Loading