Skip to content

Commit 3064416

Browse files
committed
ignore return type
1 parent 32d6f81 commit 3064416

File tree

1 file changed

+3
-3
lines changed
  • src/lightning/fabric/strategies

1 file changed

+3
-3
lines changed

src/lightning/fabric/strategies/fsdp.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -795,7 +795,7 @@ def _optimizer_has_flat_params(optimizer: Optimizer) -> bool:
795795
)
796796

797797

798-
def _get_sharded_state_dict_context(module: Module) -> Generator[None, None, None]:
798+
def _get_sharded_state_dict_context(module: Module) -> Generator:
799799
from torch.distributed.fsdp import FullyShardedDataParallel as FSDP
800800
from torch.distributed.fsdp.api import ShardedOptimStateDictConfig, ShardedStateDictConfig, StateDictType
801801

@@ -806,7 +806,7 @@ def _get_sharded_state_dict_context(module: Module) -> Generator[None, None, Non
806806
state_dict_type=StateDictType.SHARDED_STATE_DICT,
807807
state_dict_config=state_dict_config,
808808
optim_state_dict_config=optim_state_dict_config,
809-
)
809+
) # type: ignore[return-value]
810810

811811

812812
def _get_full_state_dict_context(
@@ -823,7 +823,7 @@ def _get_full_state_dict_context(
823823
state_dict_type=StateDictType.FULL_STATE_DICT,
824824
state_dict_config=state_dict_config,
825825
optim_state_dict_config=optim_state_dict_config,
826-
)
826+
) # type: ignore[return-value]
827827

828828

829829
def _is_sharded_checkpoint(path: Path) -> bool:

0 commit comments

Comments
 (0)