ailab-prompt-transfer / TextBox

Implement of PTG
https://github.com/RUCAIBox/TextBox
MIT License
0 stars 0 forks source link

'GradientState' object has no attribute '_set_end_of_dataloader' #10

Closed minji-o-j closed 1 year ago

minji-o-j commented 1 year ago

24 Jul 06:04 ERROR Traceback (most recent call last): File "/workspace/TextBox/textbox/utils/dashboard.py", line 316, in new_experiment yield True File "/workspace/TextBox/textbox/quick_start/experiment.py", line 127, in run self._do_train_and_valid() File "/workspace/TextBox/textbox/quick_start/experiment.py", line 105, in _do_train_and_valid self.valid_result = self.trainer.fit(train_data, valid_data) File "/workspace/TextBox/textbox/trainer/trainer.py", line 427, in fit loss = self._train_epoch(train_data, epoch_idx, valid_data)["loss"] File "/workspace/TextBox/textbox/trainer/trainer.py", line 223, in _train_epoch self.accelerator.gradient_state._set_end_of_dataloader(False) AttributeError: 'GradientState' object has no attribute '_set_end_of_dataloader'

minji-o-j commented 1 year ago

update되면서 사라짐

  if valid_data:
      self.stopped |= self._valid(valid_data, "step")
      self.accelerator.gradient_state._set_end_of_dataloader(False) #error
  if valid_data:
      self.stopped |= self._valid(valid_data, "step")
      # self.accelerator.gradient_state._set_end_of_dataloader(False)