Files
wehub-resource-sync a203934033
Lint test / lint (push) Has been cancelled
chore: import upstream snapshot with attribution
2026-07-13 13:34:58 +08:00

14 lines
406 B
Python

# Copyright (c) ModelScope Contributors. All rights reserved.
from transformers import TrainerCallback as HfTrainerCallback
from typing import TYPE_CHECKING
if TYPE_CHECKING:
from swift.trainers import Trainer, TrainingArguments
class TrainerCallback(HfTrainerCallback):
def __init__(self, args: 'TrainingArguments', trainer: 'Trainer'):
self.args = args
self.trainer = trainer