Commit Graph

5318 Commits

Author SHA1 Message Date
Carlos Mocholí e63968ab88
Add `pyupgrade` to `pre-commit` ()
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2021-07-26 14:38:12 +02:00
Carlos Mocholí a64cc37394
Replace `yapf` with `black` ()
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2021-07-26 13:37:35 +02:00
Carlos Mocholí 428dc2e1b0
Update issue and PR templates ()
Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com>
2021-07-26 12:30:07 +02:00
Ethan Harris 52526c20b5
Add support for functions to be parsed by the Lightning CLI in addition to Types ()
* Initial commit

* Update docstrings

* Update CHANGELOG.md

* Fix mypy

* Fixes

* Fixes

* Update to comments

* Fix

* mypy

* Update on comments

* Update

* Fix mypy

* protected

Co-authored-by: thomas chaton <thomas@grid.ai>
Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com>
Co-authored-by: Carlos Mocholi <carlossmocholi@gmail.com>
2021-07-26 10:53:48 +02:00
deepsource-autofix[bot] 2cf03af155
Remove undefined name from `__all__` ()
* Remove undefined name from `__all__`

Co-authored-by: deepsource-autofix[bot] <62050782+deepsource-autofix[bot]@users.noreply.github.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2021-07-26 10:52:35 +02:00
Carlos Mocholí ca08fa1e25
Avoid partial for apply to collection () 2021-07-26 10:35:16 +02:00
Carlos Mocholí 6dbdf438e8
Support `DataLoader`s with missing arguments in `replace_sampler` ()
* Support `DataLoader`s with missing arguments in `replace_sampler`

* Fix for multiprocessing context

* Fixes and test improvements

* Fixes and test improvements

* Fixes and test improvements

* Test any variadic name

* Update CHANGELOG

* Make sure extra attributes can be present

* Skip on old Windows

* Update pytorch_lightning/trainer/data_loading.py

* Update pytorch_lightning/trainer/data_loading.py

* Check is dataloader

* Typo
2021-07-26 10:04:21 +02:00
Adrian Wälchli c519fce6fe
docs: clarify closure usage in gan example ()
* clarify closure usage in gan example

* Update docs/source/common/optimizers.rst

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* remove empty line

* Update docs/source/common/optimizers.rst

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

* do not capitalize if not a sentence

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Carlos Mocholí <carlossmocholi@gmail.com>
2021-07-26 09:51:21 +02:00
Adrian Wälchli 1a59db9846
docs: fix return type description of Trainer.validate/test ()
* update docs

* update typehints

* fix indentation
2021-07-26 09:50:29 +02:00
Kaushik B ef7d41692c
Add `ddp_*_find_unused_parameters_false` to Plugins Registry. ()
Co-authored-by: Carlos Mocholí <carlossmocholi@gmail.com>
2021-07-24 04:02:54 +00:00
Elad Segal 07635d0e86
fix restoring finetune callbacks after accelerator setup on training resume ()
Co-authored-by: tchaton <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: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2021-07-23 19:49:32 +02:00
Jirka Borovec abbcfa1ab7
fix CI for PT 1.10 ()
* fix CI for PT 1.10
* Apply suggestions from code review

Co-authored-by: Carlos Mocholí <carlossmocholi@gmail.com>
2021-07-23 19:24:31 +02:00
hihunjin f2f1f44240
[Typo] update some out-dated links from pytorch ``clip_grad_value_`` ()
Co-authored-by: Carlos Mocholí <carlossmocholi@gmail.com>
2021-07-23 15:06:39 +02:00
William Falcon 54cb009dd3
Update governance.rst 2021-07-23 07:41:18 -04:00
Carlos Mocholí 4a64bc3fd3
Fix DeepSpeed lr scheduler logic ()
* Fix deepspeed scheduler logic

* Fix tests

* Minor changes

* Improve tests

* inference fix

* CHANGELOG

Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com>
2021-07-23 10:08:58 +01:00
Adrian Wälchli 0ad7f3a829
Fix log_dir tracking in case of multiple Trainer instances + DDP ()
Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com>
2021-07-23 09:18:23 +02:00
Carlos Mocholí f7027a8701
Remove `torch >= 1.6` checks () 2021-07-23 04:03:20 +00:00
Jirka Borovec b7dbcc3e13
Quant as optional step ()
Co-authored-by: Adrian Wälchli <aedu.waelchli@gmail.com>
Co-authored-by: Carlos Mocholí <carlossmocholi@gmail.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2021-07-22 12:44:27 +00:00
Kaushik B 5452590872
fix: Enable manual optimization for TPUs () 2021-07-22 15:33:35 +05:30
edenlightning 20fc8cf063
[Docs revamp 2/N] New doc for managing data ()
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com>
Co-authored-by: thomas chaton <thomas@grid.ai>
Co-authored-by: Justus Schock <12886177+justusschock@users.noreply.github.com>
Co-authored-by: ananthsub <ananth.subramaniam@gmail.com>
Co-authored-by: Adrian Wälchli <aedu.waelchli@gmail.com>
Co-authored-by: Ethan Harris <ewah1g13@soton.ac.uk>
Co-authored-by: Ethan Harris <ethanwharris@gmail.com>
2021-07-22 01:42:08 +00:00
Jirka Borovec d3ed472b20
Merge pull request from PyTorchLightning/v1.4.0rc1
v1.4.0rc1 & chlog
2021-07-21 09:54:27 -04:00
Kaushik B 35a6a6c705
Maintain Backward compatibility for DeviceDtypeModuleMixin ()
* Maintain Backward compatibility for DeviceDtypeModuleMixin

* Update message

* Add deprecation test

* Update test
2021-07-21 13:13:19 +02:00
thomas chaton 063f5ba73e
[bugfix] Re-compute accumulated_grad_batches ()
* resolve resolution

* update changelog

* typo

* optimize test

* update on comments

* resolve comments

* update
2021-07-21 10:46:25 +00:00
deepsource-autofix[bot] 7a641db3a5
Add the bound instance as method parameter ()
Co-authored-by: deepsource-autofix[bot] <62050782+deepsource-autofix[bot]@users.noreply.github.com>
2021-07-21 10:10:33 +00:00
thomas chaton c9af1a7aec
[bugfix] Reduce memory leaks ()
* reduce memory leak

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* update changelog

* Apply suggestions from code review

Co-authored-by: Ethan Harris <ewah1g13@soton.ac.uk>

* resolve flake8

* update on comments

* resolve bug

* update

* Undo whitespace changes

* remove bug

* resolve flake8

* revert change

* update on comments

* delete the ddp wrapper as it hold memory

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* resolve flake8

* update on comments

* update changelog

* resolve test

* Update CHANGELOG

* Refactor teardown

* Fix comment

* Do it for non-gpu too

* remove ref when the model is not a lightning_module

* Fix import error

* move down

* resolve bug

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* resolve assignement

* update

* move above

* Fix device calls to support tpu training

* Updat todo

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com>
Co-authored-by: Ethan Harris <ewah1g13@soton.ac.uk>
Co-authored-by: Carlos Mocholi <carlossmocholi@gmail.com>
Co-authored-by: Kaushik B <kaushikbokka@gmail.com>
2021-07-21 11:37:05 +02:00
marsggbo d0038b521c
Bugfix: horovod optimizer missing 2 required positional arguments ()
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Adrian Wälchli <aedu.waelchli@gmail.com>
Co-authored-by: thomas chaton <thomas@grid.ai>
Co-authored-by: Carlos Mocholí <carlossmocholi@gmail.com>
2021-07-21 08:11:26 +00:00
Kaushik B 4c79b3a5b3
Parity test ()
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Jirka <jirka.borovec@seznam.cz>
Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com>
2021-07-21 02:53:53 +05:30
thomas chaton ea13f6021c
[bugfix] Prevent deepcopy of dataloaders / Trainer in SWA Callback ()
* resolve deepcopy

* update changelog

* move private

* update on comments

* Update CHANGELOG

* Set skipped attributes to None

* Simplify test

* update

* update changelog

* update

* update on comments

* typo

* update

Co-authored-by: Carlos Mocholi <carlossmocholi@gmail.com>
2021-07-20 18:31:49 +00:00
Sean Naren 8a9ee403be
Add Windows Support for DeepSpeed ()
* Modify deepspeed distributed to support windows

* Add weak test

* Cleanups

* Capture more in tests

* Add comment

* Cleaner asserts
2021-07-20 13:55:52 +00:00
Kaushik B 2d682fa461
Add Ready to Go label only after two approvals () 2021-07-20 15:10:40 +05:30
Caleb Robinson 0ac9e2ae60
Adding appends to some of the pseudocode blocks () 2021-07-20 10:09:31 +02:00
Kaushik B 556879e5cf
Add support for devices flag to Trainer ()
* Support devices flag to Trainer
2021-07-20 04:33:12 +00:00
Gustaf Ahdritz 6604fc1344
Use `default_root_dir` as the `log_dir` with `LoggerCollection`s ()
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Carlos Mocholí <carlossmocholi@gmail.com>
2021-07-19 22:12:12 +00:00
Carlos Mocholí a6fd32a708
Do not reset Loops total counters () 2021-07-19 18:22:47 +02:00
deepsource-autofix[bot] 3628c314e5
Merge `isinstance` calls ()
Co-authored-by: deepsource-autofix[bot] <62050782+deepsource-autofix[bot]@users.noreply.github.com>
2021-07-19 14:34:37 +00:00
thomas chaton 8d0df6fad2
[Feat] Improve TPU CI ()
* i

* i

* i

* i

* i

* i

* i

* i

* i

* i

* i

* i

* i

* i

* i

* i

* i

* i

* i

* i

* i

* i

* i

* i

* i

* i

* i

* i

* i

* i

* i

* i

* i

* i

* i

* update

* update ci

* i

* i

* i

* i
2021-07-19 19:43:21 +05:30
deepsource-autofix[bot] 4bc3d70ad9
Remove unnecessary generator ()
Co-authored-by: deepsource-autofix[bot] <62050782+deepsource-autofix[bot]@users.noreply.github.com>
2021-07-19 14:02:07 +00:00
deepsource-autofix[bot] cfc04100f9
Remove unnecessary use of comprehension ()
Co-authored-by: deepsource-autofix[bot] <62050782+deepsource-autofix[bot]@users.noreply.github.com>
2021-07-19 15:43:28 +02:00
Adrian Wälchli 7d93d70110
Loop specialization ()
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: tchaton <thomas@grid.ai>
Co-authored-by: Carlos Mocholi <carlossmocholi@gmail.com>
Co-authored-by: Justus Schock <justus.schock@posteo.de>
Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com>
2021-07-19 15:08:53 +02:00
ramonemiliani93 c9eb7e4433
Hash values in LightningEnum instead of name. ()
Co-authored-by: Ramon Emiliani <ramon@mbp-de-ana.lan>
Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com>
Co-authored-by: Carlos Mocholí <carlossmocholi@gmail.com>
Co-authored-by: Ethan Harris <ewah1g13@soton.ac.uk>
2021-07-19 15:02:22 +02:00
Stephen McGroarty b7e5bc7a36
Only output IPU report on request ()
These reports can be quite large and involve some processing
to produce. It means on larger models there's a noticeable performance
hit to produce the cycles/memory reports.
2021-07-19 12:52:58 +00:00
Carlos Mocholí 80a3d6732e
Refactor log_dir usage in the CLI () 2021-07-19 14:26:11 +02:00
Yi Wang adaa32f47a
[DDP] Remove the outdated limitations of DDP communication hook since 1.9 ()
* [DDP] Remove the outdated limitations of DDP communication hook since 1.9

1. DDP communication hook can work on multiple backends since 1.9.
2. SPMD in DDP is completely retired in 1.9, and SPSD is the only option.

* Update ddp.py

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2021-07-19 13:55:42 +02:00
Xuehai Pan 2c5d94d98b
Fix: handle logical CUDA device IDs for GPUStatsMonitor if `CUDA_VISIBLE_DEVICES` set ()
Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com>
Co-authored-by: Carlos Mocholi <carlossmocholi@gmail.com>
2021-07-19 11:42:43 +00:00
Jirka Borovec d5bf518cb0
update mergify rules ()
* update mergify rules

* Apply suggestions from code review

Co-authored-by: Carlos Mocholí <carlossmocholi@gmail.com>
2021-07-19 11:42:21 +00:00
Carlos Mocholí 710df398c9
Remove `check_checkpoint_callback` ()
Co-authored-by: thomas chaton <thomas@grid.ai>
Co-authored-by: Adrian Wälchli <aedu.waelchli@gmail.com>
2021-07-19 11:29:00 +00:00
Adrian Wälchli 96729fc45a
update links for collect_env_details.py script () 2021-07-19 11:26:09 +00:00
Carlos Mocholí e345469a87
Delete legacy dataloader processing utility () 2021-07-19 11:25:04 +00:00
deepsource-autofix[bot] ddf4a0213d
Use `is` to compare type of objects () 2021-07-19 11:17:45 +00:00
Sean Naren 06ac7d9649
[Fix] Remove DeepSpeed Plugin FP16 exception ()
* Remove error, add mixed to check

* Add test

* Remove test

* Add changelog

* Add test for mixed

* Update tests/plugins/test_deepspeed_plugin.py

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Add special

Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2021-07-19 11:12:31 +00:00