Training error: type object 'Trainer' has no attribute 'add_argparse_args'
When running the command bash test/integration_test.sh or the command python keypoint_detector/train/train.py I get the error message AttributeError: type object 'Trainer' has no attribute 'add_argparse_args'.
Error message:
Traceback (most recent call last): File "/home/jarnboga/keypoint-detection/keypoint_detection/train/train.py", line 88, in <module> parser = Trainer.add_argparse_args(parser) AttributeError: type object 'Trainer' has no attribute 'add_argparse_args'
I encountered this issue which reported the same error.
Tested with pytorch-lightning==1.9.0 instead of pytorch-lightning==2.0.0 and the error disappeared.
@jarnebogaert, pytorch 2.0 and PL 2.0 have some breaking changes, most prominently the CLI for PL as you have encountered. I'll lock the version of PL to 1.9 untill I have found some time to rethink the CLI of the keypoint detector.
Thanks for reporting (@lucasvandijck also mentioned it already).