quentin-burthier / DCA

PyTorch implementation of Deep Communicating Agents for Abstractive Summarization
MIT License
8 stars 2 forks source link

code error due to the ungrade of pytorch-lightning #3

Closed zide05 closed 4 years ago

zide05 commented 4 years ago
  1. got : TypeError: init() got an unexpected keyword argument 'experiment' when running the code. after change the trainer_params["experiment"] = Experiment(save_dir=xp_path, name=xp_name, debug=debug) to trainer_params["logger"] = TestTubeLogger(save_dir=xp_path, name=xp_name, debug=debug) this problem solved.

  2. beside 1, i got: Traceback (most recent call last): File "teacher_forcing.py", line 140, in teacher_forcing_training(args) File "teacher_forcing.py", line 130, in teacher_forcing_training trainer.fit(summarizer_module) File "/remote-home/yrchen/anaconda3/envs/pytorch1.2_p37/lib/python3.7/site-packages/pytorch_lightning/trainer/trainer.py", line 754, in fit self.single_gpu_train(model) File "/remote-home/yrchen/anaconda3/envs/pytorch1.2_p37/lib/python3.7/site-packages/pytorch_lightning/trainer/trainer.py", line 802, in single_gpu_train self.run_pretrain_routine(model) File "/remote-home/yrchen/anaconda3/envs/pytorch1.2_p37/lib/python3.7/site-packages/pytorch_lightning/trainer/trainer.py", line 1009, in run_pretrain_routine self.__layout_bookeeping() File "/remote-home/yrchen/anaconda3/envs/pytorch1.2_p37/lib/python3.7/site-packages/pytorch_lightning/trainer/trainer.py", line 512, in __layout_bookeeping self.nb_training_batches = len(self.get_train_dataloader()) File "/remote-home/yrchen/anaconda3/envs/pytorch1.2_p37/lib/python3.7/site-packages/pytorch_lightning/root_module/decorators.py", line 18, in _get_data_loader value = fn(self) # Lazy evaluation, done only once. File "/remote-home/yrchen/anaconda3/envs/pytorch1.2_p37/lib/python3.7/site-packages/pytorch_lightning/root_module/root_module.py", line 119, in train_dataloader raise NotImplementedError NotImplementedError

zide05 commented 4 years ago

not implementederror is solved by changing name tng_dataloader to train_dataloader in SummarizerModule