-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Remove argparse utils #16708
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
Remove argparse utils #16708
Conversation
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
⚡ Required checks status: All passing 🟢Groups summary🟢 pytorch_lightning: Tests workflow
These checks are required after the changes to 🟢 pytorch_lightning: Azure GPU
These checks are required after the changes to 🟢 pytorch_lightning: Azure HPU
These checks are required after the changes to 🟢 pytorch_lightning: Azure IPU
These checks are required after the changes to 🟢 pytorch_lightning: Docs
These checks are required after the changes to 🟢 mypy
These checks are required after the changes to 🟢 installThese checks are required after the changes to 🟢 link-check
These checks are required after the changes to Thank you for your contribution! 💜
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
What does this PR do?
The argparse utilities, namely
Trainer.add_argparse_args
andTrainer.parse_argparse_args
, were introduced early on in Lighting at a time when the Trainer had a relatively simple argument structure. Over time, the variety of types and combinations thereof has grown, leading to a more complex and fragile parsing logic of default values and types, e.g.,https://github.com/Lightning-AI/lightning/blob/5340d960b9427dcfe5fb953cac0e86763d423546/src/lightning/pytorch/utilities/argparse.py#L143-L155
https://github.com/Lightning-AI/lightning/blob/5340d960b9427dcfe5fb953cac0e86763d423546/src/lightning/pytorch/utilities/argparse.py#L240-L265
We are removing this logic now in a breaking change for Lightning 2.0. The reasons being:
Before submitting
PR review
Anyone in the community is free to review the PR once the tests have passed.
Before you start reviewing make sure you have read Review guidelines. In short, see the following bullet-list:
Did you have fun?
I made sure I had fun coding 🙃
cc @Borda @justusschock