Skip to content

Commit 7ed4b89

Browse files
bobyangyffacebook-github-bot
authored andcommitted
expose fbrunner itself with context manager (#1069)
Summary: Pull Request resolved: #1069 Reviewed By: lgarg26, kiukchung Differential Revision: D72677312
1 parent 24dc0d5 commit 7ed4b89

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

torchx/runner/api.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@
4343

4444
from torchx.util.types import none_throws
4545
from torchx.workspace.api import PkgInfo, WorkspaceBuilder, WorkspaceMixin
46+
from typing_extensions import Self
4647

4748
from .config import get_config, get_configs
4849

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

123-
def __enter__(self) -> "Runner":
124+
def __enter__(self) -> Self:
124125
return self
125126

126127
def __exit__(

0 commit comments

Comments
 (0)