Skip to content

Commit

Permalink
🎨Followed mypy
Browse files Browse the repository at this point in the history
  • Loading branch information
carefree0910 committed Jan 3, 2025
1 parent 6423b2a commit c10e923
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions core/learn/callbacks/defaults.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
from torch import Tensor
from typing import Any
from typing import Dict
from typing import List
from typing import Tuple
from typing import Optional

Expand Down Expand Up @@ -65,6 +66,7 @@ def before_summary(self, trainer: ITrainer) -> None:
full_states = torch.load(ckpt, weights_only=False, map_location=device)
states: tensor_dict_type = full_states["states"]
exclude = finetune_config.get("exclude", "")
exclude_names: List[str]
if not exclude:
exclude_names = []
model.load_state_dict(states)
Expand Down

0 comments on commit c10e923

Please sign in to comment.