Commit 381edd8
expose runner itself with context manager (meta-pytorch#1069)
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 apis in sub classes.
Here, we expose the self type instead to prevent erasing types
Reviewed By: kiukchung
Differential Revision: D72677312
Pulled By: bobyangyf1 parent 2124818 commit 381edd8
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