Commit Graph

3947 Commits

Author SHA1 Message Date
Justus Schock f23f5e5648
Fix DP Logging Aggregation (#4138)
* add option to step result to do aggregation on a specific device

* in dp: do aggregation on root gpu

* Update CHANGELOG.md

* pep8

* trailing whitespace

* move to root


move result


stupid result object


revert to master


undo import


add "to" method to result


generalize to


try a test


try a test


Revert "try a test"

This reverts commit 22e3c1001e6c5774ea18ad925830304c245bf145.

Revert "try a test"

This reverts commit 4d2d8fb2a52d552894809a0cbe51af126d78f070.

new test


max epochs


super epoch end 


log in test


hanging test


undo test


initial test that fails on master


step end


pass


step end


step end


epoch end


print


step


check dev


clean up test


sanity check


wtf is go ing on


frustration


debugging test


test


test


test


test


test


test


test


test


unused import

* move chlog entry

* clean

* remove outdated changes

Co-authored-by: Adrian Wälchli <aedu.waelchli@gmail.com>
Co-authored-by: Jirka Borovec <jirka.borovec@seznam.cz>
2020-12-04 19:10:07 +01:00
Sean Naren ed5bda3eda
[docs] Added description of saving using ddp (#4660)
* Added description of saving using ddp

* Added code block example to explain DDP saving logic

* Fixed underline

* Added verbose explanation

* Apply suggestions from code review

* Added caveat when using custom saving functions

* flake8

Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com>
Co-authored-by: Jirka Borovec <jirka.borovec@seznam.cz>
2020-12-04 17:59:38 +01:00
chaton 62903717a4
[TEST] Min steps override early stopping (#4283)
* test to make sure behaviour is enforced

* test_min_steps_override_early_stopping_functionality

* make sure Excepted Behaviour is reproduced

* remove pollution from extra logging

* update docstring

* reduce test time

* resolve pep8
2020-12-04 17:10:14 +01:00
Rohit Gupta 342a2b6f25
Deprecate auto mode from ModelCheckpoint and EarlyStopping (#4695)
* remove auto mode from callbacks

* chlog

* remove auto mode from callbacks

* mode

* mode

* move back

* update docs

* update docstrings

* docstring warning

* fix syntax

* Apply suggestions from code review

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

* isort

* default to 'auto'

* syntax

Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com>
2020-12-04 16:11:58 +01:00
Limber Cheng b807c3278d
Update to latest logging format and modify the accuracy method. (#4816)
* Update to latest logging format and modify the accuracy method.

* Apply suggestions from code review

Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com>
Co-authored-by: chaton <thomas@grid.ai>
2020-12-04 15:30:51 +01:00
Lucien d3626b7f50
Organize docstring (#4906)
* Organize docstring

* Update pl_examples/domain_templates/reinforce_learn_Qnet.py

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

Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com>
Co-authored-by: chaton <thomas@grid.ai>
2020-12-04 14:45:13 +01:00
NeuralLink 88792982b5
🔨 minor refactor in trainer. (#4801)
* 🔨 minor refactor in trainer.

* 🔨 Use finally instead of else

* 🔨 revert format

* 🔨 check should skip inside try

Co-authored-by: chaton <thomas@grid.ai>
Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com>
2020-12-04 13:42:13 +01:00
Adrian Wälchli f878a2699f
deprecate hprams setter method (#4813)
* deprecate hprams setter method

* update chlog

* isort

* update deprecation warning

Co-authored-by: Nicki Skafte <skaftenicki@gmail.com>
Co-authored-by: chaton <thomas@grid.ai>
Co-authored-by: Ananya Harsh Jha <ananya@pytorchlightning.ai>
Co-authored-by: Roger Shieh <sh.rog@protonmail.ch>
Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com>
2020-12-04 12:28:53 +01:00
Rafael Hautekiet 3872f9884a
Update cloud_io.py (#4936)
* Update cloud_io.py

Solves `AttributeError: 'PosixPath' object has no attribute 'startswith'`

* Update cloud_io.py

Co-authored-by: chaton <thomas@grid.ai>
Co-authored-by: Teddy Koker <teddy.koker@gmail.com>
Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com>
2020-12-04 11:00:06 +01:00
Jirka Borovec 3976db597d
refactor imports of optional dependencies (#4859)
* refactor imports of optional dependencies

* fix

* fix

* fix

* fix

* fix

* flake8

* flake8

Co-authored-by: Sean Naren <sean.narenthiran@gmail.com>
Co-authored-by: chaton <thomas@grid.ai>
2020-12-04 10:26:10 +01:00
William Falcon 02ac3aba05
Update CODEOWNERS 2020-12-03 17:59:14 -05:00
Jirka Borovec 90b87dd9c8
update codeowners (#4881)
* update codeowners

* install

* Apply suggestions from code review

* Apply suggestions from code review

Co-authored-by: chaton <thomas@grid.ai>

* .

* Update .github/CODEOWNERS

Co-authored-by: chaton <thomas@grid.ai>
2020-12-03 17:48:40 +00:00
edenlightning 0b653b89ba
Replace lightning logo asset (#4844)
* update logo

* Add files via upload

* Add files via upload

* Delete lightning_logo-large.svg

* Delete lightning_logo.svg

Co-authored-by: Sean Naren <sean.narenthiran@gmail.com>
Co-authored-by: Roger Shieh <sh.rog@protonmail.ch>
Co-authored-by: chaton <thomas@grid.ai>
2020-12-03 09:22:30 +00:00
Jethro Kuan c7e349e73d
docs: default_root_path -> default_root_dir (#4942)
* docs: default_root_path -> default_root_dir

* Apply suggestions from code review

* fix

Co-authored-by: Carlos Mocholí <carlossmocholi@gmail.com>

* update notebook

Co-authored-by: Jethro Kuan <jethro.kuan@bytedance.com>
Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com>
Co-authored-by: Carlos Mocholí <carlossmocholi@gmail.com>
Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com>
2020-12-02 19:17:34 -05:00
Jirka Borovec 7b7d4bb86d
ci typo in cofig (#4954)
* ci typo

* v++

Co-authored-by: edenlightning <66261195+edenlightning@users.noreply.github.com>
2020-12-02 22:49:47 +01:00
chaton 91c4e1fa59
increase release (#4949) 2020-12-02 21:27:38 +01:00
edenlightning 486006e1ca
Update trainer.rst (#4952) 2020-12-02 20:21:40 +01:00
Jirka Borovec eeae426b33
CI: skip hanging (#4943)
* CI: try increase time limit

* try min 3.8

* no ex

* CI

* dep

* test

* deps

* deps

* drop

* drop

Co-authored-by: chaton <thomas@grid.ai>
2020-12-02 16:18:14 +00:00
Jirka Borovec b2611b7dfa
drop sklearn dependency (#4912)
* drop sklearn dependency

* scipy

Co-authored-by: chaton <thomas@grid.ai>
Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com>
2020-12-02 16:22:04 +01:00
Lezwon Castelino 12cb9942a1
Tpu save (#4309)
* convert xla tensor to cpu before save

* move_to_cpu

* updated CHANGELOG.md

* added on_save to accelerators

* if accelerator is not None

* refactors

* change filename to run test

* run test_tpu_backend

* added xla_device_utils to tests

* added xla_device_utils to test

* removed tests

* Revert "added xla_device_utils to test"

This reverts commit 0c9316bb

* fixed pep

* increase timeout and print traceback

* lazy check tpu exists

* increased timeout
removed barrier for tpu during test
reduced epochs

* fixed torch_xla imports

* fix tests

* define xla utils

* fix test

* aval

* chlog

* docs

* aval

* Apply suggestions from code review

Co-authored-by: Jirka Borovec <jirka.borovec@seznam.cz>
Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com>
Co-authored-by: chaton <thomas@grid.ai>
Co-authored-by: Sean Naren <sean.narenthiran@gmail.com>
2020-12-02 13:05:11 +00:00
Sean Naren 0c763b2de1
Sharded DDP Docs (#4920)
* Add doc fixes

* Remove space

* Add performance doc, fix flag

* Fix up docs

* Add install instructions

* Update link

* Add section for model parallelism, refactor into section

* Address code review

* fixed underline

* Update docs/source/multi_gpu.rst

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

* Address code review points

* Added caveat, increase performance

* Update docs/source/multi_gpu.rst

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

* Update docs/source/multi_gpu.rst

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

* Add cross reference

* Swapped to just fairscale since new release contains all required code

* Revert "Swapped to just fairscale since new release contains all required code"

This reverts commit 21038e72

* Update docs/source/multi_gpu.rst

Co-authored-by: chaton <thomas@grid.ai>

* Fairscale install has been fixed

Co-authored-by: edenlightning <66261195+edenlightning@users.noreply.github.com>
Co-authored-by: chaton <thomas@grid.ai>
2020-12-02 11:54:46 +00:00
Jirka Borovec add387c6a7
CI cleaning (#4941)
* set

* cut

* env

* oonce

* env

* env

* env
2020-12-02 10:00:05 +00:00
Luigi Giugliano a941f96d18
Added the function for downloading the badges locally and replace the url with downlaod path (#4250)
* Added the function for downloading the badge locally, replacing the url

* Fixed the pep8 errors, pointed out during pull request

* Update setup.py

* refactor

* format

* test

* Added Doctest on the functions

* test

* test

* fix

* format

* fix

* fix

* prune

* fiix

* fiix

* flake8

* fix

* imports

* imports

* imports

* fixx

* impoets

* win

* min

Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com>
Co-authored-by: Jirka Borovec <jirka.borovec@seznam.cz>
2020-12-01 22:58:32 +01:00
Sean Naren e952dee292
Allow string plugins (#4888)
* Allow plugin to be chosen via string

* Fix implementation, add tests

* Fix codefactor issues

* Added missing env patch

* Skip test for windows

* Reword reason

* Add skip to invalid test

* Create required_plugins function, move sharded amp requirement to plugin

* Pass AMPType, fix setter for apex

* Better doc strings

* Add exception when using apex

* Add trainer available_plugins function, warn user when plugins have been added automatically with option to override behaviour

* Fixed pep8 indent

* Fix codefactor issues

* Add env variables

* Update pytorch_lightning/cluster_environments/cluster_environment.py

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

* Addressed code review

* Update pytorch_lightning/plugins/plugin_connector.py

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

* Update pytorch_lightning/plugins/plugin_connector.py

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

* Update pytorch_lightning/plugins/plugin_connector.py

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

* Addressed more code review feedback

* Fixed docstrings

* Swapped to verbose runtime error

* Apply suggestions from code review

* Apply suggestions from code review

* Update pytorch_lightning/plugins/sharded_plugin.py

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

* Change name

* Pass trainer to plugins that may require it

* Fix sharded plugin

* Added test to ensure string sharded works

* Removed trainer typing as this breaks pep8

* Fixed doc issues

* Fixed tests

Co-authored-by: chaton <thomas@grid.ai>
Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com>
2020-12-01 20:30:49 +00:00
Justus Schock ebbf256bf5
Create memory dynamically (#4938)
* create window size dynamically.

* pep8

Co-authored-by: chaton <thomas@grid.ai>
2020-12-02 01:05:12 +05:30
Jeff Yang 563f9214fa
upgrade min deps (#4934)
* upgrade min deps

* unused

* replace torchvision and torchtext

* loggers

* freeze pip

Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com>
Co-authored-by: Jirka Borovec <jirka.borovec@seznam.cz>
Co-authored-by: Sean Naren <sean.narenthiran@gmail.com>
2020-12-01 17:19:44 +00:00
chaton 1176df70e6
update changelog (#4931) 2020-12-01 16:16:27 +00:00
chaton 1d3724a878
[HotFix] Logging - One epoch delay on training epoch metrics. (#4913)
* add test

* resolve logging bug

* update

* resolve pep8

* resolve tests

Co-authored-by: Roger Shieh <sh.rog@protonmail.ch>
2020-12-01 09:26:52 +00:00
Rohit Gupta ef762a0d2a
update logging docs and decorators (#4431)
* update logging docs

* experiment

* add decorators to base and csv logger methods

* fix

* doc fix

* update docs

* update docs

* Update pytorch_lightning/loggers/base.py

Co-authored-by: chaton <thomas@grid.ai>
2020-12-01 11:35:00 +05:30
chaton c2e6e68c7e
optimizer clean up (#4658)
* add LightningOptimizer

* typo

* add mock closure

* typo

* remove logic in optimizer_step

* update

* update

* update

* desactivate LightningOptimizer for hovorod

* resolve flake

* typo

* check optimizer name

* change name

* added backward to LightningOptimizer

* remove use_lightning_optimizer

* move update

* simplify init

* resolve comments

* resolve bug

* update

* update

* resolve bugs

* resolve flake8

* set state

* work manual_optimizer_step

* add doc

* add enable_pl_optimizer

* make optimizer_step

* add make_optimizer_step

* add examples

* resolve test

* add test_optimizer_return_options_enable_pl_optimizer

* add enable_pl_optimizer=True

* update

* update tests

* resolve bugs

* update

* set Trainer to False

* update

* resolve bugs

* update

* remove from doc

* resolve bug

* typo

* update

* set to True

* simplification

* typo

* resolve horovod

* unwrap horovod

* remove Optimizer

* resolve horovod

* move logic to amp_backend

* doesn't seem to be pickable

* update

* add again

* resolve some bugs

* cleanup

* resolve bug with AMP

* change __repr__

* round at -12

* udpate

* update

* update

* remove from horovod

* typo

* add convert_to_lightning_optimizers in each accelerators

* typo

* forgot

* forgot a convert_to_lightning_optimizers

* update

* update

* update

* increase coverage

* update

* resolve flake8

* update

* remove useless code

* resolve comments + add support for LightningOptimizer base class

* resolve flake

* check optimizer get wrapped back

* resolve DDPSharded

* reduce code

* lightningoptimizer

* Update pytorch_lightning/core/optimizer.py

Co-authored-by: Carlos Mocholí <carlossmocholi@gmail.com>

* Update pytorch_lightning/core/lightning.py

* remove reference to step function

* Apply suggestions from code review

* update on comments

* resolve

* Update CHANGELOG.md

* add back training_step in apex and native_amp

* rename optimizer_step

Co-authored-by: Carlos Mocholí <carlossmocholi@gmail.com>
Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com>
Co-authored-by: William Falcon <waf2107@columbia.edu>
Co-authored-by: Sean Naren <sean.narenthiran@gmail.com>
2020-12-01 00:09:46 +00:00
Jirka Borovec 2fe1eff85d
drop fairscale for PT <= 1.4 (#4910)
* drop fairscale for PT <= 1.4

* fix

* Add extra check to remove fairscale from minimal testing if using minimal torch version 1.3

* Update ci_test-full.yml

* Update gym to .3 to see if this fixes examples CI

* Update omegaconf to minimum for hydra v1.0

* Revert "Update gym to .3 to see if this fixes examples CI"

This reverts commit 4221d4b9

* Revert "Update omegaconf to minimum for hydra v1.0"

This reverts commit 4f579217

Co-authored-by: Sean Naren <sean.narenthiran@gmail.com>
Co-authored-by: SeanNaren <sean@grid.ai>
2020-11-30 23:19:30 +00:00
Jirka Borovec 42b9a387df
freeze DALI (#4922)
* freeze DALI

* todos

* only CI

* Update .drone.yml

* string

* speed

Co-authored-by: Sean Naren <sean.narenthiran@gmail.com>
2020-11-30 21:21:59 +00:00
Zhu Baohe 9801e7694d
Fix codes in 'Lightning in 2 steps' docs (#4894)
* fix

* fix1

* Apply suggestions from code review

* Update docs/source/new-project.rst

* more fixes

Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com>
Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com>
Co-authored-by: chaton <thomas@grid.ai>
2020-11-30 14:29:49 +01:00
Atharv Sonwane 3b6b6c8bfb
Fix typo in getting started docs (#4882)
Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com>
Co-authored-by: Nicki Skafte <skaftenicki@gmail.com>
2020-11-30 12:00:14 +01:00
brett koonce 4de568a545
tweak imagenet docs to match current script (#4895)
Co-authored-by: Sean Naren <sean.narenthiran@gmail.com>
Co-authored-by: Nicki Skafte <skaftenicki@gmail.com>
2020-11-30 09:54:55 +01:00
Lucien-cs ac3f1bd0da
Update reinforce_learn_Qnet.py (#4814)
Correct the text.

Co-authored-by: chaton <thomas@grid.ai>
Co-authored-by: Nicki Skafte <skaftenicki@gmail.com>
2020-11-30 08:21:37 +01:00
Jirka Borovec 405645daf8
formatting (#4898)
Co-authored-by: Sean Naren <sean.narenthiran@gmail.com>
2020-11-30 00:57:28 -05:00
Sean Naren df7a52df5f
Increase multiple optimizers parity for drone CI (#4884) 2020-11-29 19:46:51 +00:00
Jirka Borovec 597dfa174c
build dockers XLA 1.7 (#4891)
* build XLA 1.7

* night XLA 1.7

* rename

* use 1.7

* tpu ver
2020-11-29 15:14:19 -04:00
William Falcon f677efe61e
Merge pull request #4880 from PyTorchLightning/better_simple_profiler
Logging
2020-11-27 15:33:58 -05:00
William Falcon 6cefb70e75
Merge pull request #4856 from PyTorchLightning/feature/plug
Backend unit tests
2020-11-27 15:27:51 -05:00
SeanNaren 1719b2dca4 Skip a few tests to reduce drone CI wait times 2020-11-27 20:21:50 +00:00
tchaton c6502adba1 resolve test 2020-11-27 19:34:45 +00:00
tchaton 8e51543af9 reduce to 0.22 2020-11-27 19:05:09 +00:00
tchaton b36b9a0145 reduce parity test 2020-11-27 18:50:01 +00:00
Sean Naren 06a856e055
Merge branch 'master' into feature/plug 2020-11-27 18:48:58 +00:00
tchaton ba41733802 Merge branch 'better_simple_profiler' of https://github.com/PyTorchLightning/pytorch-lightning into better_simple_profiler 2020-11-27 18:47:05 +00:00
tchaton 316ebadbdc remove capture on on_train_batch_end 2020-11-27 18:46:49 +00:00
chaton 6ba77c2611
Merge branch 'master' into better_simple_profiler 2020-11-27 18:43:01 +00:00
tchaton d5d64f0ff6 add note 2020-11-27 18:36:50 +00:00