You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jan 6, 2023. It is now read-only.
(torchx/specs) Remove RunConfig in favor of using Dict[str, CfgVal] directly (#341)
Summary:
Pull Request resolved: pytorch/torchx#341
Pull Request resolved: #163Closes: 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
0 commit comments