Commit Graph

4253 Commits

Author SHA1 Message Date
Alex Parinov ad9b188b78 Fix typo in LightningOptimizer (#5736) 2021-02-05 21:40:40 +01:00
Jirka Borovec 0038095427 add make for docs (#5685)
* add make docs

* docs
2021-02-05 21:40:40 +01:00
noamzilo 84a8d2d178 Bugfix/5487 auto lr ordering (#5638)
* 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>
2021-02-05 21:40:40 +01:00
siahuat0727 b2b27e4018 Fix docs typo (#4930)
* 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>
2021-02-05 21:40:40 +01:00
Sumanth Ratna 1c44f35cf3 Fix mypy 0.800 plus when prepending $PYTHONPATH to sys.path (#5698)
* Fix mypy when prepending $PYTHONPATH to sys.path

* attempt mypy fix

* Revert "attempt mypy fix"

This reverts commit fb7ed827d9.

* fix mypy

Co-authored-by: Jirka Borovec <jirka.borovec@seznam.cz>
2021-02-05 21:40:40 +01:00
William Falcon da02ac30fb Update README.md 2021-02-05 21:40:40 +01:00
Jirka Borovec e45fde51b6 add contrib questions (#5691)
* 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>
2021-02-05 21:40:40 +01:00
Alex Parinov 78918a9e8e Rename opt_idx to optimizer_idx in docs for complex training loops (#5712) 2021-02-05 21:40:40 +01:00
Jirka Borovec bde2e133bf CI: skip horovod in testing docs (#5702) 2021-02-05 21:40:40 +01:00
James Guillochon 4bf6dd122a Close SummaryWriter in TensorBoardLogger on finalize (#5696)
Not entirely sure this is the "right" solution to this problem, but currently when model fitting is finished the `TensorBoardLogger` attribute `_experiment` (a `SummaryWriter`) is left with an open file handle. This causes issues in particular on Windows systems (and probably others), and also makes the files un-syncable on cloud-synced devices like OneDrive. This PR adds a `close()` to `finalize` to make sure this handle is closed upon fit completion.

Co-authored-by: Adrian Wälchli <aedu.waelchli@gmail.com>
2021-02-05 21:40:40 +01:00
Sumanth Ratna 8732475701 Remove unnecessary intermediate layers in base-conda Dockerfile (#5697)
* [docker][base-conda] Combine ENV+COPY instructions

* [docker][base-cuda] Combine ENV+COPY instructions

* [docker][base-xla] Combine ENV+COPY instructions

* [docker][base-cuda] Fix COPY instruction

* [docker][base-xla] Fix quote in ENV

* [docker][base-xla] Fix $PATH in ENV

* [docker][base-conda] Fix COPY instruction

* chlog

Co-authored-by: Jirka Borovec <jirka.borovec@seznam.cz>
2021-02-05 21:40:40 +01:00
Carlos Mocholí a7d288cb31 Update CODEOWNERS (#5561)
* Update CODEOWNERS

* Update CODEOWNERS

* Apply suggestions from code review

Co-authored-by: Adrian Wälchli <aedu.waelchli@gmail.com>

* Apply suggestions from code review

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: edenlightning <66261195+edenlightning@users.noreply.github.com>
2021-02-05 21:40:40 +01:00
Jihoon Lee d1200af358 fix model arguements (#5653) 2021-02-05 21:40:40 +01:00
Jirka Borovec 230f2b723c update mergify - master only (#5682) 2021-02-05 21:40:40 +01:00
Adrian Wälchli 8e04646690 Filter "unsqueeze" warning when using DP (#5622)
* filtering unsqueeze warning directly in DP

* add changelog

* constrain to module

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Co-authored-by: Nicki Skafte <skaftenicki@gmail.com>
Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com>
2021-02-05 21:40:40 +01:00
tchaton df5cbf5368 resolve conflict
resolve failing test
2021-02-05 21:40:39 +01:00
Adrian Wälchli bb7d188318 Fix ModelCheckpoint race condition in file existence check (#5155)
Co-authored-by: Carlos Mocholí <carlossmocholi@gmail.com>
Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com>
Co-authored-by: Nicki Skafte <skaftenicki@gmail.com>
2021-02-05 21:40:39 +01:00
Nicki Skafte 605c5a8c9a Fix `num_classes` arg in F1 metric (#5663)
* fix f1 metric

* Apply suggestions from code review

* chlog

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com>
Co-authored-by: Jirka Borovec <jirka.borovec@seznam.cz>
2021-02-05 21:40:30 +01:00
Adrian Wälchli 1feff5d774 move progress bar test to correct test folder (#5667) 2021-02-05 21:40:29 +01:00
Jirka Borovec e1e47ac628 new section + legacy 1.1.6 (#5666) 2021-02-05 21:40:29 +01:00
chaton d8f2d8e15a
[Feat-BugFix] Resolve custom DataLoader (#5745)
* resolve custom dataloader

* update changelog

* fix tests

* update on comments

* resolve comments

* add support for custom batch_sampler

* Update tests/trainer/test_data_loading.py

* resolve test

* resolve flake8

* resolve yapf

Co-authored-by: Ubuntu <ubuntu@ip-172-31-88-60.ec2.internal>
Co-authored-by: Carlos Mocholí <carlossmocholi@gmail.com>
2021-02-05 09:03:18 +00:00
Jirka Borovec d2c2e5004d fix tests 2021-02-04 20:55:58 +01:00
Jirka Borovec e633787a3d flake8 + yapf 2021-02-04 20:55:58 +01:00
Sean Naren eb81b7d40c Prepare 1.1.6 release (#5661)
* Parepre 1.1.6 release

* Remove headers

* Apply suggestions from code review

* docs: Apply docs suggestions for release

Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com>
Co-authored-by: Kaushik B <45285388+kaushikb11@users.noreply.github.com>

(cherry picked from commit c462b274ee)
2021-02-04 20:55:58 +01:00
Sean Naren 524675705a Sync working directory with all processes when using Hydra (#5629)
* Append current work dir (hydra dir) to ensure all processes reference the same directory

* Add changelog

* Add different job name for DDP child processes to log to

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>

(cherry picked from commit ca68cac57a)
2021-02-04 20:55:41 +01:00
Swetha Mandava c62f68c7cd passing batch outputs to on_train_batch_end (#4369)
* passing batch outputs to on_train_batch_end

* styling

* updating epoch end logic

* also condition on on_train_epoch_end hooks

* more readable

* pep8

* pep8

* readability suggestion accepted

Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com>

* adding test_training_epoch_end_metrics_collection_on_override test

* fix formatting

* fix formatting

Co-authored-by: Swetha Mandava <smandava@nvidia.com>
Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com>
Co-authored-by: Sean Naren <sean.narenthiran@gmail.com>
Co-authored-by: Roger Shieh <sh.rog@protonmail.ch>

(cherry picked from commit 5fcca4e43b)
2021-02-04 20:55:41 +01:00
Ryan Nett da5ba50727 Unify attribute finding logic, fix not using dataloader when hparams present (#4559)
* Rebase onto master

* indent fix

* Remove duplicated logic

* Use single return

* Remove extra else

* add `__contains__` to TestHparamsNamespace to fix tests

* Fix lightning_setattr to set all valid attributes

* update doc

* better names

* fix holder order preference

* tests for new behavior

* Comment about using the last holder

Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com>
Co-authored-by: Sean Naren <sean.narenthiran@gmail.com>

(cherry picked from commit eee3b1a284)
2021-02-04 20:55:41 +01:00
chaton cc38d4c342 [bugfix] Resolve bug with multiple optimizers and toggle. (#5574)
* fix toggle_optimizer

* update doc

* resolve bug

* update

* Update pytorch_lightning/core/lightning.py

Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com>

* update on comments

* update on comments

* update

Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com>

(cherry picked from commit c76cc23b3d)
2021-02-04 20:55:41 +01:00
manipopopo 97e1516349 Fix Metric.state_dict (#5614)
* Fix Metric.state_dict

* Update CHANGELOG.md

* Update CHANGELOG.md

* Detach tensors in a list if needed

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>

(cherry picked from commit e87424adfb)
2021-02-04 20:55:41 +01:00
Piotr Jander 3ca1fbbf49 Ignore `step` param in Neptune logger's log_metric method (#5510)
* Ignore `step` param in Neptune logger's log_metric method

The `step` parameter is ignored because Neptune requires strictly increasing step values, a condition which is sometimes violated in Lighting e.g. when `fit()` and `test()` are called one after another on some models. `step` could be enabled again once Lightning guarantees that step values are always strictly increasing.

Also a minor bugfix: the `log_text()` method should use Neptune's `log_text()` method.

* Update neptune.py

* Update test_neptune.py

* Update test_all.py

* fix neptune tests

* add chlog

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: Nicki Skafte <skaftenicki@gmail.com>
(cherry picked from commit 5d76b31881)
2021-02-04 20:55:41 +01:00
Adrian Wälchli b3b48c188c fix error when logging to progress bar with reserved name (#5620)
* warn about duplicate metrics

* update changelog

* suggestions from rohit

Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com>

* multiple values in message

* Apply suggestions from code review

Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2021-02-04 20:55:41 +01:00
Santiago Castro 2c9f606af9 Fix tensor printing in `trainer.test()` (#5138)
* Fix showing test results for tensors

* Fix docs

* Update pytorch_lightning/trainer/connectors/logger_connector/logger_connector.py

Co-authored-by: Nicki Skafte <skaftenicki@gmail.com>

* Fix lint issues

Co-authored-by: Nicki Skafte <skaftenicki@gmail.com>
2021-02-04 20:55:41 +01:00
Jirka Borovec 6d67da2142 mergify: less updates (#5639)
* mergify: less updates

* Drop label
2021-02-04 20:55:41 +01:00
Jirka Borovec 2758db6819 unify pep8 speaks (#5607)
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2021-02-04 20:55:41 +01:00
Lezwon Castelino b95471d4a4 Increase TPU check timeout (#5598)
* change timeout to 100

* add to CHANGELOG.md

* update test

* updates

* reduce TPU_TIMEOUT_CONSTANT during test

* Update tests/utilities/test_xla_device_utils.py

Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com>

* patch TPU_TIMEOUT_CONSTANT

* Apply suggestions from code review

Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com>
Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2021-02-04 20:55:41 +01:00
Philipp Singer 59361d595a fix Neptune logger creating multiple experiments when gpus > 1 (#3256)
* DP device fix

* potential fix

* fix merge

* update tests

Co-authored-by: Adrian Wälchli <aedu.waelchli@gmail.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2021-02-04 20:55:40 +01:00
Jirka Borovec 62be060cb8 name typo (#5612) 2021-02-04 20:55:40 +01:00
Jirka Borovec 70252f1284 update mergify (#5608)
* try fix update and review

* less spam
2021-02-04 20:55:40 +01:00
Carlos Mocholí 4d9c51d316 Update help steps (#5564)
* Update help steps

* Update README.md

Co-authored-by: edenlightning <66261195+edenlightning@users.noreply.github.com>

* Update README.md

* Update README.md

Co-authored-by: edenlightning <66261195+edenlightning@users.noreply.github.com>
2021-02-04 20:55:40 +01:00
Jirka Borovec ede1227c39 hotfix: drop bad pyyaml version (#5606)
* drop potetionaly bad version

* *
2021-02-04 20:55:40 +01:00
Jirka Borovec 74d175bfac fix PyPI releasing (#5605) 2021-02-04 20:55:40 +01:00
chaton e8206a9295 Mnodes (#5020)
* add a multi-nodesworkflow

Co-authored-by: Jirka Borovec <jirka.borovec@seznam.cz>
2021-02-04 20:55:40 +01:00
Carlos Mocholí 3b43e5a4fc Add note about returning None (#5578)
Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com>
Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com>
Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com>
2021-02-04 20:55:40 +01:00
Carlos Mocholí 5ff1306582 Add new CHANGELOG section (#5580) 2021-02-04 20:55:40 +01:00
chaton e425bf3ba9
[BugOnFeat] Resolve bug with Finetuning (#5744)
* resolve bug + add doc

* Update pytorch_lightning/callbacks/finetuning.py

* resolve bug

* start adding more test

* add more tests for finetuning callback functions

* rename to flatten_modules

* resolve doc

* Update pytorch_lightning/callbacks/finetuning.py

Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com>

* resolve comments

* remove update on BoringModel

* update on comments

Co-authored-by: Carlos Mocholí <carlossmocholi@gmail.com>
Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com>
2021-02-04 18:36:54 +00:00
Lexie Troiano d05cdf83f1 Merge remote-tracking branch 'carmocca/sync-1.1.5' into release/1.2-dev 2021-02-04 09:42:59 -05:00
Kaushik B 26cc3b5357
Change the seq of on_train_batch_end, on_batch_end & on_train_epoch_end, on_epoch_end hooks (#5688) 2021-02-04 18:30:20 +05:30
Adrian Wälchli 9555043a29
Force ModelCheckpoint callback to run last (#5731) 2021-02-03 16:40:57 -05:00
Jirka Borovec 630a88addb
drop deprecated docs (#5768)
* drop deprecated docs

* notes

* .
2021-02-03 20:21:19 +00:00
rohitgr7 a37416843b Fix sync
resolve wrong merge

tpu

yapf
2021-02-03 20:11:35 +01:00