def on_trainer_init(self, max_epochs: Optional[int], min_epochs: Optional[int], max_steps: Optional[int], min_steps: Optional[int], num_sanity_val_steps: int) -> None:
    self.trainer.global_step = 0
    self.trainer.current_epoch = 0
    self.trainer.should_stop = False
    self.trainer.state = TrainerState()
    self.trainer.total_batch_idx = 0
    self.trainer.batch_idx = 0
    self.trainer.num_training_batches = 0
    self.trainer.train_dataloader = None
    self.trainer.max_epochs = (1000 if ((max_epochs is None) and (max_steps is None)) else max_epochs)
    self.trainer.min_epochs = (1 if ((min_epochs is None) and (min_steps is None)) else min_epochs)
    self.trainer.max_steps = max_steps
    self.trainer.min_steps = min_steps
    if (num_sanity_val_steps == (- 1)):
        self.trainer.num_sanity_val_steps = float('inf')
    else:
        self.trainer.num_sanity_val_steps = num_sanity_val_steps
def on_trainer_init(self, max_epochs: Optional[int], min_epochs: Optional[int], max_steps: Optional[int], min_steps: Optional[int], num_sanity_val_steps: int) -> None:
    self.trainer.global_step = 0
    self.trainer.current_epoch = 0
    self.trainer.should_stop = False
    self.trainer.state = TrainerState()
    self.trainer.total_batch_idx = 0
    self.trainer.batch_idx = 0
    self.trainer.num_training_batches = 0
    self.trainer.train_dataloader = None
    self.trainer.max_epochs = (1000 if ((max_epochs is None) and (max_steps is None)) else max_epochs)
    self.trainer.min_epochs = (1 if ((min_epochs is None) and (min_steps is None)) else min_epochs)
    self.trainer.max_steps = max_steps
    self.trainer.min_steps = min_steps
    if (num_sanity_val_steps == (- 1)):
        self.trainer.num_sanity_val_steps = float('inf')
    else:
        self.trainer.num_sanity_val_steps = num_sanity_val_steps