Commit Graph

86 Commits

Author SHA1 Message Date
Danielle Pintz 5da065e287
Remove `is_global_zero` check in `training_epoch_loop` (#12134) 2022-03-02 02:05:14 +00:00
Carlos Mocholí 6309a59c3c
Do not prefetch when possible (#12101) 2022-02-28 18:31:18 +00:00
Carlos Mocholí db1c709519
Clean loop fetching usage (#12103) 2022-02-28 10:51:33 +00:00
Akash Kwatra 7e2f9fbad5
Refactor codebase to use `trainer.loggers` over `trainer.logger` when needed (#11920) 2022-02-25 16:01:04 -08:00
Carlos Mocholí 963adc7857
Small cleanup when dataloader states are saved (#11843) 2022-02-16 20:57:21 +00:00
Carlos Mocholí 1515ef90ee
Revert saving the dataloader and result collection by default (#11842) 2022-02-10 20:43:35 +01:00
Carlos Mocholí 789fae828d
Fix `current_epoch` value on training end (#8578)
Co-authored-by: Adrian Wälchli <aedu.waelchli@gmail.com>
2022-02-10 17:55:59 +01:00
ananthsub a64438c897
Centralize rank_zero_only utilities into their own module (#11747)
* Centralize rank_zero_only utilities into their own module

Fixes #11746

* PossibleUserWarning

* Update test_warnings.py

* update imports

* more imports

* Update CHANGELOG.md

* Update mlflow.py

* Update cli.py

* Update api_references.rst

* Update meta.py

* add deprecation tests

* debug standalone

* fix standalone tests

* Update CHANGELOG.md
2022-02-07 08:09:55 +00:00
Rohit Gupta 76175217e4
Fix val_loop run on restart (#11552)
Co-authored-by: Carlos Mocholí <carlossmocholi@gmail.com>
2022-02-02 20:19:34 +00:00
Carlos Mocholí a44881cd90
Changes in preparation to #8578 (#11562) 2022-02-02 19:57:08 +00:00
Carlos Mocholí 62818dbace
Use a dataclass as the scheduler config (#11443) 2022-01-18 20:23:32 +01:00
Carlos Mocholí 9cf9ded73b
Simplify data fetching (#11466) 2022-01-17 14:46:55 +00:00
Carlos Mocholí 18bbb39eef
Set `Loop.restarting` recursively (#11442)
* Set `Loop.restarting` recursively
* Docs
* CHANGELOG
* Update pytorch_lightning/loops/epoch/training_epoch_loop.py
Co-authored-by: Aki Nitta <nitta@akihironitta.com>
2022-01-14 19:25:23 +09:00
Rohit Gupta 82c8875f33
Add `LightningModule.lr_scheduler_step` (#10249)
Co-authored-by: Carlos Mocholi <carlossmocholi@gmail.com>
2022-01-12 03:53:49 +00:00
Carlos Mocholí 59a7ba7605
Move `epoch_{start,end}` hooks from `TrainingEpochLoop` to `FitLoop` (#11201) 2022-01-06 15:13:18 +00:00
Carlos Mocholí 5ac129e95a
Rename ttp -> strategy (#11312) 2022-01-05 12:12:25 +01:00
Carlos Mocholí e9009d6058
Reset the total fit-validation batch progress on epoch (#11244) 2022-01-04 12:04:20 +01:00
Rohit Gupta 98ea79b8b0
Add `opt_idx` to scheduler config if not assigned by user (#11247)
Co-authored-by: Carlos Mocholí <carlossmocholi@gmail.com>
2022-01-04 14:57:15 +09:00
four4fish cf5ef32f7b
Deprecate Trainer.training_type_plugin in favor of trainer.strategy (#11141)
Co-authored-by: Adrian Wälchli <aedu.waelchli@gmail.com>
2021-12-22 02:11:43 +00:00
Danielle Pintz f95976d602
rename _call_ttp_hook to _call_strategy_hook (#11150) 2021-12-18 17:53:03 -08:00
Carlos Mocholí 8508cce37d
Mark all result classes as protected (#11130) 2021-12-17 19:35:17 +00:00
Carlos Mocholí dbb7f56b35
Deprecate `Trainer.verbose_evaluate` (#10931) 2021-12-17 19:26:32 +01:00
Carlos Mocholí fa6d17c96f
Fix typing for utilities.warnings (#11115) 2021-12-17 15:07:27 +01:00
Danielle Pintz 06c5903600
Simplify several profile calls (#11031) 2021-12-14 19:49:19 +00:00
Carlos Mocholí 99adc45af1
Follow-up changes to #10575 (#10957)
Co-authored-by: Adrian Wälchli <aedu.waelchli@gmail.com>
2021-12-07 15:27:52 +01:00
Danielle Pintz 6043179931
Re-design `call_hook` interface (#10575) 2021-12-04 16:39:55 -05:00
Carlos Mocholí a28b4cd0c0
Sort out the dataloader idx logic for evaluation (#10923)
Co-authored-by: Adrian Wälchli <aedu.waelchli@gmail.com>
2021-12-03 20:01:46 +00:00
Carlos Mocholí 0061619e0a
Improve typing for loops (#10780) 2021-11-30 20:28:55 +00:00
four4fish 8bf7f9cce7
1/n Move Accelerator into strategy - move batch_to_device to strategy (#10649)
* 1/n Integrate Device Specific Accelerator Logic with strategy - move batch_to_device to strategy

* add changelog

* add model is not none check

* Apply suggestions from code review

Co-authored-by: thomas chaton <thomas@grid.ai>
Co-authored-by: Carlos Mocholí <carlossmocholi@gmail.com>

* Update CHANGELOG.md

* Update test_datamodules.py

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

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

* Update test_hooks.py

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

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

* Update dp.py

Co-authored-by: thomas chaton <thomas@grid.ai>
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-11-29 12:11:21 -08:00
Carlos Mocholí 31bb6e69ca
Avoid optional instances in Loops (#10735)
* Avoid optional instances in Loops

* More cleanup
2021-11-26 18:00:18 +00:00
Carlos Mocholí ae53562c97
Remove dead code in `TrainingEpochLoop` (#10750) 2021-11-26 17:49:00 +00:00
thomas chaton 3d6262b7a9
Fault Tolerant Manual: Add support for DDP (#10638) 2021-11-25 18:31:53 +01:00
Rohit Gupta ec27313be2
Fix batch size extraction when set by the user in `LightningModule.log` (#10408)
Co-authored-by: Carlos Mocholi <carlossmocholi@gmail.com>
2021-11-19 16:48:26 +00:00
Gili Tzabari a967b6eba0
del iterator on_run_end() (#9915) 2021-10-29 16:29:44 +00:00
Danielle Pintz 38090e47d7
Small code simplification in `training_epoch_loop.py` (#10146)
Co-authored-by: Adrian Wälchli <aedu.waelchli@gmail.com>
2021-10-26 13:22:36 +02:00
Danielle Pintz 13d6d7bad1
Remove `optimizer_connector.py` (#10120) 2021-10-26 00:52:43 +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
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í e44921ee21
Fix `self.log(on_epoch=True, reduce_fx=sum)` on_batch_start (#9791) 2021-10-20 01:56:37 +02:00
Carlos Mocholí c69a79c86f
Fix `self.log(on_epoch=True)` on_batch_start (#9780) 2021-10-18 14:02:16 +02: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
thomas chaton 5841ca9782
[Feat] Add auto_restart for fault tolerant training (#9722) 2021-10-01 16:37:17 +00:00
thomas chaton fa44dbcd9e
[Refactor] Simplify data loading logic around replacing sampler to prevent confusion (#9721)
Co-authored-by: Carlos Mocholi <carlossmocholi@gmail.com>
2021-09-28 17:04:02 +00:00
Carlos Mocholí 198aa852ef
Remove `training_epoch_end` outputs check (#9719)
Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com>
2021-09-28 14:21:46 +00:00
Carlos Mocholí bc50591d49
reduce loop structure leakage into the `TrainingEpochLoop` (#9490)
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-09-28 13:22:22 +00:00
Adrian Wälchli 5395cebc51
move get_active_optimizers to utilities (#9581) 2021-09-25 13:17:47 +02:00
Carlos Mocholí d02fc2b728
Rename `reset_on_epoch` to `reset_on_run` (#9658) 2021-09-25 04:27:54 +02:00
Carlos Mocholí ce00053002
Support skipping to validation (#9681)
Co-authored-by: Adrian Wälchli <aedu.waelchli@gmail.com>
2021-09-24 14:10:25 +00:00
Carlos Mocholí 8dcba38e0e
Add `is_last_batch` to progress tracking (#9657) 2021-09-23 12:54:41 +00:00
thomas chaton 89ab2470c1
[Refactor] 1/2 Move reset_on_restart within the loop reset (#9561)
Co-authored-by: Carlos Mocholi <carlossmocholi@gmail.com>
2021-09-17 16:11:32 +00:00