Skip to content

Commit eec1734

Browse files
committed
fixing
1 parent 8f64465 commit eec1734

File tree

3 files changed

+3
-4
lines changed

3 files changed

+3
-4
lines changed

src/lightning/fabric/fabric.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -367,8 +367,7 @@ def setup_dataloaders(
367367
)
368368
for dataloader in dataloaders
369369
]
370-
dataloaders = dataloaders[0] if len(dataloaders) == 1 else dataloaders
371-
return dataloaders # type: ignore[return-value]
370+
return dataloaders[0] if len(dataloaders) == 1 else dataloaders
372371

373372
def _setup_dataloader(
374373
self, dataloader: DataLoader, use_distributed_sampler: bool = True, move_to_device: bool = True

src/lightning/pytorch/callbacks/lr_monitor.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,7 @@ def _remap_keys(self, names: list[list[str]], token: str = "/pg1") -> None:
251251
elif new_name not in self.lrs:
252252
self.lrs[new_name] = []
253253

254-
def _extract_momentum(self, param_group: dict[str, list], name: str, use_betas: bool) -> dict[str, float]:
254+
def _extract_momentum(self, param_group: dict[str, list[float]], name: str, use_betas: bool) -> dict[str, float]:
255255
if not self.log_momentum:
256256
return {}
257257

src/lightning/pytorch/core/saving.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ def _load_state(
184184
obj.on_load_checkpoint(checkpoint)
185185

186186
# load the state_dict on the model automatically
187-
keys = obj.load_state_dict(checkpoint["state_dict"], strict=strict)
187+
keys = obj.load_state_dict(checkpoint["state_dict"], strict=strict) # type: ignore[arg-type]
188188

189189
if not strict:
190190
if keys.missing_keys:

0 commit comments

Comments
 (0)