Commit Graph

484 Commits

Author SHA1 Message Date
Carlos Mocholí a7aed2af7a
[CLI] Add support for `ReduceLROnPlateau` (#10860) 2021-12-01 15:41:22 +00:00
Carlos Mocholí 0061619e0a
Improve typing for loops (#10780) 2021-11-30 20:28:55 +00:00
Abhinav Arora f63222d966
Remove references to torchtext.legacy from PyTorch Lightning (#10724)
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>
2021-11-30 19:32:07 +00:00
Carlos Mocholí d3b7492bd0
[CLI] Add support for `--key.help=class` (#10767) 2021-11-29 14:12:53 +00:00
thomas chaton e94aff1c5b
Fault Tolerant: Add support for fault tolerant dataloader validator (#10465) 2021-11-26 19:33:47 +00:00
Carlos Mocholí 88930725dd
Add a custom `PossibleUserWarning` category (#10675) 2021-11-26 19:29:42 +00:00
thomas chaton 412d507a73
Fault Tolerant: move signal to SIGTERM (#10605) 2021-11-26 13:37:27 +00:00
Kaushik B e507bc9027
Fix compare version for packages (#10762) 2021-11-26 09:15:22 +00:00
thomas chaton 3d6262b7a9
Fault Tolerant Manual: Add support for DDP (#10638) 2021-11-25 18:31:53 +01:00
Kaushik B e0b4bb2ea3
Deprecate `DeviceType` in favor of `_AcceleratorType` (#10503)
Co-authored-by: Carlos Mocholí <carlossmocholi@gmail.com>
2021-11-25 16:41:03 +01:00
Danielle Pintz 85d7c4dce4
Configure mypy to install dependencies in CI and update pyproject.toml (#10682)
* mypy install deps

* fix deps

* add examples

* fix type errors

* fix type error

* fix

* fix

* update pyproject.toml
2021-11-25 00:19:30 +00:00
Carlos Mocholí f8b2d5b128
Improve error message on `TypeError` during `DataLoader` reconstruction (#10719) 2021-11-24 21:51:11 +00:00
thomas chaton 0066ff0129
Fault Tolerant Manual: Enable the feature (#10707) 2021-11-24 17:36:08 +00:00
Adrian Wälchli 30ec4815cb
Support re-instantiation for custom DataLoader in Lightning (#10680)
Co-authored-by: Justus Schock <12886177+justusschock@users.noreply.github.com>
2021-11-24 15:58:51 +01:00
thomas chaton e51a8ee7a3
Fault Tolerant Manual: utilities cleanup (#10703)
Co-authored-by: Kaushik B <45285388+kaushikb11@users.noreply.github.com>
Co-authored-by: Carlos Mocholi <carlossmocholi@gmail.com>
2021-11-24 15:01:55 +01:00
thomas chaton b28ab34ff5
Fault Tolerant Manual: Add loading to reload the states (#10699)
Co-authored-by: Kaushik B <45285388+kaushikb11@users.noreply.github.com>
Co-authored-by: Carlos Mocholi <carlossmocholi@gmail.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2021-11-23 17:18:36 +00:00
thomas chaton 7cf6374bd0
Fault Tolerant Manual: Add support for collecting states across processes (#10639) 2021-11-23 14:27:33 +00:00
thomas chaton 1702036c14
Fault Tolerant Manual: Add stateful dataloader iter (#10674) 2021-11-23 12:30:50 +00:00
thomas chaton 2036dfb5df
Fault Tolerant Manual: Add _rotate_worker_indices utility (#10647) 2021-11-22 19:52:04 +00:00
thomas chaton 6acfef680f
Fault Tolerant Manual: Add is_obj_stateful utility (#10646) 2021-11-22 18:48:32 +00:00
Rohit Gupta d431ce14a1
Raise an error if batch_size cannot be inferred from current batch (#10541)
Co-authored-by: Carlos Mocholí <carlossmocholi@gmail.com>
2021-11-22 16:55:19 +00:00
thomas chaton 991cd895c6
1/n Add `FaultTolerantMode` (#10645) 2021-11-22 14:58:23 +00:00
Kaushik B ce0a977742
Moved `env_vars_connector._defaults_from_env_vars` to `utilities.argsparse._defaults_from_env_vars` (#10501)
Co-authored-by: Carlos Mocholí <carlossmocholi@gmail.com>
2021-11-22 08:06:35 +00:00
Mauricio Villegas 5d748e560b
LightningCLI changes for jsonargparse>=4.0.0 (#10426)
Co-authored-by: Carlos Mocholí <carlossmocholi@gmail.com>
Co-authored-by: thomas chaton <thomas@grid.ai>
2021-11-19 17:03:14 +00: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
Adrian Wälchli 8950354fe4
Extract dataloader utilities from `TrainerDataLoadingMixin` (#10145) 2021-11-19 12:45:35 +00:00
Adrian Wälchli 085e82f454
Introduce `ClusterEnvironment.detect()` (#10564)
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-19 12:24:10 +00:00
Carlos Mocholí 0fa07da987
Fail the test when a `DeprecationWarning` is raised (#9940) 2021-11-17 23:41:50 +01:00
thomas chaton 1de3539eac
Resolve instantiation problem with init_meta_context (#10493) 2021-11-15 19:13:01 +00:00
Kaushik B 01cf7a2ac5
Deprecate `DistributedType` in favor of `StrategyType` (#10505) 2021-11-15 17:10:08 +00:00
Shivam Mehta 794c4b08c0
Remove deprecated `is_overridden(model=...)` (#10507)
Co-authored-by: Carlos Mocholí <carlossmocholi@gmail.com>
2021-11-15 12:56:30 +00:00
Carlos Mocholí 7a9a08c5d3
Drop torch 1.6 testing (#10390)
* Drop torch 1.6 support

* Drop 1.6 support

* Update CHANGELOG

* Fixes

* Split change

* Undo change

* 1.7 -> 1.7.1

https://github.com/pytorch/pytorch/issues/47354

* Force trigger nightly

* Update .github/workflows/events-nightly.yml

Co-authored-by: Aki Nitta <nitta@akihironitta.com>

* Revert 1.7.1 change - try wildcard

* Update adjust versions and test it

* Undo test changes

* Revert "Undo test changes"

This reverts commit 3a6acadd11.

* Update CHANGELOG.md

Co-authored-by: Aki Nitta <nitta@akihironitta.com>
2021-11-13 20:35:03 +00:00
Kaushik B fabb364402
Remove deprecated `mode` argument from ModelSummary (#10449)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2021-11-12 19:32:43 +00:00
Kaushik B d577f461a4
Remove deprecated `utilities.distributed.rank_zero_{warn,deprecation}` (#10451) 2021-11-10 07:35:48 -08:00
a-gardner1 ce149f6451
Fix support for dataclasses with ClassVar/InitVar in `apply_to_collection` (#9702)
Co-authored-by: Adrian Wälchli <aedu.waelchli@gmail.com>
Co-authored-by: Carlos Mocholi <carlossmocholi@gmail.com>
2021-11-10 04:42:27 +00:00
Carlos Mocholí ebab4be3e4
Remove deprecated `DeviceDtypeModuleMixin` import (#10442) 2021-11-09 18:35:53 +00:00
thomas chaton 7fb277f260
Resolve workers being forcelly deleted with `persistent_workers=True` (#10434)
Co-authored-by: Carlos Mocholi <carlossmocholi@gmail.com>
2021-11-09 14:58:31 +00:00
four4fish 0ed5e3dc8a
Raise exceptions when torch distributed is not available (#10418)
* Raise exceptions when torch distributed is not avalible

* add changelog
2021-11-09 09:11:05 +00:00
Adrian Wälchli a270a79ed9
Rename "master" methods to "main" in ClusterEnvironment plugins (#10103)
* rename occurrences of master port, master address, maser node, master process

* rename properties

* add property decorators

* occurrences in docs

* update changelog

* update changelog

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

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

* add lost method

* create deprecation

* add changelog

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

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

* fix typo (but it was already there!!!)

* Apply suggestions from code review

Co-authored-by: Justus Schock <12886177+justusschock@users.noreply.github.com>

* add todo

* update more occurences

* add types

* add missing import

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Justus Schock <12886177+justusschock@users.noreply.github.com>
2021-11-08 12:32:58 +00:00
Adrian Wälchli 348fc4b49f
Move device parser utility function (#10230)
* move parser function to utils

* fix types

* keep static method

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

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

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2021-11-05 10:18:56 +00:00
puhuk 412f0a4d24
Remove deprecated dataloader arguments in Trainer methods (#10325)
Co-authored-by: Carlos Mocholi <carlossmocholi@gmail.com>
2021-11-04 11:03:39 +01:00
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 f44b8a7aab
protect ByteCounter (#10300) 2021-11-02 08:35:40 +00:00
Adrian Wälchli 3cd65b592b
Lightning Lite Examples (#9987)
Co-authored-by: Kaushik B <kaushikbokka@gmail.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Justus Schock <12886177+justusschock@users.noreply.github.com>
Co-authored-by: SeanNaren <sean@grid.ai>
Co-authored-by: Kaushik B <45285388+kaushikb11@users.noreply.github.com>
Co-authored-by: thomas chaton <thomas@grid.ai>
Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com>
Co-authored-by: four4fish <88516121+four4fish@users.noreply.github.com>
Co-authored-by: Nicki Skafte Detlefsen <skaftenicki@gmail.com>
Co-authored-by: Carlos Mocholi <carlossmocholi@gmail.com>
Co-authored-by: Pietro Lesci <61748653+pietrolesci@users.noreply.github.com>
2021-11-02 08:04:29 +00:00
Rohit Gupta e4ee6df196
Add warning if multiple batch_sizes are found from ambiguous batch (#10247) 2021-11-01 19:50:30 +00:00
four4fish d56e041635
Update init_ddp_connection's name and log (#10295) 2021-11-01 19:11:15 +00:00
victorjoos cc0e9f96a8
Add support for empty `gpus` list to run on CPU (#10246)
Co-authored-by: rohitgr7 <rohitgr1998@gmail.com>
2021-11-01 18:37:38 +00:00
Mauricio Villegas 828b5315aa
Allow separate config files for parameters with class type when LightningCLI is in subclass_mode=False (#10286) 2021-11-01 17:24:31 +00:00
Rohit Gupta b77aa718de
Changed the model size calculation using `ByteCounter` (#10123) 2021-11-01 16:42:14 +00:00