def __init__(self, model: TFPreTrainedModel, args: TFTrainingArguments, train_dataset: Optional[tf.data.Dataset]=None, eval_dataset: Optional[tf.data.Dataset]=None, compute_metrics: Optional[Callable[([EvalPrediction], Dict)]]=None, prediction_loss_only=False):
    self.model = model
    self.args = args
    self.train_dataset = train_dataset
    self.eval_dataset = eval_dataset
    self.compute_metrics = compute_metrics
    self.prediction_loss_only = prediction_loss_only
    self.gradient_accumulator = GradientAccumulator()
    self._setup_training()
def __init__(self, model: TFPreTrainedModel, args: TFTrainingArguments, train_dataset: Optional[tf.data.Dataset]=None, eval_dataset: Optional[tf.data.Dataset]=None, compute_metrics: Optional[Callable[([EvalPrediction], Dict)]]=None, prediction_loss_only=False):
    self.model = model
    self.args = args
    self.train_dataset = train_dataset
    self.eval_dataset = eval_dataset
    self.compute_metrics = compute_metrics
    self.prediction_loss_only = prediction_loss_only
    self.gradient_accumulator = GradientAccumulator()
    self._setup_training()