-
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
Parse help in DataModule.add_argparse_args #5851
Parse help in DataModule.add_argparse_args #5851
Conversation
* Add colab badges to notebook Add colab badges to notebook to notebooks 4 & 5 * Add colab badges Co-authored-by: chaton <thomas@grid.ai>
* Prune CHANGELOG.md * Update CHANGELOG.md Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com> * Update CHANGELOG.md Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com> * Update CHANGELOG.md Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com> * Update CHANGELOG.md Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com> * Update CHANGELOG.md Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com> Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com>
…-AI#4861) * disable version if not required * disable version if not required * pep * chlog * improve test * improve test * parametrize test and update del_list * Update pytorch_lightning/callbacks/model_checkpoint.py Co-authored-by: Carlos Mocholí <carlossmocholi@gmail.com> * try appending version to already saved ckpt_file * Revert "try appending version to already saved ckpt_file" This reverts commit 710e05e. * add more assertions * use BoringModel Co-authored-by: Carlos Mocholí <carlossmocholi@gmail.com> Co-authored-by: chaton <thomas@grid.ai> Co-authored-by: Roger Shieh <sh.rog@protonmail.ch>
* Update isort config * Apply isort with new config * Fix typo in isort config * fix rebase Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com>
* Fix reset TensorRunningAccum * add test for TensorRunningAccum's reset method * fix CI failed due to PEP8 Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com>
* Fix hang in DDP HPC accelerators init_device was never called * Update CHANGELOG.md
* support number * add two tests * wip * add ddp in special test * remove a test * move device to bottom * simplify test * update test * Update pytorch_lightning/core/step_result.py Co-authored-by: Carlos Mocholí <carlossmocholi@gmail.com> * resolve sync_ddp Co-authored-by: Carlos Mocholí <carlossmocholi@gmail.com>
* resolve bug * clean code * resolve comments * Update tests/trainer/optimization/test_multiple_optimizers.py Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * resolve another bug * add comments * use abs to find diff * update * resolve flake8 Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com>
* remove nan loss whe missing * Update pytorch_lightning/core/lightning.py Co-authored-by: Carlos Mocholí <carlossmocholi@gmail.com> * Apply suggestions from code review Co-authored-by: Carlos Mocholí <carlossmocholi@gmail.com> Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com>
* add test * resolve bug * udpate test * wrongly copy / paste * update test * resolve a second bug Co-authored-by: Ubuntu <ubuntu@ip-172-31-62-109.ec2.internal>
* Disable pl optimizer temporarily to fix AMP issues * Add todo and enable pl optimizer in the test
* drop install FairScale for TPU * typo Co-authored-by: Roger Shieh <sh.rog@protonmail.ch>
* draft * wip * CI * drop pl geometry * copy * logo
* define tests * fix basic * fix gans * unet * test * drop * format * fix * revert Co-authored-by: Justus Schock <12886177+justusschock@users.noreply.github.com> Co-authored-by: Justus Schock <12886177+justusschock@users.noreply.github.com>
* docs * script * dump * desc * import * import * if * norm * t * finished * isort * typing Co-authored-by: Nicki Skafte <skaftenicki@gmail.com> * xlabel * pandas * time Co-authored-by: Nicki Skafte <skaftenicki@gmail.com>
* update CHANGELOG.md, increment for RC * Add missing changelog update * Added a few more * Move to added * Address code review * Missing space * Remove unreleased * Remove lines * Update CHANGELOG.md Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com>
Fixed a small bug with the `WandbLogger` docs. Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com> Co-authored-by: Roger Shieh <sh.rog@protonmail.ch>
…tning-AI#4925) * update DALIClassificationLoader to not use deprecated arguments * fix line length * dali version check added and changed args accordingly * versions * checking version using disutils.version.LooseVersion now * . * ver * import Co-authored-by: Jirka Borovec <jirka.borovec@seznam.cz> Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com>
* Fix deprecation call * fix Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com>
Co-authored-by: Gregor Koporec <gregork@unicorn.gorenje.com> Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com> Co-authored-by: Sean Naren <sean.narenthiran@gmail.com>
* feat(wandb): offset logging step when resuming * feat(wandb): output warnings * fix(wandb): allow step to be None * test(wandb): update tests * feat(wandb): display warning only once * style: fix PEP issues * tests(wandb): fix tests * tests(wandb): improve test * style: fix whitespace * feat: improve warning Co-authored-by: Adrian Wälchli <aedu.waelchli@gmail.com> * feat(wandb): use variable from class instance Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com> * tests(wandb): check warnings * feat(wandb): use WarningCache * tests(wandb): fix tests * style: fix formatting Co-authored-by: Adrian Wälchli <aedu.waelchli@gmail.com> Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com>
* reduce verbosity level in drone * verbosity
* Remove Sourcerer * trigger Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com>
…5186) * skip test * Apply suggestions from code review Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> Co-authored-by: Nicki Skafte <skaftenicki@gmail.com>
* add contrib questions * Apply suggestions from code review Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Apply suggestions from code review Co-authored-by: ananthsub <ananth.subramaniam@gmail.com> Co-authored-by: Roger Shieh <sh.rog@protonmail.ch> Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> Co-authored-by: ananthsub <ananth.subramaniam@gmail.com> Co-authored-by: Roger Shieh <sh.rog@protonmail.ch>
…g-AI#5698) * Fix mypy when prepending $PYTHONPATH to sys.path * attempt mypy fix * Revert "attempt mypy fix" This reverts commit fb7ed82. * fix mypy Co-authored-by: Jirka Borovec <jirka.borovec@seznam.cz>
* Fix docs * typo * import * Apply suggestions from code review Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com> Co-authored-by: chaton <thomas@grid.ai> Co-authored-by: Jirka Borovec <jirka.borovec@seznam.cz> Co-authored-by: edenlightning <66261195+edenlightning@users.noreply.github.com> Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
* started to write failing test. just getting into the framework... * started to write failing test. just getting into the framework... * added failing test for misconfiguration of lr finder * made test startup quickly. making sure without the fix it also fails slowly * improved test * fixed for linter * fixed for linter * yet another fix for the linter * yet another fix for the linter * fixed comment by @carmocca * fixed comment by @carmocca * Fix test * chlog * Apply suggestions from code review * Fix test * Update pytorch_lightning/tuner/lr_finder.py Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update pytorch_lightning/tuner/lr_finder.py Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update tests/trainer/test_lr_finder.py * Update pytorch_lightning/tuner/lr_finder.py Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update pytorch_lightning/tuner/lr_finder.py Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * Update pytorch_lightning/tuner/lr_finder.py * Update tests/trainer/test_lr_finder.py Co-authored-by: Carlos Mocholí <carlossmocholi@gmail.com> Co-authored-by: Jirka Borovec <jirka.borovec@seznam.cz> Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com> Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com>
* add make docs * docs
* fix and update tests * update with ModelCheckpoint * chlog * wip wandb fix * all fixed Co-authored-by: chaton <thomas@grid.ai> Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com> Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
…it_train_batches (Lightning-AI#5703) * disable training when zero num_train_batches with limit_train_batches * refactor train skip condition * fix formatting issues * fix formatting issues * ref: test error msg * fix tests for data loader calls * fix train dataloader condition * update limit_train_batches upper range in test comment * remove model state check test Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Co-authored-by: chaton <thomas@grid.ai>
* -y * t * . * t
* Add docs for non-slurm cluster setup * Apply suggestions from code review Co-authored-by: Adrian Wälchli <aedu.waelchli@gmail.com> * Update docs/source/cluster.rst Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com> * Update docs/source/cluster.rst Co-authored-by: Alexander <alexander@reshytko.com> Co-authored-by: chaton <thomas@grid.ai> Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com> Co-authored-by: Adrian Wälchli <aedu.waelchli@gmail.com> Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com>
Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com>
* Update lightning.py * update changelog * add a 3 optimizer test * resolve flake8 * remove extra code * typo * resolve typo * Apply suggestions from code review Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> Co-authored-by: tchaton <thomas@grid.ai> Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Hi! Thanks for your PR! This is duplicated code (which we forgot about!). So the correct fix should to do the same as in the So, doing the same for the |
Codecov Report
@@ Coverage Diff @@
## master #5851 +/- ##
========================================
+ Coverage 88% 94% +5%
========================================
Files 184 134 -50
Lines 13200 10053 -3147
========================================
- Hits 11666 9409 -2257
+ Misses 1534 644 -890 |
A better solution indeed. I'll patch it. |
pls set the target 1.2 as there won't be any releases in 1.1 cc: @tchaton; see our suggestions |
@SergioRAgostinho thank you for sending your PR, just a minor issue coming from our side... we have swapped branches regarding upcoming feat 1.2, mind rebase on actual |
Closing as it will be fixed by #6088 |
What does this PR do?
It implements a missing behavior from
add_argparse_args
that is present inTrainer
not inLightningDataModule
, namely the ability of parsing the docstring of the class to infer how to populate the help string for an argument.NB: The project's PR submission requirements are bit over the time I'm willing to invest, so forgive me for not complying with it. I understand this might result in the PR getting immediately closed but at least you're aware that the changes I present here, address the issue described.
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?
Make sure you had fun coding 🙃