open-mmlab / mmagic

OpenMMLab Multimodal Advanced, Generative, and Intelligent Creation Toolbox. Unlock the magic 🪄: Generative-AI (AIGC), easy-to-use APIs, awsome model zoo, diffusion models, for text-to-image generation, image/video restoration/enhancement, etc.
https://mmagic.readthedocs.io/en/latest/
Apache License 2.0
6.94k stars 1.06k forks source link

TypeError: evaluate() got an unexpected keyword argument 'gpu_collect' #1763

Closed yangTu closed 1 year ago

yangTu commented 1 year ago

File "D:\PyCharmCommunityEdition\pycharmprojects\mmedit-016\tools\train.py", line 171, in main() File "D:\PyCharmCommunityEdition\pycharmprojects\mmedit-016\tools\train.py", line 160, in main train_model( File "D:\PyCharmCommunityEdition\pycharmprojects\mmedit-016\mmedit\apis\train.py", line 106, in train_model _non_dist_train( File "D:\PyCharmCommunityEdition\pycharmprojects\mmedit-016\mmedit\apis\train.py", line 362, in _non_dist_train runner.run(data_loaders, cfg.workflow, cfg.total_iters) File "D:\anaconda3\envs\py38\lib\site-packages\mmcv\runner\iter_based_runner.py", line 144, in run iter_runner(iter_loaders[i], **kwargs) File "D:\anaconda3\envs\py38\lib\site-packages\mmcv\runner\iter_based_runner.py", line 70, in train self.call_hook('after_train_iter') File "D:\anaconda3\envs\py38\lib\site-packages\mmcv\runner\base_runner.py", line 317, in call_hook getattr(hook, fn_name)(self) File "D:\PyCharmCommunityEdition\pycharmprojects\mmedit-016\mmedit\core\evaluation\eval_hooks.py", line 48, in after_train_iter self.evaluate(runner, results) File "D:\PyCharmCommunityEdition\pycharmprojects\mmedit-016\mmedit\core\evaluation\eval_hooks.py", line 57, in evaluate eval_res = self.dataloader.dataset.evaluate( TypeError: evaluate() got an unexpected keyword argument 'gpu_collect'

pytorch cpu版本和gpu版本都报这个错 每次开始能运行 保存暂时得checkpoint后 继续运行就会报错

yangTu commented 1 year ago

后面把 gpu_collect=true 删了就可以继续跑了

Rhhhhhhh commented 4 months ago

能告知一下这个gpu_collect=true在哪里吗,我找了一下代码,单卡的single_gpu_test中都没有加入这个参数,也提示了这个错误,不知道在哪里删除