tlpss / keypoint-detection

2D keypoint detection with Pytorch Lightning and wandb
MIT License
70 stars 9 forks source link

Training error: type object 'Trainer' has no attribute 'add_argparse_args' #22

Open jarnebogaert opened 1 year ago

jarnebogaert commented 1 year ago

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.

jarnebogaert commented 1 year ago

Tested with pytorch-lightning==1.9.0 instead of pytorch-lightning==2.0.0 and the error disappeared.

tlpss commented 1 year ago

@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).