Commit 4639dc0
expose fbrunner itself with context manager
Summary:
Right now, when we `enter` context after `get_fb_runner`, we are using the existing definition in `Runner` which causes type erasure to the super type `Runner`.
While this is fine for most cases, we lose the ability to access the `dryrun` api defined in https://www.internalfb.com/code/fbsource/[587e66c70ce546a78a71b1a22125850d1aff866d]/fbcode/torchx/runner/fb/api.py?lines=103
which has extra parameters.
For orchestration sdk to translate single job definitions as part of its dag correctly, we wish to use FBRunner's implementation of `dryrun`, so we need to be able to access `FBRunner` after entering the context manager.
Here, we add corresponding `enter` and `exit` on the FBRunner to prevent erasing the type.
All implementation still delegates to the existing super functions
Reviewed By: kiukchung
Differential Revision: D726773121 parent ae72fa2 commit 4639dc0
1 file changed
+2
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
| 46 | + | |
46 | 47 | | |
47 | 48 | | |
48 | 49 | | |
| |||
120 | 121 | | |
121 | 122 | | |
122 | 123 | | |
123 | | - | |
| 124 | + | |
124 | 125 | | |
125 | 126 | | |
126 | 127 | | |
| |||
0 commit comments