File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed
src/lightning/pytorch/strategies Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff 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 )
Original file line number Diff line number Diff 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 )
You can’t perform that action at this time.
0 commit comments