dendorferpatrick / GoalGAN

MIT License
46 stars 14 forks source link

The error in pretrain.py #7

Open WangHonghui123 opened 1 year ago

WangHonghui123 commented 1 year ago

Thank you for your nice work. When I run your code, I find that there is an error, shown as:

preTrainer = Trainer(logger, callbacks = callbacks, checkpoint_callback=False, num_sanity_val_steps=0, progress_bar_refresh_rate=10, cfg.trainer)

The error information is shown as follows:

Traceback (most recent call last): File "/Users/wanghonghui/PycharmProjects/Trajectory_Prediction/venv/lib/python3.8/site-packages/hydra/_internal/utils.py", line 394, in _run_hydra _run_app( File "/Users/wanghonghui/PycharmProjects/Trajectory_Prediction/venv/lib/python3.8/site-packages/hydra/_internal/utils.py", line 457, in _run_app run_and_report( File "/Users/wanghonghui/PycharmProjects/Trajectory_Prediction/venv/lib/python3.8/site-packages/hydra/_internal/utils.py", line 223, in run_and_report raise ex File "/Users/wanghonghui/PycharmProjects/Trajectory_Prediction/venv/lib/python3.8/site-packages/hydra/_internal/utils.py", line 220, in run_and_report return func() File "/Users/wanghonghui/PycharmProjects/Trajectory_Prediction/venv/lib/python3.8/site-packages/hydra/_internal/utils.py", line 458, in lambda: hydra.run( File "/Users/wanghonghui/PycharmProjects/Trajectory_Prediction/venv/lib/python3.8/site-packages/hydra/internal/hydra.py", line 132, in run = ret.return_value File "/Users/wanghonghui/PycharmProjects/Trajectory_Prediction/venv/lib/python3.8/site-packages/hydra/core/utils.py", line 260, in return_value raise self._return_value File "/Users/wanghonghui/PycharmProjects/Trajectory_Prediction/venv/lib/python3.8/site-packages/hydra/core/utils.py", line 186, in run_job ret.return_value = task_function(task_cfg) File "/Users/wanghonghui/PycharmProjects/Trajectory_Prediction/GoalGAN-master/run.py", line 50, in run pretrain_func(generator=model.generator, File "/Users/wanghonghui/PycharmProjects/Trajectory_Prediction/GoalGAN-master/model/pretrain_pl.py", line 26, in pretrain_func preTrainer = Trainer(logger, File "/Users/wanghonghui/PycharmProjects/Trajectory_Prediction/venv/lib/python3.8/site-packages/pytorch_lightning/utilities/argparse.py", line 69, in insert_env_defaults return fn(self, **kwargs) TypeError: init() got an unexpected keyword argument 'checkpoint_callback' python-BaseException

I would like to know if you can fix it. Thank you for your help.

dendorferpatrick commented 1 year ago

Hi, I have not yet encountered this problem. Can you check, if you are using the supported torch version torch==1.6.0.