Commit Graph

180 Commits

Author SHA1 Message Date
Carlos Mocholí 93caa7cda9
Fix `apply_to_collection(defaultdict)` (#10316) 2021-11-03 11:18:10 +00:00
Ning f6ed0bd8ca
introduce has_len_all_ranks() to check the length of dataloader across ranks (#9827)
* introduce , udpate tests

* update CHANGELOG.md

* change staticmethod and hook attribute naming

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

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

* fix typo

* remove non-essential comment

* fix merge error and comment format

* try to fix test_tpu.py failure

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

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

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

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

* update on comments

* chlog

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

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

* chlog

* update

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

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

* try fix

* Revert back TPUSpawn changes

* Update test

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: Rohit Gupta <rohitgr1998@gmail.com>
Co-authored-by: Kaushik B <kaushikbokka@gmail.com>
2021-11-02 13:22:58 -04:00
Rohit Gupta e4ee6df196
Add warning if multiple batch_sizes are found from ambiguous batch (#10247) 2021-11-01 19:50:30 +00:00
Rohit Gupta 6a9adf26f7
Replace `_TORCH_GREATER_EQUAL_DEV_1_10` with `_TORCH_GREATER_EQUAL_1_10` (#10240) 2021-10-29 10:36:02 +00:00
thomas chaton 5f4ffdee41
cleanup (#10081) 2021-10-29 08:40:43 +00:00
Low Weng Fei 83d74bb385
Fix `reset_seed()` converting the `PL_SEED_WORKERS` environment variable `str` read to `bool` (#10099)
Co-authored-by: Adrian Wälchli <aedu.waelchli@gmail.com>
Co-authored-by: tchaton <thomas@grid.ai>
2021-10-28 12:57:41 +00:00
Eric Wiener 0e20119d24
Change default value of the `max_steps` Trainer argument from `None` to `-1` (#9460)
Co-authored-by: Adrian Wälchli <aedu.waelchli@gmail.com>
Co-authored-by: Carlos Mocholí <carlossmocholi@gmail.com>
Co-authored-by: thomas chaton <thomas@grid.ai>
Co-authored-by: rohitgr7 <rohitgr1998@gmail.com>
2021-10-25 20:21:33 +00:00
Rohit Gupta d9dfb2e920
fix tests (#10138) 2021-10-25 19:37:47 +00:00
Danielle Pintz 1f7bd6650c
Mark accelerator connector as protected (#10032) 2021-10-25 19:24:54 +00:00
jjenniferdai 6d79184ec5
Unify checkpoint load paths [redo #9693] (#10061) 2021-10-25 19:05:31 +00:00
Adrian Wälchli 7eb2edf421
rename set_random_master_port (#10104)
Co-authored-by: tchaton <thomas@grid.ai>
2021-10-25 12:09:05 +00:00
Danielle Pintz e94dcf6936
Mark `trainer.data_connector` as protected (#10031)
Co-authored-by: tchaton <thomas@grid.ai>
2021-10-25 12:29:09 +01:00
Carlos Mocholí f95ba20012
Do not use the base version by default in `_compare_version` (#10051) 2021-10-25 16:41:32 +05:30
thomas chaton 454e93bace
Add support for init_meta_context, materialize_module (#9920) 2021-10-21 15:48:31 +01:00
Alessio Bonfiglio 2a2fa5a56a
Group all the logged gradients under the same sub-folder (#7756) 2021-10-20 15:48:36 +00:00
Kaushik B 56bc55db71
Update strategy flag in docs (#10000)
Co-authored-by: Adrian Wälchli <aedu.waelchli@gmail.com>
Co-authored-by: Carlos Mocholi <carlossmocholi@gmail.com>
2021-10-20 21:02:53 +05:30
Adrian Wälchli 2c16f1d6b9
remove dataloader patching on the LightningModule (#9764)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: rohitgr7 <rohitgr1998@gmail.com>
Co-authored-by: Carlos Mocholí <carlossmocholi@gmail.com>
2021-10-20 15:23:20 +02:00
Carlos Mocholí ad8d6c83da
[CLI] Shorthand notation to instantiate datamodules (#10011)
Co-authored-by: Adrian Wälchli <aedu.waelchli@gmail.com>
2021-10-20 00:49:48 +00:00
Rohit Gupta 0aa220b46b
Remove deprecated `distributed_backend` from `Trainer` (#10017)
* rm distributed_backend from Trainer

* unused

* chlog

* internal distributed_backend

* Docstring

Co-authored-by: Carlos Mocholi <carlossmocholi@gmail.com>
2021-10-19 13:54:37 +00:00
Danielle Pintz 203737bfce
Don't raise DeprecationWarning for `LoggerConnector.gpus_metrics` (#9959) 2021-10-18 22:51:09 +00:00
Adrian Wälchli a99b7440b5
Add unit tests for `pl.utilities.grads` (#9765)
Co-authored-by: Carlos Mocholí <carlossmocholi@gmail.com>
2021-10-18 18:58:51 +05:30
ronif 7b4df7bf91
Fix issue with no-init dataclass fields in move_to_device (#9963)
Co-authored-by: ronif <ronif@users.noreply.github.com>
Co-authored-by: Adrian Wälchli <aedu.waelchli@gmail.com>
2021-10-17 07:10:47 +00:00
Kaushik B 5e8829b97d
(1/n) tests: Use strategy flag instead of accelerator for training strategies (#9931)
Co-authored-by: Carlos Mocholí <carlossmocholi@gmail.com>
2021-10-16 20:40:25 +05:30
Carlos Mocholí e973bcb76a
Use non-deprecated options in tests (#9949) 2021-10-15 16:58:07 -07:00
Carlos Mocholí db4e770004
Validate the precision input earlier (#9763) 2021-10-15 17:30:00 +00:00
ananthsub 28fc8d2016
Add `enable_model_summary` flag and deprecate `weights_summary` (#9699)
Co-authored-by: Adrian Wälchli <aedu.waelchli@gmail.com>
Co-authored-by: Kaushik B <45285388+kaushikb11@users.noreply.github.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Kaushik B <kaushikbokka@gmail.com>
2021-10-13 17:20:54 +05:30
Rohit Gupta db322f4bbb
Deprecate `checkpoint_callback` from the `Trainer` constructor in favour of `enable_checkpointing` (#9754)
* enable_chekpointing

* update codebase

* chlog

* update tests

* fix warning

* Apply suggestions from code review

Co-authored-by: ananthsub <ananth.subramaniam@gmail.com>

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

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

* Apply suggestions from code review

Co-authored-by: ananthsub <ananth.subramaniam@gmail.com>

* Apply suggestions from code review

Co-authored-by: ananthsub <ananth.subramaniam@gmail.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2021-10-12 07:55:07 +00:00
Rohit Gupta 4decbc0d95
Deprecate `dataloader_idx` from `on_train_batch_start/end` (#9816)
* deprecate hooks

* dep todo

* explicit

* Apply suggestions from code review

* Apply suggestions from code review

* code review

* base
2021-10-07 10:18:11 +00:00
Kaushik B f94faa9cd3
Enable auto parameters tying for TPUs (#9525)
Co-authored-by: Rohit Gupta <rohitgr1998@gmail.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-10-06 10:16:44 +02:00
thomas chaton 5841ca9782
[Feat] Add auto_restart for fault tolerant training (#9722) 2021-10-01 16:37:17 +00:00
Carlos Mocholí 7f95fd04d7
Remove unnecessary `pytest.param` usage (#9760) 2021-09-30 02:42:11 +00:00
Sean Naren 0df3543137
[2/n] Fix rich model summary for tuples (#9756) 2021-09-29 17:13:27 +00:00
Carlos Mocholí 0ddd6a8c19
Remove `_NATIVE_AMP_AVAILABLE` checks (#9747) 2021-09-29 15:34:26 +02:00
thomas chaton 131176b9f5
[bugfix] Prevent on_before_batch_transfer to be called twice (#9715)
Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com>
Co-authored-by: Carlos Mocholi <carlossmocholi@gmail.com>
2021-09-27 19:36:56 +00:00
four4fish 15cd6ad45b
Call TrainingTypePlugin collective functions directly instead of going through the Accelerator (#9677)
Co-authored-by: Adrian Wälchli <aedu.waelchli@gmail.com>
Co-authored-by: ananthsub <ananth.subramaniam@gmail.com>
Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com>
2021-09-27 14:52:57 +02:00
Rohit Gupta a4bc0acb02
Update warnings in `TrainingTricksConnector` (#9595)
* update warnings

* add tests

* comments

* Apply suggestions from code review

* Apply suggestions from code review
2021-09-25 16:02:26 +00:00
Danielle Pintz b3a5c7f442
Add `enable_progress_bar` to Trainer constructor (#9664) 2021-09-24 22:53:31 -07:00
thomas chaton 9148a13de0
Enable DataLoader state restoration for the evaluation loop (#9563)
Co-authored-by: Carlos Mocholi <carlossmocholi@gmail.com>
2021-09-24 16:21:00 +00:00
Daniel Stancl 568a1e0a68
Disallow invalid seed string values (#8787)
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-09-23 15:09:48 +00:00
Adrian Wälchli 87b11fbd9d
add legacy load utility (#9166)
Co-authored-by: Carlos Mocholí <carlossmocholi@gmail.com>
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>
2021-09-23 09:52:48 +00:00
Carlos Mocholí 3f7872d93a
[CLI] Shorthand notation to instantiate models (#9588) 2021-09-22 14:19:02 +00:00
Carlos Mocholí 61b4e33d94
[CLI] Avoid warning when `configure_optimizers` will not be overridden (#9583) 2021-09-21 14:25:07 +01:00
Carlos Mocholí cd8cb6076a
[CLI] Fix registry decorator return value (#9587) 2021-09-21 14:24:29 +01:00
thomas chaton 1bb5fccb71
[CLI] Shorthand notation to instantiate callbacks [3/3] (#8815)
Co-authored-by: Carlos Mocholi <carlossmocholi@gmail.com>
2021-09-17 17:54:06 +00:00
Carlos Mocholí bbcb977851
[CLI] Shorthand notation to instantiate optimizers and lr schedulers [2/3] (#9565) 2021-09-17 18:00:46 +01:00
Aki Nitta 11c93d903d
Fix `add_argparse_args` raising `TypeError` with Python 3.6 (#9554)
* Add test
* Accept TypeError for arg_type.__args__ being None

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2021-09-17 11:24:00 +02:00
Carlos Mocholí d2ca81b900
Minor CLI improvements [1/3] (#9553) 2021-09-16 15:04:51 +02:00
ananthsub 20ebb5ccc4
Reset datafetcher references in teardown (#9387)
* Free references to data fetcher in data connector teardown
2021-09-14 23:47:36 -07:00
Adrian Wälchli dddd3e9de2
add test for model weights equality when fault-tolerant training (#9481) 2021-09-13 12:33:48 +00:00
Kaushik B d773407e59
feat: Add ModelSummary Callback (#9344)
Co-authored-by: Ethan Harris <ewah1g13@soton.ac.uk>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2021-09-10 12:42:42 +00:00