Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AttributeError: type object 'Trainer' has no attribute 'from_argparse_args' #89

Closed
beppe2hd opened this issue Mar 27, 2023 · 3 comments
Closed
Labels

Comments

@beppe2hd
Copy link

Hi, I'm working on the PyTorch implementation of T-GCN.

Unfortunately the code fails in line

trainer = pl.Trainer.from_argparse_args(args, callbacks=callbacks)

with the returned error:

AttributeError: type object 'Trainer' has no attribute 'from_argparse_args'

I'm currently working with pytorch_lightning 2.0.0

Unfortunately, losing around the documentation of pytorch_lightning I neither found any reference to the from_argparse_args method

Can someone suggest what I'm doing wrong?

@martinwhl
Copy link
Contributor

pl.Trainer.from_argparse_args() method is deprecated in PL 2.x. Please consider downgrading your Lightning to 1.x (x >= 6) to run the current code, or switching to LightningCLI to solve this issue while using the latest version of Lightning.

@github-actions
Copy link

github-actions bot commented Apr 4, 2023

This issue is stale because it has been open 7 days with no activity. Remove stale label or comment or this will be closed in 3 days.

@github-actions github-actions bot added the Stale label Apr 4, 2023
@beppe2hd
Copy link
Author

beppe2hd commented Apr 4, 2023

pl.Trainer.from_argparse_args() method is deprecated in PL 2.x. Please consider downgrading your Lightning to 1.x (x >= 6) to run the current code, or switching to LightningCLI to solve this issue while using the latest version of Lightning.

Thanks. It worked perfectly

@beppe2hd beppe2hd closed this as completed Apr 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants