Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions swift/trainers/mixin.py
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ def _push_from_checkpoint(self, checkpoint_folder: str) -> None:
class SwiftMixin:

def __init__(self, *args, **kwargs) -> None:
check_model = kwargs.get('check_model', True)
check_model = kwargs.pop('check_model', True)
model = kwargs['model']
if check_model and hasattr(model, 'model_dir'):
check_local_model_is_latest(
Expand All @@ -252,7 +252,7 @@ def __init__(self, *args, **kwargs) -> None:
Invoke.KEY:
Invoke.LOCAL_TRAINER,
Invoke.THIRD_PARTY:
kwargs.get(Invoke.THIRD_PARTY, Invoke.SWIFT),
kwargs.pop(Invoke.THIRD_PARTY, Invoke.SWIFT),
})

# Compatible with transformers>=4.34
Expand Down