-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
Skepticleo trainer argparser #1023
Conversation
…r from default args
…rch-lightning into trainerArgparser # Conflicts: # pytorch_lightning/trainer/trainer.py
…rchLightning/pytorch-lightning into skepticleo-trainerArgparser
pytorch_lightning/trainer/trainer.py
Outdated
return parser | ||
|
||
@classmethod | ||
def from_argparse_args(cls, args) -> Trainer: |
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.
def from_argparse_args(cls, args) -> Trainer: | |
def from_argparse_args(cls, args: Namespace) -> Trainer: |
Co-Authored-By: Jirka Borovec <Borda@users.noreply.github.com>
Co-Authored-By: Jirka Borovec <Borda@users.noreply.github.com>
Co-Authored-By: Jirka Borovec <Borda@users.noreply.github.com>
@Borda how do we change the author to the original one? |
|
||
@classmethod | ||
def from_argparse_args(cls, args): | ||
|
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.
shouldn't there be documentation where the blank line is? did it get lost?
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.
yeah it should...
* Added default parser for trainer and class method to construct trainer from default args * Removed print statement * Added test for constructing Trainer from command line args * Removed extra line * Removed redundant imports, removed whitespace from empty lines * Fixed typo * Updated default parser creation to get class attributes automatically * Updated default parser creation to get class attributes automatically * Added method to get default args for trainer * Trimmed trainer get default args method * Updated from argparse method to not return trainer with static arguments * Update trainer get default args to classmethod * adjustment * fix * Fixed variable name * Update trainer.py * Update test_trainer.py * Update trainer.py * Update tests/trainer/test_trainer.py Co-Authored-By: Jirka Borovec <Borda@users.noreply.github.com> * Update trainer.py * Update test_trainer.py * Update trainer.py * Update test_trainer.py * Update tests/trainer/test_trainer.py Co-Authored-By: Jirka Borovec <Borda@users.noreply.github.com> * Update pytorch_lightning/trainer/trainer.py Co-Authored-By: Jirka Borovec <Borda@users.noreply.github.com> * Update trainer.py * Update test_trainer.py Co-authored-by: Mudit Tanwani <mudittanwani@gmail.com> Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com>
Before submitting
What does this PR do?
Duplicate to #952
PR review
Anyone in the community is free to review the PR once the tests have passed.
If we didn't discuss your PR in Github issues there's a high chance it will not be merged.
Did you have fun?
Make sure you had fun coding 🙃