Commit Graph

523 Commits

Author SHA1 Message Date
Jeremy Jordan a5d1176cf6
callback method for on_save_checkpoint (#2501)
* initial draft

* fix test

* Update pytorch_lightning/trainer/callback_hook.py

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

* fix tests

* remove old code

* untested upgrade script

* document limitations

* clean up and add tests

* Update pytorch_lightning/trainer/training_io.py

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

* reflect PR comments

* fix formatting

* Update docs/source/callbacks.rst

* clarify docs

* revert change for loading checkpoints

* small edits

Co-authored-by: Adrian Wälchli <aedu.waelchli@gmail.com>
2020-08-28 16:50:52 +02:00
Ananya Harsh Jha 40eaa2143e
add desc for minimize (#3216) 2020-08-27 14:25:39 -04:00
Rohit Gupta f03943ee94
Fix GpuUsageLogger to work on different platforms (#3008)
* Fix GpuUsageLogger

* docstrings

* misconfigexception

* add basic tests

* skip doctest

* fix parameter and docstring

* rm cl

* skip doctest

* cleanup

* chlog

* add suggestions from review

* add test from suggestions

* fix import

* fix test

* fix test

* fix test

* fix test

* rename GpuUsageLogger to GPUStatsMonitor

* doc fix

* Apply suggestions from code review

* update docs format

* update docs

* miss

* merge

* fix title formatting

* unindent

* punctuation

* simplify if statements

* fix test

* suggestions

* pep

* Update CHANGELOG.md

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

* fix on_train_batch_*

* use AttributeDict

* usage

* rank zero

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

* import

* minor changes

Co-authored-by: Adrian Wälchli <aedu.waelchli@gmail.com>
Co-authored-by: Adrian Wälchli <adrian.waelchli@inf.unibe.ch>
Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com>
2020-08-27 19:50:32 +02:00
Lezwon Castelino 8b504a15da
update core contributors (#3224) 2020-08-27 11:27:54 -04:00
Abe Fetterman 8fa73da302
Update index.rst (#3201) 2020-08-26 15:02:00 -04:00
Lucas Steinmann ae3bf919c6
Fixed example implementation of AutoEncoder. (#3190)
The previous implementation trained a auto encoder and evaluated
classificator.
I try to fix this by replacing the evaluation metric with an auto
encoder metric.
Hence, no classification is done.
I'm not 100% sure what the original authors intent was, since he
extends a classification model (LitMNIST) but does not use it.
The following model is an AutoEncoder and does not do any
classification.

 1. Small textual changes.
 2. forward() now implements encoding and not decoding (as it was described
 in the text.)
 3. _shared_eval uses MSE loss instead of class loss, since no
 classification weights are learned.
 4. initialized MSE in __init__, since calling MSE directly is not
 supported.
2020-08-26 07:33:04 -04:00
Odd Eirik Igland c044e2c08d
fix(docs): test_dataloader use transformed dataset (#3090)
* fix(docs): test_dataloader use transformed dataset

* suggestion

Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com>
2020-08-22 11:40:42 +02:00
William Falcon cc205f6a65
0.9.0 readme (#3075)
* 0.9.0 readme

* 0.9.0 readme

* 0.9.0 readme

* 0.9.0 readme

* 0.9.0 readme

* 0.9.0 readme

* 0.9.0 readme

* 0.9.0 readme

* 0.9.0 readme

* 0.9.0 readme

* 0.9.0 readme

* 0.9.0 readme

* 0.9.0 readme

* 0.9.0 readme

* 0.9.0 readme

* 0.9.0 readme

* 0.9.0 readme

* 0.9.0 readme

* 0.9.0 readme

* 0.9.0 readme

* 0.9.0 readme

* 0.9.0 readme

* 0.9.0 readme

* 0.9.0 readme

* 0.9.0 readme

* 0.9.0 readme

* 0.9.0 readme

* 0.9.0 readme

* 0.9.0 readme

* 0.9.0 readme

* 0.9.0 readme

* 0.9.0 readme

* 0.9.0 readme

* 0.9.0 readme

* 0.9.0 readme

* 0.9.0 readme

* 0.9.0 readme

* 0.9.0 readme

* 0.9.0 readme

* 0.9.0 readme

* 0.9.0 readme

* 0.9.0 readme

* 0.9.0 readme

* 0.9.0 readme

* 0.9.0 readme

* 0.9.0 readme

* 0.9.0 readme
2020-08-20 11:45:28 -04:00
edenlightning ed184a913a
Change structure of walkthrough (#2949)
* deconflict

* fix links

* deconflict

* deconflict

* deconflict

* deconflict

* deconflict

* deconflict

* deconflict

* deconflict

* deconflict

* deconflict

* deconflict

* deconflict

Co-authored-by: William Falcon <waf2107@columbia.edu>
2020-08-20 08:50:24 -04:00
Nathan Raw bab89b8d21
Add transfer_batch_to_device hook to DataModule (#3038)
*  add dm to_device logic in trainer

* 🔥 remove unnecessary comment

*  add to_device logic to datamodule

*  add test

* updated docs

Co-authored-by: William Falcon <waf2107@columbia.edu>
2020-08-20 08:47:11 -04:00
edenlightning 6abd742145
Create 3 steps to Lightning guide to replace quick-start (#3055)
* Update new-project.rst

* Update new-project.rst

* Create 3_steps.rst

* revert

* remove the callbacks vid

* fix blank line

* change ref

* spelling

* spelling

* Update docs/source/new-project.rst

Co-authored-by: Nathan Raw <nxr9266@g.rit.edu>

* spelling

* spelling

* spelling

* spelling

* spelling

* spelling

* spelling

Co-authored-by: William Falcon <waf2107@columbia.edu>
Co-authored-by: Nathan Raw <nxr9266@g.rit.edu>
2020-08-19 21:22:39 -04:00
edenlightning ee4eae884b
[docs] Add copy and toggle buttons to sphinx (#3054)
* Support sphinx toggle and copy buttons

* add buttons to conf
2020-08-19 18:59:45 -04:00
Davian Yang 9f6be96f84
Fix typo in Quick Start/Step-by-step walk-through (#3007)
* Fix typo in Quick Start/Step-by-step walk-through

* Fix typo in Quick Start/Step-by-step walk-through

* Fix snippets in lightning module

* Remove testblock 

doctest does not have torch with CUDA, so x.cuda() will fail

* Remove test code

"..." is not python, so doctests fail

* Fix #3005

* Fix indentation, stage in docs

Co-authored-by: Adrian Wälchli <aedu.waelchli@gmail.com>
Co-authored-by: Teddy Koker <teddy.koker@gmail.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2020-08-18 21:51:38 +00:00
edenlightning 321fb8b7c0
Update datamodules.rst (#3026)
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2020-08-18 11:10:57 +00:00
William Falcon 5dfc7b157e
quick start docs changes (#3028)
* updated code example

* added warning when changing monitor and using results obj

* added warning when changing monitor and using results obj

* added warning when changing monitor and using results obj

* added warning when changing monitor and using results obj

* added warning when changing monitor and using results obj

* added warning when changing monitor and using results obj

* added warning when changing monitor and using results obj

* added warning when changing monitor and using results obj

* added warning when changing monitor and using results obj

* added warning when changing monitor and using results obj

* added warning when changing monitor and using results obj

* added warning when changing monitor and using results obj
2020-08-17 23:17:51 -04:00
Adrian Wälchli 188e06c261
ddp fix for trainer.test() + add basic ddp tests (#2997)
* add ddp script variations

* add ddp test

* rename

* shell

* test

* test

* try call

* try without subprocess

* test

* display the error

* list all variations

* try string

* try copy env

* debug

* pythonpath

* path

* update test

* change

* simple ddp test

* replace

* remove random port

* random port

* str

* clean up

* check run spawn

* clean up

* docs

* docs

* update test

* docs

* changelog

* changelog
2020-08-16 11:19:57 -04:00
William Falcon ed231c93ca
updated docs (#2999)
* updated docs

* updated docs
2020-08-16 07:38:18 -04:00
William Falcon ffc229e801
task docs harness (#2996)
* updated docs

* updated docs
2020-08-15 23:57:33 -04:00
William Falcon 44802f7697 tasks docs 2020-08-15 22:36:53 -04:00
William Falcon 0c264689cb
Fixes #2942 (#2969)
* Fixes #2942

* doc fix
2020-08-13 21:54:57 -04:00
William Falcon 639a4cbd25
autoplay (#2968) 2020-08-13 19:06:55 -04:00
Nicki Skafte 6a051c887f
Add docs for GpuUsageLogger (#2945)
* add docs

* fix spelling
2020-08-13 18:58:14 -04:00
edenlightning 5e7ae348b4
Add labels to sphinx docs (#2964)
* Add label

* add ref

* add ref

* add ref

* add label

* add label

* add label

* add label

* Update fast_training.rst

* label

* label

* label

* label

* label

* label

* label

* label

* label

* label

* label

* Update performance.rst

* Update production_inference.rst

* Update profiler.rst

* Update results.rst

* Update sequences.rst

* Update single_gpu.rst

* Update slurm.rst

* Update test_set.rst

* Update tpu.rst

* Update trainer.rst

* Update training_tricks.rst

* Update transfer_learning.rst

* Update weights_loading.rst

* Update governance.rst

* Update hooks.rst

* Update bolts.rst

* Update child_modules.rst

* Update hyperparameters.rst

* Update transfer_learning.rst
2020-08-13 18:56:51 -04:00
William Falcon 9a503de6af
Replace docs gifs with videos snippets so user can play at own speed (#2966)
* update docs
2020-08-13 18:52:47 -04:00
Jeff Yang 07c023c32f
fix(docs): docstring for amp_backend (#2960)
* fix(docs): docstring for amp_backend

* fix(docs): early_stop_checkpoint -> early_stop_callback

* docs

Co-authored-by: ananyahjha93 <ananya@pytorchlightning.ai>
2020-08-13 23:25:56 +02:00
William Falcon 054ac94bd1
track batch size (#2950) 2020-08-13 11:51:37 -04:00
William Falcon 6c5a0a172f
Resultd (#2947)
* updated docs
2020-08-13 09:58:05 -04:00
edenlightning 2c31beccfb
Add magicleap/atlas to community examples (#2937) 2020-08-12 16:05:15 -04:00
William Falcon d13e5c9e53
document lightiningmodule better (#2920)
* updated docs
2020-08-11 19:39:43 -04:00
Shiv Dhar 0097630a95
Fix typo (#2907)
Variable defined as `mnist_dm` but used as `mnist`. Change to use `mnist_dm`.
2020-08-11 08:39:16 +02:00
ananda seelan 4d3dfd43e4
Minor doc fixes (#2893)
* Minor language fixes

* Typo fix
2020-08-09 15:00:08 -04:00
edenlightning a59e140ee8
Add PL mastercalss to readme (#2873)
* Update index.rst

* add thumbanil

* update readme

* Update README.md

* Update index.rst

* image

Co-authored-by: Jirka Borovec <jirka@pytorchlightning.ai>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2020-08-08 00:21:51 +00:00
Jirka Borovec f8c058215f
simplify tests & cleaning (#2588)
* simplify

* tmpdir

* revert

* clean

* accel

* types

* test

* edit test acc

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

* Update test acc

Co-authored-by: Adrian Wälchli <aedu.waelchli@gmail.com>
2020-08-07 23:22:05 +02:00
edenlightning 78d6592464
Update index.rst (#2870) 2020-08-07 16:43:52 -04:00
Rohit Gupta a642349228
Support limit_mode_batches (int) for infinite dataloader (#2840)
* Support limit_mode_batches(int) for infinite dataloader

* flake8

* revert and update

* add and update tests

* pep8

* chlog

* Update CHANGELOG.md

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

* Add suggestions by @awaelchli

* docs

* Apply suggestions from code review

Co-authored-by: Ethan Harris <ewah1g13@soton.ac.uk>

* Apply suggestions from code review

* fix

* max

* check

* add and update tests

* max

* check

* check

* check

* chlog

* tests

* update exception message

* Apply suggestions from code review

Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com>
Co-authored-by: Adrian Wälchli <aedu.waelchli@gmail.com>
Co-authored-by: Ethan Harris <ewah1g13@soton.ac.uk>
Co-authored-by: Jirka Borovec <jirka@pytorchlightning.ai>
2020-08-07 13:02:36 +02:00
Jeff Yang 6d637c4beb
add wandb autoclass in logger.rst (#2854) 2020-08-06 22:05:06 +02:00
xmotli02 767c44950c
Added basic file logger (#2721)
* Added basic file logger #1803

* fixup! Added basic file logger #1803

* fixup! Added basic file logger #1803

* fixup! Added basic file logger #1803

* fixup! Added basic file logger #1803

* fixup! Added basic file logger #1803

* csv

* Apply suggestions from code review

* tests

* tests

* tests

* miss

* docs

Co-authored-by: xmotli02 <xmotli02@users.noreply.github.com>
Co-authored-by: Jirka Borovec <jirka@pytorchlightning.ai>
Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com>
2020-08-06 06:08:25 -04:00
William Falcon 5d0f0325d8
Revert "Support limit_mode_batches (int) for infinite dataloader" (#2839)
* Revert "Support limit_mode_batches (int) for infinite dataloader (#2787)"

This reverts commit de9c9f0864.

* Update training_tricks.py
2020-08-05 15:57:26 -04:00
Rosario Scalise d09098ca5a
[DOCS] title clarification in Results page (#2827)
* title tweak

* remove changes in new-project

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2020-08-05 21:06:26 +02:00
Rohit Gupta de9c9f0864
Support limit_mode_batches (int) for infinite dataloader (#2787)
* Support limit_mode_batches(int) for infinite dataloader

* flake8

* revert and update

* add and update tests

* pep8

* chlog

* Update CHANGELOG.md

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

* Add suggestions by @awaelchli

* docs

* Apply suggestions from code review

Co-authored-by: Ethan Harris <ewah1g13@soton.ac.uk>

* Apply suggestions from code review

* fix

* max

* check

Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com>
Co-authored-by: Adrian Wälchli <aedu.waelchli@gmail.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Co-authored-by: Ethan Harris <ewah1g13@soton.ac.uk>
Co-authored-by: Jirka Borovec <jirka@pytorchlightning.ai>
2020-08-05 17:04:49 +00:00
Nicki Skafte b2a7d7580c
Docs for auto_select_gpu (#2836)
* added docs

* Update docs/source/multi_gpu.rst

Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com>

* testcode change to example

Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2020-08-05 12:28:33 +00:00
Nicki Skafte e3732789d7
Add remaning sklearn metrics (#2562)
* added balanced accuracy

* added dcg score

* added mean absolute error

* added mean squared error

* fix

* added mean squared log error

* add median absolute error and r2 score

* switch arguments

* added mean poisson deviance

* add mean gamma deviance and mean tweedie deviance

* fix styling

* added explained variance score

* added cohen kappa score

* added hamming, hinge, jaccard

* fix styling

* update sklearn requirement to newer version

* update requirement

* fix doctest

* fix tests

* added balanced accuracy

* added dcg score

* added mean absolute error

* added mean squared error

* fix

* added mean squared log error

* add median absolute error and r2 score

* switch arguments

* added mean poisson deviance

* add mean gamma deviance and mean tweedie deviance

* fix styling

* added explained variance score

* added cohen kappa score

* added hamming, hinge, jaccard

* fix styling

* update sklearn requirement to newer version

* fix doctest

* fix tests

* fix doctest

* fix failing docs

* fix test

* trying to fix errors

* Apply suggestions from code review

* format

Co-authored-by: Nicki Skafte <nugginea@gmail.com>
Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com>
Co-authored-by: Jirka Borovec <jirka@pytorchlightning.ai>
2020-08-05 11:32:53 +02:00
William Falcon 7da7d2e428
callback docs (#2794)
* added logging docs

* added logging docs

* added logging docs

* added logging docs
2020-08-01 22:56:34 -04:00
William Falcon 1d811d0d11
Resultdocs (#2793)
* added logging docs

* added logging docs

* added logging docs

* added logging docs

* added logging docs

* added logging docs

* added logging docs

* added logging docs

* added logging docs

* added logging docs
2020-08-01 22:31:56 -04:00
Nathan Raw 036bcea499
Call DataModule hooks implicitly in trainer (#2755)
*  call dm hooks in trainer implicitly

*  update tests

* 📝 remove unused stage arg from dm docs

*  update tests

*  update tests

* 🚧 include stage in datamodule.setup

* 📝 docs

* 📝 docs

* added more dm tests

* added more dm tests

* 🐛 call dm.setup everywhere

* 🔥 pickle tests now implied by accelerator tests

* 🎨 set dm as attr of trainer

* 🐛 .

* 🚧 wip

* add can prepare test

* add can prepare test

* verified setup in fit

* fixed setup call

* fixed setup call

* fixed setup call

Co-authored-by: William Falcon <waf2107@columbia.edu>
2020-08-01 20:17:57 -04:00
Lezwon Castelino b7afac351b
Add onnx export (#2596)
* export model to onnx

* prepare data before exporting

* support for dataloaders and tensors

* added tests

* use example_input_array
add to changelog

* updated docstring

* added onnx inference tests

* temp commit

* removed schema valid test

* add onnxruntime to environment.yml

* moved onnxruntime to environment.yml pip

* add example in doc

* add lines between code block

* added PR to changelog

* is file check

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

* remove *

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

* infer example outputs

* added doctest for onnx

* fix windows tests

* moved eval within condition block

* self.forward to self

* added docs

* fixed docs error

* added to toctree

* Update CHANGELOG.md

Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com>
2020-07-31 12:27:57 +02:00
Jirka Borovec 949734489a
remove deprecated in v0.9 (#2760)
* remove deprecated in v0.9

* data_loader

* import

* hook

* args
2020-07-30 23:19:28 +02:00
Junbum Lee d18b9ef9d9
Fix typo on tpu.rst (#2759)
* Fix typo on tpu.rst

There're 3 ways :)

* Update docs/source/tpu.rst

Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2020-07-30 18:11:18 +00:00
Jeff Yang 63b92b7e63
fix: corrected attribute in *_dataloader in datamodule (#2748) 2020-07-29 07:11:13 -04:00
Adrian Wälchli db9f11d179
truncate long version number in progress bar (#2594)
* truncate version number

* add docs and example

* extend docs

* docs

* docs

* changelog

* show last

* Update pytorch_lightning/core/lightning.py

* Update pytorch_lightning/core/lightning.py

Co-authored-by: William Falcon <waf2107@columbia.edu>
2020-07-28 16:32:34 -04:00