Commit Graph

1050 Commits

Author SHA1 Message Date
Carlos Mocholí 48d3a10c9b
Add `OutputResult` [1/2] (#9437)
Co-authored-by: Adrian Wälchli <aedu.waelchli@gmail.com>
2021-09-14 15:48:27 +02:00
Sean Naren adaa2347f1
Handle collision of user argument when using ShardedDDP (#9512)
* Handle collision of user argument

* Add CHANGELOG.md
2021-09-14 12:20:36 +00:00
edward-io c784092013
deprecate flush_logs_every_n_steps on Trainer (#9366) 2021-09-14 11:27:56 +01:00
Sean Naren ec828b8267
Pass args to ShardedDataParallel (#9483) 2021-09-13 15:18:07 +00:00
ananthsub d2def369ec
[bugfix] Revert inference mode support from #8813 (#9443)
Fixes #9431
2021-09-10 14:33:56 -07:00
Danielle Pintz cc2ac02dd1
Move add_to_queue/get_from_queue to DDPSpawnPlugin (#9118)
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: ananthsub <ananth.subramaniam@gmail.com>
Co-authored-by: Adrian Wälchli <aedu.waelchli@gmail.com>
Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com>
2021-09-10 20:58:02 +00:00
Adrian Wälchli 6ff43cbff7
fix resuming from checkpoint for fault-tolerant in case of no failure (#9371)
Co-authored-by: Justus Schock <12886177+justusschock@users.noreply.github.com>
2021-09-10 17:25:46 +00:00
Jakub Kuszneruk ee3787216a
Adapt `NeptuneLogger` to new `neptune-client` api (#6867)
* Initial split to NeptuneLegacyLogger and NeptuneLogger

* Adapt NeptuneLogger to neptune-pytorch-lightning repo version

* Fix stylecheck and tests

* Fix style and PR suggestions

* Expect Run object in NeptuneLogger.init

* Model checkpoint support and restructured tests

* Reformat code - use " instead of '

* Fix logging INTEGRATION_VERSION_KEY

* Update CHANGELOG.md

* Fix stylecheck

* Remove NeptuneLegacyLogger

* updated neptune-related docstrings

* PR suggestions

* update CODEOWERS file
* move import logic to imports.py
* minor neptune.py improvements

* formatting fixes and minor updates

* Fix generation of docs

* formatting fixes and minor updates

* fix

* PR fixes vol. 2

* define return type of _dict_paths method
* bump required version of `neptune-client`

* Enable log_* functions

* Update pytorch_lightning/loggers/neptune.py

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

* Revert "Enable log_* functions"

This reverts commit 050a436899b7f3582c0455dc27b171335b85a3a5.

* Make global helper lists internal

* Logger's `name` and `version` methods return proper results

* Initialize Run and its name and id at logger init level

* Make _init_run_instance static

* Add pre-commit hook code changes.

* Fix blacken-docs check

* Fix neptune doctests and test_all

* added docs comment about neptune-specific syntax

* added docs comment about neptune-specific syntax in the loggers.rst

* fix

* Add pickling test

* added myself to neptune codeowners

* Enable some of deprecated log_* functions

* Restore _run_instance for unpickled logger

* Add `step` parameter to log_* functions

* Fix stylecheck

* Fix checkstyle

* Fix checkstyle

* Update pytorch_lightning/loggers/neptune.py

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

* Fix tests

* Fix stylecheck

* fixed project name

* Fix windows tests

* Fix stylechecks

* Fix neptune docs tests

* docformatter fixes

* De-duplicate legacy_kwargs_msg

* Update .github/CODEOWNERS

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

Co-authored-by: kamil-kaczmarek <kamil.kaczmarek@neptune.ml>
Co-authored-by: Adrian Wälchli <aedu.waelchli@gmail.com>
Co-authored-by: thomas chaton <thomas@grid.ai>
2021-09-10 18:48:58 +02: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
Carlos Mocholí e0f2e041b9
Share the training step output data via `ClosureResult` (#9349) 2021-09-10 11:40:20 +00:00
Kaushik B d028e36946
Add remove_checkpoint to CheckpointIO plugin to simplify ModelCheckpo… (#9373)
Co-authored-by: ananthsub <ananth.subramaniam@gmail.com>
Co-authored-by: Adrian Wälchli <aedu.waelchli@gmail.com>
Co-authored-by: ananthsub <ananth.subramaniam@gmail.com>
Co-authored-by: Adrian Wälchli <aedu.waelchli@gmail.com>
2021-09-10 11:55:04 +01:00
ananthsub c963bf6568
[loops] Reset reference to dataloader iterator on run end (#9386)
* [loops] Reset reference to dataloader iterator on run end
2021-09-10 04:18:58 +00:00
Danielle Pintz 160e7e1289
Deprecate LightningModule.get_progress_bar_dict (#8985)
* Move get_progress_bar_dict from lightning module to progress bar callback
2021-09-09 20:53:47 +00:00
Adrian Wälchli 089ae9b3e8
convert state to tuple explicitly when setting python random state (#9401)
* convert state to tuple explicitly

* update changelog
2021-09-09 19:27:28 +01:00
Artsiom 41ba639859
Fix logging of nan parameters (#9364)
* Fix logging of nan parameters
2021-09-09 00:39:23 +00:00
Binh Tang a079d7fccc
Enable inference mode for testing and predicting (#8813)
Co-authored-by: ananthsub <ananth.subramaniam@gmail.com>
2021-09-08 21:38:04 +00:00
Carlos Mocholí f239b96320
Fix `replace_sampler` missing the batch size under specific conditions (#9367) 2021-09-08 12:27:59 +02:00
Carlos Mocholí 15d943089d
Enforce that the optimizer closure is executed when `optimizer_step` is overridden (#9360) 2021-09-08 12:24:57 +02:00
Adrian Wälchli ca679cd78f
Add `ManualOptimization` loop (#9266)
Co-authored-by: Carlos Mocholí <carlossmocholi@gmail.com>
Co-authored-by: thomas chaton <thomas@grid.ai>
2021-09-08 02:26:39 +02:00
Sean Naren a79c351a6a
Add a warning to deepspeed when inferring batch size (#9221) 2021-09-07 16:24:00 +00:00
Carlos Mocholí 6892d533ea
Run plugin closure before `on_before_optimizer_step` [1/2] (#9288)
Co-authored-by: Adrian Wälchli <aedu.waelchli@gmail.com>
2021-09-07 11:52:20 +00:00
thomas chaton 9149b64908
[bugfix] Resolve PyTorch Profiling for Manual Optimization (#9316)
Co-authored-by: Carlos Mocholí <carlossmocholi@gmail.com>
2021-09-06 10:45:34 +00:00
Roger Shieh 904dde7573
Fix inspection of unspecified args for container hparams (#9125)
* Update parsing.py

* add todo (for single arg)

* unblock non container single arg

* init test

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

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

* Update CHANGELOG.md

* pep8 line length

* Update pytorch_lightning/utilities/parsing.py

* remove dict namespace conversion

* add omegaconf support

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

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

* add dict test

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

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

* add omegaconf test

* Update CHANGELOG.md

* Update pytorch_lightning/utilities/parsing.py

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

* Update pytorch_lightning/utilities/parsing.py

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>
Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com>
2021-09-06 09:48:11 +00:00
Adrian Wälchli 50198d7483
fix progress bar restart with fault-tolerant training enabled (#9310)
* reset progress updates
* update docs
* add test

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2021-09-06 10:43:59 +02:00
Kaushik B dc3391beae
Remove deprecation warnings being called for `on_{task}_dataloader` (#9279)
* Avoid deprecation warnings being called when hooks are not implemented
* Update tests & changelog
* Apply suggestions from code review

Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com>
2021-09-06 10:03:30 +02:00
Danielle Pintz 912fd31131
Deprecate on_keyboard_interrupt callback hook (#9260)
* add on_exception callback hook

* deprecate on_keyboard_interrupt

* Apply suggestions from code review

* raise keyboard interrupt

* Delete cluster

* update changelog

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>
Co-authored-by: Adrian Wälchli <aedu.waelchli@gmail.com>
Co-authored-by: Carlos Mocholí <carlossmocholi@gmail.com>
2021-09-06 09:57:00 +02:00
Carlos Mocholí 49c0485d50
Avoid optional `Tracker` attributes and enable mypy (#9320) 2021-09-06 00:20:44 +00:00
thomas chaton f6d40871bd
Prevent loss to be moved to the cpu before backward call. (#9308) 2021-09-03 16:26:26 +00:00
Carlos Mocholí d5ee8d8e3f
Disable `{save,check}_on_train_epoch_end` with `check_val_every_n_epoch>1` (#9156) 2021-09-03 14:27:44 +00:00
Carlos Mocholí f745aa9ce1
Move tracking epoch end outputs logic to the `EvaluationEpochLoop` (#9261) 2021-09-03 15:02:34 +02:00
Adrian Wälchli b91747ef75
remove backward from training batch loop (#9265) 2021-09-03 00:15:40 +00:00
Carlos Mocholí 1e08b044ec
Allow easy CLI trainer re-instantiation (#9241)
* Allow easy CLI trainer re-instantiation

* Update CHANGELOG

* Allow passing any trainer argument

* Do not modify the previous config
2021-09-03 00:56:30 +02:00
B. Kerim Tshimanga f0788b3bbc
scheduled removal of auto_move_data decorator (#9231)
* scheduled removal of auto_move_data decorator

* update CHANGELOG.md

* remove unused import

* remove test_decorators.py

* fix missed merge conflict

Co-authored-by: thomas chaton <thomas@grid.ai>
2021-09-03 00:54:36 +02:00
Himanshu Dutta 5fbf04a145
DataModule compatiblity with Python dataclass (#9039)
* added support and checks required for use of datamodule as python dataclass
* made changes required for dataclass support for LightningDataModule and required tests
* made the code compliant with future releases
* edited tests - removed training call. left dataclass decorator to defaults.
* added tests to check for multilevel inheritence and make sure init isn't called on the parent of defined class
* modified __new__ to ensure calling of init on LightningDataModule impliciltly
* added relevant tests for multilevel inheritence cases
* removed default values from tests

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>
2021-09-03 00:43:38 +02:00
four4fish 69cdb79e33
Add check for uninitialized _sync_dir in DDP Plugin to avoid errors during error handling (#9267) 2021-09-02 14:14:47 -07:00
Adrian Wälchli 75350938ca
extract optimizer loop (#9191) 2021-09-02 12:40:05 +01:00
four4fish a451997c4d
Avoid wrapping LightningModule in DDP plugins when not fitting (#9096)
* Avoid wrapping LightningModule in DDP plugins when not fitting

* Avoid wrapping LightningModule in DDP plugins when not fitting
2021-09-02 02:23:59 +00:00
Pavel Grunt e2ecb8f859
Allow exporting to onnx when input is tuple (#8800)
Fixes #8799
2021-09-02 03:36:20 +02:00
B. Kerim Tshimanga 35876bb75f
remove lightning module datamodule property (#9233)
Co-authored-by: thomas chaton <thomas@grid.ai>
2021-09-02 00:43:47 +02:00
Ethan Harris f9994d456c
Update CHANGELOG following patch release (#9255) 2021-09-01 21:56:44 +02:00
B. Kerim Tshimanga 65b3dc4495
scheduled removal of DeepSpeedPlugin.cpu_offload* parameters (#9244) 2021-09-01 12:02:30 +02:00
Danielle Pintz b046bd0670
Add on_exception callback hook (#9183) 2021-09-01 10:49:00 +02:00
thomas chaton ff7305f74d
[bugfix] Prevent a DDP failure using copy (#9239) 2021-08-31 21:02:33 +00:00
Kaushik B f21f1bedf2
Deprecate `process_position` from the Trainer constructor (#9222) 2021-08-31 15:14:23 +00:00
B. Kerim Tshimanga f6614b370c
scheduled removal of BaseProfiler.output_filename in favor of dirpath… (#9214) 2021-08-31 09:30:43 +00:00
Soham Tiwari 861f8afeea
[bugfix] Changed CometLogger to stop modifying metrics in place (#9150)
Co-authored-by: Adrian Wälchli <aedu.waelchli@gmail.com>
Co-authored-by: Carlos Mocholí <carlossmocholi@gmail.com>
2021-08-31 08:21:16 +00:00
B. Kerim Tshimanga 07ee8fc9a0
Remove deprecated property `ModelCheckpoint.period` in favor of `ModelCheckpoint.every_n_epochs` (#9213) 2021-08-31 10:04:29 +02:00
B. Kerim Tshimanga 34053ef85e
Remove deprecated `Trainer.running_sanity_check` (#9209) 2021-08-31 01:44:33 +02:00
Adrian Wälchli 908b9eebc7
move `block_ddp_sync_behaviour` to utilities (#9192) 2021-08-30 14:56:16 +00:00
B. Kerim Tshimanga f79993a705
removing legacy profiler arg (#9178)
Co-authored-by: Adrian Wälchli <aedu.waelchli@gmail.com>
2021-08-30 09:37:09 +00:00