Commit Graph

116 Commits

Author SHA1 Message Date
Jirka Borovec f67892ea96
CI: yesqa (#8564)
* add yesqa
* fix flake8

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2021-08-02 16:05:56 +00:00
Carlos Mocholí e63968ab88
Add `pyupgrade` to `pre-commit` (#8557)
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` (#7783)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2021-07-26 13:37:35 +02:00
Ethan Harris 52526c20b5
Add support for functions to be parsed by the Lightning CLI in addition to Types (#8400)
* 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
Jirka Borovec abbcfa1ab7
fix CI for PT 1.10 (#8526)
* 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
Jirka Borovec 74a09a23f1
CI: support PT 1.10 (#8133)
* prepare PT 1.10

* dockers

* fixes

* readme
2021-07-14 18:04:33 +03:00
Carlos Mocholí 6ce77a102b
Set minimum PyTorch version to 1.6 (#8288)
Co-authored-by: Jirka <jirka.borovec@seznam.cz>
2021-07-13 17:12:49 +00:00
Carlos Mocholí 1efd6d20ac
Remove pep8speaks (#8392) 2021-07-13 15:19:24 +00:00
Carlos Mocholí c5a120ed9d
Update to Mypy>0.9 (#8386) 2021-07-13 08:23:36 +02:00
Ethan Harris e5732a1158
Temporarily pin sphinx version (#8377) 2021-07-12 09:35:44 +00:00
Mauricio Villegas 7d3452a000
LightningCLI documentation improvements (#8303)
Co-authored-by: Adrian Wälchli <aedu.waelchli@gmail.com>
2021-07-08 12:35:26 +05:30
Kaushik B 5cef9772a4
Add tests for GCS filesystem (#7946) 2021-07-05 12:16:32 +00:00
Mauricio Villegas 3c74502919
Add support for optimizers and learning rate schedulers to LightningCLI (#8093)
Co-authored-by: Carlos Mocholi <carlossmocholi@gmail.com>
Co-authored-by: Adrian Wälchli <aedu.waelchli@gmail.com>
2021-07-01 12:04:11 +02:00
Carlos Mocholí 2c43bfc5ef
GPU CI - run torch 1.8 (LTS) (#8116) 2021-06-24 16:56:43 +00:00
Jirka Borovec 7978a5376d
Ipynb update (#8004)
* git submodule update --remote

* update notebooks in docs

* prune

* _notebooks

* docs

* path

* path

* ignore

* head
2021-06-17 16:46:05 +02:00
Jirka Borovec cca0e7535a
remove parsing comments (#7958)
* remove parsing comments
* \s

Co-authored-by: Carlos Mocholí <carlossmocholi@gmail.com>
2021-06-14 14:24:48 +00:00
Mauricio Villegas cdd01f32da
LightningCLI support for argument links applied on instantiation (#7895)
Co-authored-by: Carlos Mocholí <carlossmocholi@gmail.com>
2021-06-12 13:13:14 +02:00
Jirka Borovec 0fda862274
Refactor notebooks (#7752)
* drop notebooks

* add submodule

* copy notebooks

* docs include ipynb

* fix headers

* CI

* readthedocs

* manifest

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

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

* req

* workdir

* pandoc

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

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

* pandoc

* manifest

* Apply suggestions from code review

* fix versions

* checkout

* `git submodule update --init --recursive --remote`

* notebooks @docs

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2021-06-08 16:30:13 +00:00
Mauricio Villegas f34584001c
Fix support for torch Module type hints in LightningCLI (#7807)
* Fixed support for torch Module type hints in LightningCLI

* - Fix issue with serializing values when type hint is Any.
- Run unit test only on newer torchvision versions in which the base class is Module.

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

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

* Minor change

* Update CHANGELOG.md

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: Carlos Mocholí <carlossmocholi@gmail.com>
2021-06-04 07:43:43 +02:00
Aki Nitta 71c1017092
Update sphinx version to 4.0 or later (#7716) 2021-05-26 11:33:24 +02:00
Mauricio Villegas d0081778f8
Enable fsspec by default for cli config file (#7521)
Co-authored-by: Adrian Wälchli <aedu.waelchli@gmail.com>
2021-05-17 08:53:00 +01:00
Akihiro Nitta 6d82dc832b
Pin `Sphinx<4.0` (#7456)
* Dont use sphinx 4.0.0

* Dont use sphinx 4.0.0

* Update comment

* Simple 

There is no other release between 3.5 and 4.0

Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com>
2021-05-10 10:27:37 +02:00
Jirka Borovec 626ef08694
enable Dockers for PT 1.9 (#7363)
* enable PT 1.9

* fix versions

* args

* fix
2021-05-05 14:26:22 +02:00
Carlos Mocholí c6a171b776
Fix requirements/adjust_versions.py (#7149)
Co-authored-by: jirka <jirka.borovec@seznam.cz>
2021-05-04 01:06:28 +02:00
Mauricio Villegas 78a6fd5588
Example and documentation for LightningCLI linking model and data arguments (#7299)
Co-authored-by: Adrian Wälchli <aedu.waelchli@gmail.com>
2021-05-03 20:45:46 +00:00
Mauricio Villegas b0cd9daf25
Simplify backbone_image_classifier example (#7246)
Co-authored-by: Carlos Mocholí <carlossmocholi@gmail.com>
Co-authored-by: Adrian Wälchli <aedu.waelchli@gmail.com>
Co-authored-by: ananthsub <ananth.subramaniam@gmail.com>
2021-04-28 23:52:28 +00:00
Mauricio Villegas 78d45a1134
Improve `LightningCLI` documentation and tests (#7156)
* - Added cli unit tests for help, print_config and submodules.
- Added to cli documentation use of subclass help and print_config, submodules and other minor improvements.
- Increased minimum jsonargparse version required for new documented features.

* Improvements to lightning_cli.rst

* Add check for all trainer parameters in test_lightning_cli_help

* Increased minimum jsonargparse version

Co-authored-by: Carlos Mocholí <carlossmocholi@gmail.com>
2021-04-28 09:34:32 +01:00
Sean Naren 8439aead66
Update FairScale on CI (#7017)
* Try updating CI to latest fairscale

* Update availability of imports.py

* Remove some of the fairscale custom ci stuff

* Update grad scaler within the new process as reference is incorrect for spawn

* Remove fairscale from mocks

* Install fairscale 0.3.4 into the base container, remove from extra.txt

* Update docs/source/conf.py

* Fix import issues

* Mock fairscale for docs

* Fix DeepSpeed and FairScale to specific versions

* Swap back to greater than

* extras

* Revert "extras"

This reverts commit 7353479f

* ci

Co-authored-by: Carlos Mocholí <carlossmocholi@gmail.com>
Co-authored-by: jirka <jirka.borovec@seznam.cz>
2021-04-23 12:37:00 +01:00
Jirka Borovec f48ac62334
fix pip install (#7170) 2021-04-22 16:48:11 -04:00
Jirka Borovec ef5feac7ba
fix version + yapf (#6999) 2021-04-22 18:25:51 +00:00
Carlos Mocholí d6470bf193
Delete unused CI scripts (#7152) 2021-04-22 03:07:48 +02:00
Mauricio Villegas f852a4f592
Changed basic_examples to use `LightningCLI` (#6862)
Co-authored-by: Carlos Mocholi <carlossmocholi@gmail.com>
2021-04-15 15:01:16 +00:00
Ethan Harris f645df5e9a
Add typings for evaluation_loop.py and remove some dead code (#7015) 2021-04-15 07:36:04 +00:00
Jirka Borovec da1ac3a530
update docker base on PT 1.7 (#6931)
* update docker base on PT 1.7

* fix path
2021-04-13 10:06:06 +01:00
Sean Naren b46cc557ef
[Feat] DeepSpeed single file saving (#6900)
* Add single checkpoint capability

* Fix checkpointing in test, few cleanups

* Add comment

* Change restore logic

* Move vars around, add better explanation, make todo align with DeepSpeed team

* Fix checkpointing

* Remove deepspeed from extra, install in Dockerfile

* push

* pull

* Split to two tests to see if it fixes Deepspeed error

* Add comment
2021-04-12 22:44:09 +00:00
Mauricio Villegas b7f3a3c421
Simple reproducibility with minimum boilerplate CLI training with `LightningCLI` (#4492)
Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com>
Co-authored-by: Carlos Mocholí <carlossmocholi@gmail.com>
2021-04-06 14:19:11 +01:00
thomas chaton 1302766f83
DeepSpeed ZeRO Update (#6546)
* Add context to call hook to handle all modules defined within the hook

* Expose some additional parameters

* Added docs, exposed parameters

* Make sure we only configure if necessary

* Setup activation checkpointing regardless, saves the user having to do it manually

* Add some tests that fail currently

* update

* update

* update

* add tests

* change docstring

* resolve accumulate_grad_batches

* resolve flake8

* Update DeepSpeed to use latest version, add some comments

* add metrics

* update

* Small formatting fixes, clean up some code

* Few cleanups

* No need for default state

* Fix tests, add some boilerplate that should move eventually

* Add hook removal

* Add a context manager to handle hook

* Small naming cleanup

* wip

* move save_checkpoint responsability to accelerator

* resolve flake8

* add BC

* Change recommended scale to 16

* resolve flake8

* update test

* update install

* update

* update test

* update

* update

* update test

* resolve flake8

* update

* update

* update on comments

* Push

* pull

* Update pytorch_lightning/plugins/training_type/deepspeed.py

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

* Update pytorch_lightning/plugins/training_type/deepspeed.py

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

* update

* Apply suggestions from code review

* Swap to using world size defined by plugin

* update

* update todo

* Remove deepspeed from extra, keep it in the base cuda docker install

* Push

* pull

* update

* update

* update

* update

* Minor changes

* duplicate

* format

* format2

Co-authored-by: SeanNaren <sean@grid.ai>
Co-authored-by: Adrian Wälchli <aedu.waelchli@gmail.com>
Co-authored-by: Sean Naren <sean.narenthiran@gmail.com>
Co-authored-by: Carlos Mocholi <carlossmocholi@gmail.com>
Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com>
Co-authored-by: Jirka Borovec <jirka.borovec@seznam.cz>
2021-03-30 13:39:02 -04:00
Jirka Borovec 5b5a5cc80b
support python 3.9 (#4944)
* support python 3.9

* update CI

* onnxruntime

* .

* .

* onnxruntime

* t 55

* t 75

* add script

* use

* onnx

* onnx

* onnx

* whl

* np

* find

* 21

* Apply suggestions from code review

* Apply suggestions from code review

* onnx

* CI

* req

* ~ dockers

* min

* .

* drop horovod

* drop horovod

* drop horovod

* fix

* fix

* .
2021-03-29 12:20:13 -04:00
thomas chaton 0ea8f39841
Resolve schedule step bug for PyTorch Profiler (#6674)
Co-authored-by: Carlos Mocholí <carlossmocholi@gmail.com>
2021-03-25 17:03:06 +01:00
Jirka Borovec 64d0fa4472
update coverage config (#6524)
* update coverage config

* parallel

* parallel

* Apply suggestions from code review

* Apply suggestions from code review

* paralel

* paralel

* paralel

* combine

* combine

* .

* ..

* ..

* ..

* rev

* cb

* cb

* drop

* drop

* .

* ..

* ...

* ...

* ...

* .
2021-03-23 23:05:04 +01:00
Jirka Borovec 8cd75a4dd5
fix comparing versions (#6434)
* fix comparing versions

* chlog

* .

* ...

* datasets
2021-03-23 07:51:45 +00:00
Jirka Borovec b341b53f70
deprecate metrics pkg (#6505)
* deprecate metrics

* examples

* req

* docs

* Apply suggestions from code review

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

* pep8

Co-authored-by: Carlos Mocholí <carlossmocholi@gmail.com>
Co-authored-by: Nicki Skafte <skaftenicki@gmail.com>
2021-03-15 14:39:38 +00:00
Jirka Borovec 156847bea7
CI: resume testing with py3.8 (#6516)
* testing on python 3.8

* req
2021-03-15 12:07:23 +01:00
Jirka Borovec afe0ededa3
cover subproc coverage (#6477) 2021-03-11 15:45:26 +00:00
Jirka Borovec 85c8074bee
require: adjust versions (#6363)
* adjust versions

* release

* manifest

* pep8

* CI

* fix

* build
2021-03-06 14:34:54 +01:00
Jirka Borovec 38274b9de9
unfreeze torchtext version (#6302) 2021-03-02 10:38:02 -05:00
Jirka Borovec 960a60743f
fix fairscale compatible with PT 1.8 (#5996)
* try to extend fairscale available

* 1.2
2021-02-16 19:43:02 +00:00
Jirka Borovec ae4dca9725
Docs: fix failing make (#5988) 2021-02-15 16:03:57 -05:00
Eric Cousineau ae19c9723b
tests: Remove usage of --flake8 flag (#5909)
* tests: Remove usage of --flake8 flag

* Remove commented line

Co-authored-by: Carlos Mocholi <carlossmocholi@gmail.com>
2021-02-12 12:25:08 -05:00
Jirka Borovec 9dd56398e3
fixing some compatibility with PT 1.8 (#5864)
* change default

* .

* p

* 0.21.2

* .

* fix

* .
2021-02-09 18:25:57 +01:00