Skip to content
This repository was archived by the owner on Jan 6, 2023. It is now read-only.

Commit efc4f71

Browse files
Kiuk Chungfacebook-github-bot
Kiuk Chung
authored andcommitted
(torchx/specs) Remove RunConfig in favor of using Dict[str, CfgVal] directly (#341)
Summary: Pull Request resolved: pytorch/torchx#341 Pull Request resolved: #163 Closes: pytorch/torchx#302 `RunConfig` was a redundant wrapper around a python `Dict[str, CfgVal]`. This diff simply removes the unnecessary `RunConfig` class in favor of using `Dict[str, CfgVal]` directly. Makes client-side code much nicer since: ``` # BEFORE cfg = specs.RunConfig() cfg.set("key0", "val") cfg.set("key1", "val") ... # AFTER cfg = {"key0": "val", "key1": "val"} ``` Note that certain APIs are typed as `Mapping[str, CfgVal]` to deal with contravariance for container types in pyre. Reviewed By: d4l3k Differential Revision: D32400298 fbshipit-source-id: 5cb9387d28541a39ad2b9bbdb7232196ce8ce82e
1 parent 0293cea commit efc4f71

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

torchelastic/tsm/driver/__init__.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -70,9 +70,9 @@
7070
from torchx.schedulers import get_schedulers
7171
from torchx.schedulers.api import DescribeAppResponse, Scheduler # noqa: F401 F403
7272
from torchx.specs.api import ( # noqa: F401 F403
73+
AppDef as Application,
7374
AppDryRunInfo,
7475
AppHandle,
75-
AppDef as Application,
7676
AppState,
7777
AppStatus,
7878
ReplicaState,
@@ -81,7 +81,6 @@
8181
RetryPolicy,
8282
Role,
8383
RoleStatus,
84-
RunConfig,
8584
SchedulerBackend,
8685
is_terminal,
8786
macros,

0 commit comments

Comments
 (0)