Closed pariskang closed 1 year ago
Sorry, we are fixing on it.
Hello, could I know your version of lightning in your environment?
I had the same "AttributeError: type object 'Trainer' has no attribute 'add_argparse_args'" error with the lastest version of lightning==2.0.0rc1 (Release on Mar 2, 2023), but I tried with lightning==1.9.0 which is the same as https://github.com/hpcaitech/ColossalAI/blob/main/examples/images/diffusion/requirements.txt, the above bug disappeared.
Hi, same issue here, using stable version of pytorch lighnining=2.0, just installed from conda
I have same issue. my version is 2.0.0
Same issue, version is 2.02
Same issue! version is 2.0.3
I installed pip install pytorch-lightning==1.06 and it WORKED!!
same issue
same issue wiht pl 2.0.8:
AttributeError: type object 'Trainer' has no attribute 'from_argparse_args'
Same error on pl_version:
'2.0.2'
Same here. Pl 2.2.1
I found this problem solved with pytorch_lightning==1.6.3
same error with the pytorch_lightining == 2.2.4
same with 2.1.0
Same issue 2.3.3
According to the doc support for Trainer.add_argparse_args
has been dropped. There are new ways of managing args now.
Source: https://github.com/Lightning-AI/pytorch-lightning/issues/19905#issuecomment-2153201978
same issue 2.4.0
Same issue with pytorch-lightning 2.4.0
🐛 Describe the bug
Description:
When I running the command "python main.py --logdir /tmp/ -t -b configs/Teyvat/train_colossalai_teyvat.yaml" to rekoad the diffusion model, I encountered the following error:
AttributeError: type object 'Trainer' has no attribute 'add_argparse_args' Steps to Reproduce:
Clone the repository. Run the command "python main.py --logdir /tmp/ -t -b configs/Teyvat/train_colossalai_teyvat.yaml". Expected Behavior:
The command should run without any errors.
Actual Behavior:
╭─────────────────────────────── Traceback (most recent call last) ────────────────────────────────╮ │ /root/ColossalAI/examples/images/diffusion/main.py:535 in │
│ │
│ 532 │ sys.path.append(os.getcwd()) │
│ 533 │ │
│ 534 │ parser = get_parser() │
│ ❱ 535 │ parser = Trainer.add_argparse_args(parser) │
│ 536 │ │
│ 537 │ opt, unknown = parser.parse_known_args() │
│ 538 │ if opt.name and opt.resume: │
╰──────────────────────────────────────────────────────────────────────────────────────────────────╯
AttributeError: type object 'Trainer' has no attribute 'add_argparse_args'
Additional Context:
The error message suggests that there is a problem with the "Trainer" object and its "add_argparse_args" attribute. Can u help me to resolve it. Thank u.
Environment
No response