keypoint-detection icon indicating copy to clipboard operation
keypoint-detection copied to clipboard

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

Open jarnebogaert opened this issue 2 years ago • 2 comments

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 avatar Mar 18 '23 20:03 jarnebogaert

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

jarnebogaert avatar Mar 18 '23 21:03 jarnebogaert

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

tlpss avatar Mar 19 '23 17:03 tlpss