Commit 060345f
committed
Silence pyright Optional-access on async_op=True wait() calls
PyTorch's distributed stubs type dist.barrier/all_reduce/broadcast as
returning Work | None because the sync path (async_op=False) returns
None. Pyright cannot narrow the return when async_op=True is a literal
kwarg, so every .wait(...) on the async handle flags
reportOptionalMemberAccess. Add the same # type: ignore the rest of
the codebase uses at three sites: _barrier_with_timeout, the eval-loss
broadcast, and check_nccl_health.1 parent 442223f commit 060345f
3 files changed
Lines changed: 3 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
107 | 107 | | |
108 | 108 | | |
109 | 109 | | |
110 | | - | |
| 110 | + | |
111 | 111 | | |
112 | 112 | | |
113 | 113 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
235 | 235 | | |
236 | 236 | | |
237 | 237 | | |
238 | | - | |
| 238 | + | |
239 | 239 | | |
240 | 240 | | |
241 | 241 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
93 | 93 | | |
94 | 94 | | |
95 | 95 | | |
96 | | - | |
| 96 | + | |
97 | 97 | | |
98 | 98 | | |
99 | 99 | | |
| |||
0 commit comments