Skip to content

Commit 4f7107a

Browse files
committed
update ignore
1 parent 523c8dd commit 4f7107a

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/lightning/pytorch/strategies/ddp.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ def _register_ddp_hooks(self) -> None:
228228

229229
def _enable_model_averaging(self) -> None:
230230
log.debug(f"{self.__class__.__name__}: reinitializing optimizers with post localSGD")
231-
if self._model_averaging_period is None:
231+
if self._model_averaging_period is None: # type: ignore[no-untyped-def]
232232
raise ValueError(
233233
"Post-localSGD algorithm is used, but model averaging period is not provided to DDP strategy."
234234
)
@@ -418,7 +418,7 @@ def teardown(self) -> None:
418418

419419
super().teardown()
420420

421-
def _create_stream_context(self, device_ids=None):
421+
def _create_stream_context(self, device_ids=None): # type: ignore[no-untyped-def]
422422
"""Create a stream context for the current device, if supported."""
423423

424424
torch_lib = getattr(torch, self.root_device.type)

src/lightning/pytorch/strategies/deepspeed.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -320,7 +320,7 @@ def __init__(
320320
self.min_loss_scale = min_loss_scale
321321

322322
try:
323-
self.device_type = self.accelerator.get_device_type()
323+
self.device_type = self.accelerator.get_device_type() # type: ignore[union-attr]
324324
except Exception:
325325
self.device_type = "cuda"
326326
self.torch_lib = getattr(torch, self.device_type)

0 commit comments

Comments
 (0)