Rohit Gupta
704e00ee7f
Fix invalid value for weights_summary ( #5296 )
...
* Fix weights_summary
* use mode
* fix
* optional
* what was I thinking
(cherry picked from commit 062800aa99
)
2021-01-06 12:59:32 +01:00
Rohit Gupta
f08c025c10
Allow log_momentum for adaptive optimizers ( #5333 )
...
* fix
* fix
* chlog
* no momentum warning
* Apply suggestions from code review
Co-authored-by: Adrian Wälchli <aedu.waelchli@gmail.com>
* ref
Co-authored-by: Adrian Wälchli <aedu.waelchli@gmail.com>
(cherry picked from commit 371daea594
)
2021-01-06 12:58:34 +01:00
Rohit Gupta
918fa2b3f1
Add a check for optimizer attatched to lr_scheduler ( #5338 )
...
* add a check for scheduler and optimizer
* pep
* Apply suggestions from code review
Co-authored-by: Adrian Wälchli <aedu.waelchli@gmail.com>
Co-authored-by: Adrian Wälchli <aedu.waelchli@gmail.com>
(cherry picked from commit c7d0f4c3a2
)
2021-01-06 12:58:06 +01:00
Rohit Gupta
9cfbf8d609
Disable checkpointing, earlystopping and logging with fast_dev_run ( #5277 )
...
* Disable checkpointing, earlystopping and logger with fast_dev_run
* docs
* chlog
* disable callbacks and enable DummyLogger
* add log
* use dummy logger method
* Apply suggestions from code review
Co-authored-by: Adrian Wälchli <aedu.waelchli@gmail.com>
Co-authored-by: chaton <thomas@grid.ai>
Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com>
(cherry picked from commit f740245521
)
2021-01-06 12:57:24 +01:00
tarepan
bb366232e7
Add non-existing resume_from_checkpoint acceptance for auto-resubmit ( #4402 )
...
* Add empty resume_from_checkpoint acceptance #4366
* Fix general error catch with focused file check
* Add fsspec HTTP extras
Add fsspec's HTTPFileSystem support through http extras.
pl has supported remote http file (e.g. #2925 ),
so this commit do not add new functionality.
* Fix potential too much logging in DDP
* Add PR changelog
* Add well-written argument explanation
Co-authored-by: Adrian Wälchli <aedu.waelchli@gmail.com>
* Fix DDP-compatible restore logging
Notify from where the states are restored.
This feature temporally deleted as a result of PR review.
With succeeding review, added with DDP compatibility.
* Fix utility import pathes
* Refactor load step commentaries
* Refactor hpc ckpt suffix acquisition
* Refactor restore/hpc_load match
* Refactor hpc load trial
* Refactor checkpoint dir check
* Refactor unneeded function nest
* Refactor nested If
* Refactor duplicated cache clear
* Refactor attempt flow with if/elif
* Fix pip8
* Refactor hook commentary
Co-authored-by: chaton <thomas@grid.ai>
* Fix pep8
* Refactor hpc load checkpoint path acquisition
* Fix pip8
* Fix typo
Co-authored-by: Adrian Wälchli <aedu.waelchli@gmail.com>
* Fix typo
Co-authored-by: Adrian Wälchli <aedu.waelchli@gmail.com>
* Fix doc
Co-authored-by: Adrian Wälchli <aedu.waelchli@gmail.com>
* Refactor None Union type with Optional
* Fix build-doc CI failure debuged in #5329
* Fix fsspec import during build-doc #5329
* Fix test epoch
Co-authored-by: Adrian Wälchli <aedu.waelchli@gmail.com>
* Fix test with latest test models
* .
Co-authored-by: Adrian Wälchli <aedu.waelchli@gmail.com>
Co-authored-by: chaton <thomas@grid.ai>
Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com>
Co-authored-by: Sean Naren <sean.narenthiran@gmail.com>
Co-authored-by: Roger Shieh <sh.rog@protonmail.ch>
(cherry picked from commit b0051e8c03
)
2021-01-06 12:55:38 +01:00
Jirka Borovec
53b0cb910b
update isort config ( #5335 )
...
* update isort config
* apply
(cherry picked from commit 724f1051f0
)
2021-01-06 12:49:23 +01:00
Tadej Svetina
4292fe0532
Fix metric state reset ( #5273 )
...
* Fix metric state reset
* Fix test
* Improve formatting
Co-authored-by: Ananya Harsh Jha <ananya@pytorchlightning.ai>
(cherry picked from commit 4913cbb987
)
2021-01-06 12:48:01 +01:00
chaton
5ad13dc964
Trainer.test should return only test metrics ( #5214 )
...
* resolve bug
* merge tests
(cherry picked from commit 9ebbfece5e
)
2021-01-06 11:55:21 +01:00
Jirka Borovec
52c3081b4c
add memory parity for PL vs Vanilla ( #5170 )
...
* refactor
* memory
* show
* clean
* clean
* try
* device
* reset
* fix
* fix
* mean
* hook
* format
* add todo
Co-authored-by: chaton <thomas@grid.ai>
Co-authored-by: chaton <thomas@grid.ai>
(cherry picked from commit 6adc1b32bd
)
2021-01-06 11:40:01 +01:00
Jirka Borovec
dfbb592566
fix test - reduce metric
2021-01-05 09:58:37 +01:00
Jirka Borovec
74d0652164
flake8 ++
2021-01-05 09:58:37 +01:00
Adrian Wälchli
cc14fc16bf
skip multi-gpu test when running on single-gpu machine ( #5186 )
...
* skip test
* Apply suggestions from code review
Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com>
Co-authored-by: Nicki Skafte <skaftenicki@gmail.com>
2021-01-05 09:58:37 +01:00
Boris Dayma
dcd29aef06
feat(wandb): offset logging step when resuming ( #5050 )
...
* feat(wandb): offset logging step when resuming
* feat(wandb): output warnings
* fix(wandb): allow step to be None
* test(wandb): update tests
* feat(wandb): display warning only once
* style: fix PEP issues
* tests(wandb): fix tests
* tests(wandb): improve test
* style: fix whitespace
* feat: improve warning
Co-authored-by: Adrian Wälchli <aedu.waelchli@gmail.com>
* feat(wandb): use variable from class instance
Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com>
* tests(wandb): check warnings
* feat(wandb): use WarningCache
* tests(wandb): fix tests
* style: fix formatting
Co-authored-by: Adrian Wälchli <aedu.waelchli@gmail.com>
Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com>
2021-01-05 09:58:37 +01:00
Jirka Borovec
3c5dad7100
Document speed comparison ( #2072 )
...
* docs
* script
* dump
* desc
* import
* import
* if
* norm
* t
* finished
* isort
* typing
Co-authored-by: Nicki Skafte <skaftenicki@gmail.com>
* xlabel
* pandas
* time
Co-authored-by: Nicki Skafte <skaftenicki@gmail.com>
2021-01-05 09:58:37 +01:00
Sean Naren
0211f7f9b2
Disable pl optimizer temporarily to fix AMP issues ( #5163 )
...
* Disable pl optimizer temporarily to fix AMP issues
* Add todo and enable pl optimizer in the test
2021-01-05 09:58:37 +01:00
chaton
6b19198aae
[bug-fix] Metric reduction with Logging ( #5150 )
...
* add test
* resolve bug
* udpate test
* wrongly copy / paste
* update test
* resolve a second bug
Co-authored-by: Ubuntu <ubuntu@ip-172-31-62-109.ec2.internal>
2021-01-05 09:58:37 +01:00
chaton
13bbf4b3f2
Un-balanced logging properly supported ( #5119 )
...
* resolve bug
* clean code
* resolve comments
* Update tests/trainer/optimization/test_multiple_optimizers.py
Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com>
* resolve another bug
* add comments
* use abs to find diff
* update
* resolve flake8
Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com>
2021-01-05 09:58:37 +01:00
chaton
58a2993766
support number for logging with sync_dist=True ( #5080 )
...
* support number
* add two tests
* wip
* add ddp in special test
* remove a test
* move device to bottom
* simplify test
* update test
* Update pytorch_lightning/core/step_result.py
Co-authored-by: Carlos Mocholí <carlossmocholi@gmail.com>
* resolve sync_ddp
Co-authored-by: Carlos Mocholí <carlossmocholi@gmail.com>
2021-01-05 09:58:37 +01:00
Loi Ly
1d13943605
Fix reset TensorRunningAccum ( #5106 )
...
* Fix reset TensorRunningAccum
* add test for TensorRunningAccum's reset method
* fix CI failed due to PEP8
Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com>
2021-01-05 09:58:36 +01:00
Akihiro Nitta
151d86e40b
Update isort config ( #5142 )
...
* Update isort config
* Apply isort with new config
* Fix typo in isort config
* fix rebase
Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com>
2021-01-05 09:57:37 +01:00
Rohit Gupta
81e9d4260e
Fix saved filename in ModelCheckpoint if it already exists ( #4861 )
...
* disable version if not required
* disable version if not required
* pep
* chlog
* improve test
* improve test
* parametrize test and update del_list
* Update pytorch_lightning/callbacks/model_checkpoint.py
Co-authored-by: Carlos Mocholí <carlossmocholi@gmail.com>
* try appending version to already saved ckpt_file
* Revert "try appending version to already saved ckpt_file"
This reverts commit 710e05e01f738d982aabf1f36c09fa59293e5c0c.
* add more assertions
* use BoringModel
Co-authored-by: Carlos Mocholí <carlossmocholi@gmail.com>
Co-authored-by: chaton <thomas@grid.ai>
Co-authored-by: Roger Shieh <sh.rog@protonmail.ch>
2021-01-05 09:57:37 +01:00
Jirka Borovec
35401706bf
add copyright to tests ( #5143 )
2021-01-05 09:57:37 +01:00
Jirka Borovec
c72880f109
hotfix: dataloaders - add unimplemented methods ( #5352 )
...
* add unimplemented methods
* test
* test
* flake8
2021-01-05 03:41:20 -05:00
Justus Schock
d88cf4a652
Add Support for multiple train loaders ( #1959 )
...
* add support for wrong dtype in apply_func
* apply loader resetting to possible collection of loaders
* add combined loader iter class
* integrate combined loader iter to training loop
* fix imports
* fix imports
* finish supporters
* add tests for supporters
* add test for model with multiple loaders
* fix trainer integration
* fix instance check
* Train loaders (#4032 )
* patch for issues discussed in #1959 , encapsulating underlying datastructures returned from train_dataloader
* update data_loading.py to it uses patch discussed in #1959
* rename class
* Separate CombinedLoaderIterator into two classes, and update related tests. (#4606 )
* Fix the bugs after rebasing.
* Add custom get_len for apply_to_collection
* Refactor MultiIterator to be as CombinedLoaderIterator
* To get the right num_training_batches. Call the wrapper for multi trainloader in data_loading.py, instead of training_loop.py
* Reload _loader_iters when calling __iter__
* Don't transform DataLoader to CombinedLoaderIterator when it's along
* Updates test_fit_multiple_train_loaders for testing num_training_batches
* Seperate CombinedLoaderIterator into CombinedLoaderIterator and CombinedDataLoader. Add CombinedDataset for unified DataLoader format.
* Initialize CombinedDataLoader before calculating num_training_batches. Also updating self._worker_check for multiple loaders
* Update tests for supporters
* Update tests for multiple trainloaders. Add tests about few_workers for multiple loaders.
* Fix pep8 issues
* Add tests for train_loader_patch.py
* Add descriptions to multiple_trainloader_mode
* Remove unused variables
* Add docstrings and typing
* Add more tests for better converage
* Remove unused commented codes
* Add sampler property
* Remove extract_dataset
* Update typing
* pep8
* Update train_loader_patch.py
* Apply suggestions from code review
Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com>
* Update pytorch_lightning/trainer/supporters.py
Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com>
* reviewer comments
* fix stupid import
* add docs
* add back line separator
* fix line sep
* pep8
* Apply suggestions from code review
* fix
* fix
* Apply suggestions from code review
Co-authored-by: Adrian Wälchli <aedu.waelchli@gmail.com>
* Apply suggestions from code review
Co-authored-by: Nicki Skafte <skaftenicki@gmail.com>
* flake8
Co-authored-by: Justus Schock <justusschock@justuss-mbp.fritz.box>
Co-authored-by: Christofer Fransson <christofer_fransson@yahoo.com>
Co-authored-by: YI-LIN SUNG <r06942076@ntu.edu.tw>
Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com>
Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com>
Co-authored-by: Adrian Wälchli <aedu.waelchli@gmail.com>
Co-authored-by: Nicki Skafte <skaftenicki@gmail.com>
Co-authored-by: Jirka Borovec <jirka.borovec@seznam.cz>
2021-01-04 19:57:53 +00:00
Jirka Borovec
b72ed71d4e
Refactor: clean trainer device & distrib setters ( #5297 )
...
* naive replace
* simplify
* clean
* .
* fix
* .
* fix
* fix
2021-01-04 17:10:13 +00:00
Jirka Borovec
957583544a
mark todo exceptions ( #5320 )
...
* mark todo exceptions
* .
* .
* .
* .
* .
* .
* .
* .
* try
* .
2021-01-04 09:07:56 +01:00
Jirka Borovec
af833f673c
drop deprecated TrainResult ( #5323 )
...
* drop TrainResult
* .
* .
* .
* .
* .
* .
2021-01-04 09:54:21 +08:00
Jirka Borovec
2264fe64e3
Refactor/prune unused EvalModel methods ( #5331 )
...
* model valid
* model train
* model test
* model opt
2021-01-03 15:09:54 +01:00
Jirka Borovec
f2c2a692e1
drop deprecated fbeta metrics ( #5322 )
...
* drop deprecated fbeta metrics
* flake8
* imports
* chlog
2021-01-02 00:49:23 +00:00
Jirka Borovec
fb90eec515
drop deprecated checkpoint filepath ( #5321 )
...
* drop deprecated checkpoint filepath
* tests
2021-01-02 00:08:29 +01:00
Nicki Skafte
9dbdffca1e
[Metrics] R2Score ( #5241 )
...
* add r2metric
* change init
* add test
* add docs
* add math
* Apply suggestions from code review
Co-authored-by: Teddy Koker <teddy.koker@gmail.com>
Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com>
* changelog
* adjusted parameter
* add more test
* pep8
* Apply suggestions from code review
Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com>
* add warnings for adjusted score
Co-authored-by: Teddy Koker <teddy.koker@gmail.com>
Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com>
2021-01-01 12:23:19 +01:00
Tadej Svetina
7f71ee9265
Classification metrics overhaul: stat scores (3/n) ( #4839 )
...
* Add stuff
* Change metrics documentation layout
* Add stuff
* Add stat scores
* Change testing utils
* Replace len(*.shape) with *.ndim
* More descriptive error message for input formatting
* Replace movedim with permute
* PEP 8 compliance
* WIP
* Add reduce_scores function
* Temporarily add back legacy class_reduce
* Division with float
* PEP 8 compliance
* Remove precision recall
* Replace movedim with permute
* Add back tests
* Add empty newlines
* Add empty line
* Fix permute
* Fix some issues with old versions of PyTorch
* Style changes in error messages
* More error message style improvements
* Fix typo in docs
* Add more descriptive variable names in utils
* Change internal var names
* Break down error checking for inputs into separate functions
* Remove the (N, ..., C) option in MD-MC
* Simplify select_topk
* Remove detach for inputs
* Fix typos
* Update pytorch_lightning/metrics/classification/utils.py
Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com>
* Update docs/source/metrics.rst
Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com>
* Minor error message changes
* Update pytorch_lightning/metrics/utils.py
Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com>
* Reuse case from validation in formatting
* Refactor code in _input_format_classification
* Small improvements
* PEP 8
* Update pytorch_lightning/metrics/classification/utils.py
Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com>
* Update pytorch_lightning/metrics/classification/utils.py
Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com>
* Update docs/source/metrics.rst
Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com>
* Update pytorch_lightning/metrics/classification/utils.py
Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com>
* Apply suggestions from code review
Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com>
* Alphabetical reordering of regression metrics
* Change default value of top_k and add error checking
* Extract basic validation into separate function
* Update to new top_k default
* Update desciption of parameters in input formatting
* Apply suggestions from code review
Co-authored-by: Nicki Skafte <skaftenicki@gmail.com>
* Check that probabilities in preds sum to 1 (for MC)
* Fix coverage
* Split accuracy and hamming loss
* Remove old redundant accuracy
* Minor changes
* Fix imports
* Improve docstring descriptions
* Fix imports
* Fix edge case and simplify testing
* Fix docs
* PEP8
* Reorder imports
* Add top_k parameter
* Update changelog
* Update docstring
* Update docstring
* Reverse formatting changes for tests
* Change parameter order
* Remove formatting changes 2/2
* Remove formatting 3/3
* .
* Improve description of top_k parameter
* Apply suggestions from code review
* Apply suggestions from code review
Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com>
* Remove unneeded assert
* Update pytorch_lightning/metrics/functional/accuracy.py
Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com>
* Remove unneeded assert
* Explicit checking of parameter values
* Apply suggestions from code review
Co-authored-by: Nicki Skafte <skaftenicki@gmail.com>
* Apply suggestions from code review
* Fix top_k checking
* PEP8
* Don't check dist_sync in test
* add back check_dist_sync_on_step
* Make sure half-precision inputs are transformed (#5013 )
* Fix typo
* Rename hamming loss to hamming distance
* Fix tests for half precision
* Fix docs underline length
* Fix doc undeline length
* Replace mdmc_accuracy parameter with subset_accuracy
* Update changelog
* Fix unwanted accuracy change
* Enable top_k for ML prob inputs
* Test that default threshold is 0.5
* Fix typo
* Update top_k description in helpers
* updates
* Update styling and add back tests
* Remove excess spaces
* fix torch.where for old versions
* fix linting
* Update docstring
* Fix docstring
* Apply suggestions from code review (mostly docs)
* Default threshold to None, accept only (0,1)
* Change wrong threshold message
* Improve documentation and add tests
* Add back ddp tests
* Change stat reduce method and default
* Remove DDP tests and fix doctests
* Fix doctest
* Update changelog
* Refactoring
* Fix typo
* Refactor
* Increase coverage
* Fix linting
* Consistent use of backticks
* Fix too long line in docs
* Apply suggestions from code review
* Fix deprecation test
* Fix deprecation test
* Default threshold back to 0.5
* Minor documentation fixes
* Add types to tests
Co-authored-by: Teddy Koker <teddy.koker@gmail.com>
Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com>
Co-authored-by: chaton <thomas@grid.ai>
Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com>
Co-authored-by: Nicki Skafte <skaftenicki@gmail.com>
Co-authored-by: Justus Schock <12886177+justusschock@users.noreply.github.com>
2020-12-30 20:49:50 +01:00
Prudhvi Rampey
2094633181
Implement partial auroc metric ( #3790 )
...
* Implement partial auroc metric
* Add pycodestyle changes
* Added tests for max_fpr
* changelog
* version for tests
* fix imports
* fix tests
* fix tests
* Added more thresholds in (0,1] to test max_fpr
* Removed deprecated 'reorder' param from auroc
* changelog
* Apply suggestions from code review
Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com>
* remove old structure
* Apply suggestions from code review
Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com>
* fix test error
Co-authored-by: Nicki Skafte <nugginea@gmail.com>
Co-authored-by: Nicki Skafte <skaftenicki@gmail.com>
Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com>
Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com>
2020-12-29 19:10:19 +01:00
Jirka Borovec
7a615b5651
add tests for Trainer attributes ( #5261 )
...
* add tests for Trainer attributes
* drop empty
2020-12-29 18:56:13 +01:00
Jirka Borovec
2718d7d214
CI: fix nightly release version ( #5260 )
...
* CI fix nigtly releases
* format
* fix unrelated flake8
2020-12-24 17:18:15 +01:00
Jirka Borovec
a884866ff0
Unify names in Utils ( #5199 )
...
* warnings
* argparse
* mutils
* xla device
* deprecated
* tests
* simple
* flake8
* fix
* flake8
* 1.4
2020-12-22 00:23:33 +01:00
Tadej Svetina
ccffc344ca
Classification metrics overhaul: accuracy metrics (2/n) ( #4838 )
...
* Add stuff
* Change metrics documentation layout
* Add stuff
* Change testing utils
* Replace len(*.shape) with *.ndim
* More descriptive error message for input formatting
* Replace movedim with permute
* PEP 8 compliance
* Division with float
* Style changes in error messages
* More error message style improvements
* Fix typo in docs
* Add more descriptive variable names in utils
* Change internal var names
* Break down error checking for inputs into separate functions
* Remove the (N, ..., C) option in MD-MC
* Simplify select_topk
* Remove detach for inputs
* Fix typos
* Update pytorch_lightning/metrics/classification/utils.py
Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com>
* Update docs/source/metrics.rst
Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com>
* Minor error message changes
* Update pytorch_lightning/metrics/utils.py
Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com>
* Reuse case from validation in formatting
* Refactor code in _input_format_classification
* Small improvements
* PEP 8
* Update pytorch_lightning/metrics/classification/utils.py
Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com>
* Update pytorch_lightning/metrics/classification/utils.py
Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com>
* Update docs/source/metrics.rst
Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com>
* Update pytorch_lightning/metrics/classification/utils.py
Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com>
* Apply suggestions from code review
Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com>
* Alphabetical reordering of regression metrics
* Change default value of top_k and add error checking
* Extract basic validation into separate function
* Update to new top_k default
* Update desciption of parameters in input formatting
* Apply suggestions from code review
Co-authored-by: Nicki Skafte <skaftenicki@gmail.com>
* Check that probabilities in preds sum to 1 (for MC)
* Fix coverage
* Split accuracy and hamming loss
* Remove old redundant accuracy
* Minor changes
* Fix imports
* Improve docstring descriptions
* Fix edge case and simplify testing
* Fix docs
* PEP8
* Reorder imports
* Update changelog
* Update docstring
* Update docstring
* Reverse formatting changes for tests
* Change parameter order
* Remove formatting changes 2/2
* Remove formatting 3/3
* .
* Improve description of top_k parameter
* Apply suggestions from code review
* Apply suggestions from code review
Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com>
* Remove unneeded assert
* Update pytorch_lightning/metrics/functional/accuracy.py
Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com>
* Remove unneeded assert
* Explicit checking of parameter values
* Apply suggestions from code review
Co-authored-by: Nicki Skafte <skaftenicki@gmail.com>
* Apply suggestions from code review
* Fix top_k checking
* PEP8
* Don't check dist_sync in test
* add back check_dist_sync_on_step
* Make sure half-precision inputs are transformed (#5013 )
* Fix typo
* Rename hamming loss to hamming distance
* Fix tests for half precision
* Fix docs underline length
* Fix doc undeline length
* Replace mdmc_accuracy parameter with subset_accuracy
* Update changelog
* Apply suggestions from code review
Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com>
* Suggestions from code review
* Fix number in docs
* Update pytorch_lightning/metrics/classification/accuracy.py
* Replace topk by argsort in select_topk
* Fix changelog
* Add test for wrong params
* Add Google Colab badges (#5111 )
* Add colab badges to notebook
Add colab badges to notebook to notebooks 4 & 5
* Add colab badges
Co-authored-by: chaton <thomas@grid.ai>
* Fix hanging metrics tests (#5134 )
* Use torch.topk again as ddp hanging tests fixed in #5134
* Fix unwanted notebooks change
* Fix too long line in hamming_distance
* Apply suggestions from code review
* Apply suggestions from code review
* protect
* Update CHANGELOG.md
Co-authored-by: Teddy Koker <teddy.koker@gmail.com>
Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com>
Co-authored-by: chaton <thomas@grid.ai>
Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com>
Co-authored-by: Nicki Skafte <skaftenicki@gmail.com>
Co-authored-by: Justus Schock <12886177+justusschock@users.noreply.github.com>
Co-authored-by: Roger Shieh <sh.rog@protonmail.ch>
Co-authored-by: Shachar Mirkin <shacharmirkin@gmail.com>
2020-12-21 16:42:51 +01:00
Jirka Borovec
0f36525e8f
fix/enable - check F401 ( #5201 )
...
* refactor - check F401
* missed
* fix
2020-12-21 10:15:04 +01:00
Jirka Borovec
35fd6e93c7
refactor - check E501 ( #5200 )
2020-12-21 14:23:09 +05:30
Jirka Borovec
6d2c564bc6
refactor - check F841 ( #5202 )
2020-12-21 11:10:55 +05:30
chaton
f3748ba808
[feat] Enable self.log in callbacks ( #5094 )
...
* enable to use self.log in callbacks
* update
* revert back to assert
2020-12-16 16:08:39 -05:00
Jirka Borovec
059eaecbb4
set xxx_AVAILABLE as protected ( #5082 )
...
* sett xxx_AVAILABLE as protected
* docs
2020-12-14 20:19:05 +05:30
Carlos Mocholí
0327f6b4c2
Do not warn when the name key is used in the lr_scheduler dict ( #5057 )
...
* Do not warn when the name key is used
* Missing line
* Consistency
* Update pytorch_lightning/callbacks/lr_monitor.py
* Update docs
* Update pytorch_lightning/core/lightning.py
Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com>
* Update CHANGELOG
Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com>
2020-12-14 08:38:10 +01:00
tarepan
16feb5137b
Refactor load in checkpoint connector ( #4593 )
...
* Refactor load step commentaries
* Refactor hpc ckpt suffix acquisition
* Refactor restore/hpc_load match
* Refactor hpc load trial
* Refactor checkpoint dir check
* Refactor unneeded function nest
* Refactor nested If
* Refactor duplicated cache clear
* Refactor attempt flow with if/elif
* Fix pip8
* Refactor hook commentary
Co-authored-by: chaton <thomas@grid.ai>
* Fix pep8
* Refactor hpc load checkpoint path acquisition
* Fix pip8
* Fix doc
Co-authored-by: Adrian Wälchli <aedu.waelchli@gmail.com>
* Refactor None Union type with Optional
Co-authored-by: chaton <thomas@grid.ai>
Co-authored-by: Adrian Wälchli <aedu.waelchli@gmail.com>
Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com>
Co-authored-by: Roger Shieh <sh.rog@protonmail.ch>
2020-12-14 00:13:50 +08:00
Carlos Mocholí
398f122a42
Improve some tests ( #5049 )
...
* Improve some tests
* Add TrainerState asserts
Co-authored-by: Roger Shieh <sh.rog@protonmail.ch>
2020-12-13 23:04:16 +08:00
Jirka Borovec
a49291d98d
drop unused test with result api ( #5058 )
...
Co-authored-by: chaton <thomas@grid.ai>
Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com>
2020-12-12 21:51:19 +05:30
Jirka Borovec
b50ad9ee95
split tests for deprecated api ( #5071 )
...
* imports
* imports
* flake8
Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com>
2020-12-12 20:25:11 +05:30
Rohit Gupta
3100b7839a
Allow any input in to_onnx and to_torchscript ( #4378 )
...
* branch merge
* sample
* update with valid input tensors
* pep
* pathlib
* Updated with BoringModel and added more input types
* try fix
* pep
* skip test with torch < 1.4
* fix test
* Apply suggestions from code review
* update tests
* Allow any input in to_onnx and to_torchscript
* Update tests/models/test_torchscript.py
Co-authored-by: Adrian Wälchli <aedu.waelchli@gmail.com>
* no_grad
* try fix random failing test
* rm example_input_array
* rm example_input_array
Co-authored-by: chaton <thomas@grid.ai>
Co-authored-by: Jeff Yang <ydcjeff@outlook.com>
Co-authored-by: Roger Shieh <sh.rog@protonmail.ch>
Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com>
Co-authored-by: Adrian Wälchli <aedu.waelchli@gmail.com>
Co-authored-by: edenlightning <66261195+edenlightning@users.noreply.github.com>
2020-12-12 18:17:03 +08:00
Jirka Borovec
1e501f0f40
add back compatibility for deprecated metrics 2/n ( #5068 )
...
* add back compatibility for deprecated metrics
* fix
* imports
* imports
2020-12-11 22:56:19 +01:00
Jirka Borovec
4a3f9069cb
add back compatibility for deprecated metrics 1/n ( #5067 )
...
* add back compatibility for metrics
* tests
* Add deprecated metric utility functions back to functional (#5062 )
* add back *deprecated* metric utility functions to functional
* pep
* pep
* suggestions
* move
Co-authored-by: Jirka Borovec <jirka.borovec@seznam.cz>
* more
* fix
* import
* docs
* tests
* fix
Co-authored-by: Teddy Koker <teddy.koker@gmail.com>
2020-12-11 22:11:21 +01:00
chaton
1a970b2d8d
[hotfix] Extend Optimizer + update doc ( #5095 )
...
* resolve urgent bug
* update pr
* update doc
* update
* remove typo
* add defaults
* Update pytorch_lightning/__init__.py
* Update setup.py
* update doc
* Update docs/source/optimizers.rst
Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com>
* update
* resolve doc
* debug test
* update test
* Update docs/source/optimizers.rst
Co-authored-by: Adrian Wälchli <aedu.waelchli@gmail.com>
* Update docs/source/optimizers.rst
Co-authored-by: Adrian Wälchli <aedu.waelchli@gmail.com>
* Update docs/source/optimizers.rst
Co-authored-by: Adrian Wälchli <aedu.waelchli@gmail.com>
* remove useless import
* Update docs/source/optimizers.rst
Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com>
Co-authored-by: Adrian Wälchli <aedu.waelchli@gmail.com>
2020-12-11 14:24:59 -05:00
Jirka Borovec
74171efadf
drop duplicate metrics ( #5014 )
...
* drop duplicate metrics
* keep
* fix
2020-12-11 18:42:53 +01:00
chaton
7755572b4f
Check if optimizer supports closure ( #4981 )
...
* check if optimizer support closure
* cleanup test
* resolve tests
* resolve flake
* update test due to patch limit
* update
* update dep
* Update tests/core/test_lightning_optimizer.py
Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com>
* Update tests/core/test_lightning_optimizer.py
Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com>
* resolve bug
* update test
* resolve tests
* Update requirements/extra.txt
Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com>
* remove bolts dep
* remove bolts
* add missing bolts dep for tests
* remove need for bolts
Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com>
Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com>
2020-12-11 14:51:45 +01:00
Jirka Borovec
4ebce38478
update usage of deprecated automatic_optimization ( #5011 )
...
* drop deprecated usage automatic_optimization
* Apply suggestions from code review
Co-authored-by: Adrian Wälchli <aedu.waelchli@gmail.com>
* Apply suggestions from code review
Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com>
Co-authored-by: Adrian Wälchli <aedu.waelchli@gmail.com>
Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com>
2020-12-10 15:31:33 +05:30
Jirka Borovec
77fb425dd4
update usage of deprecated profiler ( #5010 )
...
* drop deprecated profiler
* lut
Co-authored-by: Roger Shieh <sh.rog@protonmail.ch>
2020-12-10 08:38:14 +01:00
Jirka Borovec
05f25f3a54
update usage of deprecated checkpoint_callback ( #5006 )
...
* drop usage of deprecated checkpoint_callback
* fix
* fix
2020-12-09 14:14:34 -05:00
Jirka Borovec
ce9179591d
ref: clean config [1/n] add intermediate setters ( #4990 )
...
* add intermediate setters
* show inputs
* fix options
* move
* fix
* less talk
* fix
* talk less
* str
* cases
* rename
Co-authored-by: chaton <thomas@grid.ai>
2020-12-09 14:13:57 -05:00
Jirka Borovec
90d1d9fa73
drop deprecated reorder from AUC ( #5004 )
...
* drop deprecated reorder from AUC
* chlog
* fix
* fix
* simple
* fix
* fix
* fix
Co-authored-by: Roger Shieh <sh.rog@protonmail.ch>
2020-12-09 18:05:12 +00:00
chaton
ef8ef12fd0
[feat] pp 2/n ( #5026 )
...
* Added changes for RPC plugin
* Add missing kwargs
* Fix code format
* Loading refactors by introducing is_distributed var, fix optimizer step flow
* Add rpc guard
* Added docstrings and typing
* resolve comments
* Add additional rpc hook, refactor name of exit process hook for clarity
* remove annotation
* Modify behaviour to allow optional return, add test for rpc plugin
* resolve tests
* rename is_ddp_based
* update
* update for windows
* update
* resolve test
* code smell
* Added sequential plugin
* resolve bug
* update
* cleanup
* add Exception
* resolve docs
* Remove ddp support
* Revert distributed -> ddp
* Update pl_examples/basic_examples/conv_sequential_example.py
Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com>
* Update pl_examples/basic_examples/conv_sequential_example.py
Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com>
* Update pytorch_lightning/plugins/ddp_sequential_plugin.py
Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com>
* Address code review points
* Update pytorch_lightning/plugins/ddp_sequential_plugin.py
Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com>
* Update pytorch_lightning/plugins/ddp_sequential_plugin.py
Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com>
* Add missing return
* Fix formatting, add datamodule args
* add small comment
* resolve comments
* resolve comments
* update source for fairscale
* update extras
* remove staticmethod
* resolve flake8
* Skip tests that are failing due to bug upstream with multiple optimizers and shard
* update
* update on comments
* clean test
* latest comments
* remove old comments
* add todo
* Update version
* update
* resolve bugs
* resolve bugs
* update test
* remove hanging test
* Update pytorch_lightning/plugins/ddp_sequential_plugin.py
Co-authored-by: Carlos Mocholí <carlossmocholi@gmail.com>
* resolve on comments
* Update pytorch_lightning/plugins/ddp_sequential_plugin.py
Co-authored-by: Carlos Mocholí <carlossmocholi@gmail.com>
* resolve on comments
* Update pytorch_lightning/plugins/ddp_sequential_plugin.py
Co-authored-by: Carlos Mocholí <carlossmocholi@gmail.com>
* Update pytorch_lightning/plugins/ddp_sequential_plugin.py
Co-authored-by: Carlos Mocholí <carlossmocholi@gmail.com>
* Update pytorch_lightning/plugins/ddp_sequential_plugin.py
Co-authored-by: Carlos Mocholí <carlossmocholi@gmail.com>
* Update pytorch_lightning/plugins/ddp_sequential_plugin.py
Co-authored-by: Carlos Mocholí <carlossmocholi@gmail.com>
* remove ImportError
Co-authored-by: SeanNaren <sean@grid.ai>
Co-authored-by: Sean Naren <sean.narenthiran@gmail.com>
Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com>
Co-authored-by: Carlos Mocholí <carlossmocholi@gmail.com>
2020-12-09 12:56:51 +00:00
Jirka Borovec
53d7c9555c
drop usage of deprecated distributed_backend ( #5009 )
...
Co-authored-by: chaton <thomas@grid.ai>
Co-authored-by: Roger Shieh <sh.rog@protonmail.ch>
2020-12-09 09:18:23 +01:00
Ananya Harsh Jha
127454ade2
All gatherwith grads ( #5012 )
...
* all_gather
* ddp
* horovod
* grad tests
* fixed ddp
* ddp fixed, removed tpu, horovod for now
* changelog
* windows fix
* windows fix
* removed batch from ctx
* all_gather
* ddp
* horovod
* grad tests
* fixed ddp
* ddp fixed, removed tpu, horovod for now
* changelog
* windows fix
* windows fix
* removed batch from ctx
* removed code duplication
* merge
Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com>
2020-12-08 23:20:01 +00:00
Sean Naren
ee9b3fe574
[feat] pp 1/n ( #5016 )
...
* Added changes for RPC plugin
* Add missing kwargs
* Fix code format
* Loading refactors by introducing is_distributed var, fix optimizer step flow
* Add rpc guard
* Added docstrings and typing
* resolve comments
* Add additional rpc hook, refactor name of exit process hook for clarity
* remove annotation
* Modify behaviour to allow optional return, add test for rpc plugin
* resolve tests
* rename is_ddp_based
* update
* update for windows
* update
* resolve test
* code smell
* Revert back to init_ddp_connection for backwards compat
* Swap to explicit name for property
* Add missing speed parity increase for CI variability, fix call counts for child process
Co-authored-by: tchaton <thomas@grid.ai>
2020-12-08 22:02:10 +00:00
Rohit Gupta
6d2aeff26a
fast_dev_run can be int ( #4629 )
...
* fast_dev_run can be int
* pep
* chlog
* add check and update docs
* logging with fdr
* update docs
* suggestions
Co-authored-by: Carlos Mocholí <carlossmocholi@gmail.com>
* fdr flush logs
* update trainer.fast_dev_run
* codefactor and pre-commit isort
* tmp
Co-authored-by: Carlos Mocholí <carlossmocholi@gmail.com>
Co-authored-by: Roger Shieh <sh.rog@protonmail.ch>
Co-authored-by: edenlightning <66261195+edenlightning@users.noreply.github.com>
2020-12-09 01:37:53 +05:30
chaton
2393474350
[hotfix] ddp + manual_optimisation ( #4976 )
...
* Rely on ddp plugin for blocking sync behaviour, and skip if we're using manual optimization
* debug
* Revert "debug"
This reverts commit ccca6b6b
* Expose manual reduce for automatic optimization
* Add input arguments
* Enable parity test
* clean imports
* Expose hook after to ensure we reset
* Fix naming
* add
* fix test
* resolve on comments
* typo
* Update tests/trainer/optimization/test_manual_optimization.py
Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com>
* Update tests/trainer/optimization/test_manual_optimization.py
Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com>
* update on comments
* resolve comments
Co-authored-by: SeanNaren <sean@grid.ai>
Co-authored-by: Sean Naren <sean.narenthiran@gmail.com>
Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com>
2020-12-07 19:31:54 +00:00
Tadej Svetina
fedc0d1360
Classification metrics overhaul: input formatting standardization (1/n) ( #4837 )
...
* Add stuff
* Change metrics documentation layout
* Change testing utils
* Replace len(*.shape) with *.ndim
* More descriptive error message for input formatting
* Replace movedim with permute
* Style changes in error messages
* More error message style improvements
* Fix typo in docs
* Add more descriptive variable names in utils
* Change internal var names
* Break down error checking for inputs into separate functions
* Remove the (N, ..., C) option in MD-MC
* Simplify select_topk
* Remove detach for inputs
* Fix typos
* Update pytorch_lightning/metrics/classification/utils.py
Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com>
* Update docs/source/metrics.rst
Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com>
* Minor error message changes
* Update pytorch_lightning/metrics/utils.py
Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com>
* Reuse case from validation in formatting
* Refactor code in _input_format_classification
* Small improvements
* PEP 8
* Update pytorch_lightning/metrics/classification/utils.py
Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com>
* Update pytorch_lightning/metrics/classification/utils.py
Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com>
* Update docs/source/metrics.rst
Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com>
* Update pytorch_lightning/metrics/classification/utils.py
Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com>
* Apply suggestions from code review
Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com>
* Alphabetical reordering of regression metrics
* Change default value of top_k and add error checking
* Extract basic validation into separate function
* Update desciption of parameters in input formatting
* Apply suggestions from code review
Co-authored-by: Nicki Skafte <skaftenicki@gmail.com>
* Check that probabilities in preds sum to 1 (for MC)
* Fix coverage
* Minor changes
* Fix edge case and simplify testing
Co-authored-by: Teddy Koker <teddy.koker@gmail.com>
Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com>
Co-authored-by: chaton <thomas@grid.ai>
Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com>
Co-authored-by: Nicki Skafte <skaftenicki@gmail.com>
2020-12-07 17:49:35 +01:00
chaton
02152c1729
Simplify optimization Logic ( #4984 )
...
* Rely on ddp plugin for blocking sync behaviour, and skip if we're using manual optimization
* debug
* Revert "debug"
This reverts commit ccca6b6b
* Expose manual reduce for automatic optimization
* Add input arguments
* Enable parity test
* clean imports
* Expose hook after to ensure we reset
* Fix naming
* add
* fix test
* uniformize optimizer logic
* resolve test
* resovle flake8
* resolve amp bug
* update tests
* remove bug
* remove optimizer_step in accelerators
* typo
* update lightning optimizer
* set doesn't work with ddp_spawn
* resolve flake8
* update threshold
* ignore pyright
* correct codeFactor
* remove useless if
* remove zer_grad function
* simplify step
* remove typo
* resolve bug
* Apply suggestions from code review
* update on comments
* resolve bugs
* remove tests
* Update pytorch_lightning/trainer/configuration_validator.py
Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com>
* simplify testing
* add more tests
Co-authored-by: SeanNaren <sean@grid.ai>
Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com>
Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com>
2020-12-07 12:55:49 +00:00
Jirka Borovec
ab7c947961
simplify CI horovod ( #4951 )
...
* simplify CI horovod
* reorder
2020-12-07 10:31:33 +01:00
Jan-Henrik Lambrechts
b00991efd8
Added changeable extension variable for model checkpoints ( #4977 )
...
* Added changeable extension variable for model checkpoints
* Removed whitespace
* Removed the last bit of whitespace
* Wrote tests for FILE_EXTENSION
* Fixed formatting issues
* More formatting issues
* Simplify test by just using defaults
* Formatting to PEP8
* Added dummy class that inherits ModelCheckpoint; run only one batch instead of epoch for integration test
* Fixed too much whitespace formatting
* some changes
Co-authored-by: rohitgr7 <rohitgr1998@gmail.com>
2020-12-06 22:58:50 +05:30
chaton
2e838e6dd8
Enable`self.log` in most functions. ( #4969 )
...
* refactor
* solve pyright
* remove logging in batch_start functions
* update docs
* update doc
* resolve bug
* update
* correct script
* resolve on comments
2020-12-06 13:01:43 +00:00
Marc Ferradou
849737e7ca
[Bug Fix] Allow logger to support indexing ( #4595 )
...
* [Bug Fix] Allow logger to support indexing
This should fix #4540
* Adding test for indexes for DummyLogger
* Apply suggestions from code review
Co-authored-by: chaton <thomas@grid.ai>
* pep8
* added test for dummyexperiment
Co-authored-by: chaton <thomas@grid.ai>
Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com>
Co-authored-by: Nicki Skafte <skaftenicki@gmail.com>
Co-authored-by: Sean Naren <sean.narenthiran@gmail.com>
2020-12-05 21:00:31 +00:00
Gianluca Scarpellini
16fa4ed1e5
Fixed PYTHONPATH for ddp test model ( #4528 )
...
* Fixed PYTHONPATH for ddp test model
* Removed debug calls
* Apply suggestions from code review
Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com>
Co-authored-by: chaton <thomas@grid.ai>
Co-authored-by: Sean Naren <sean.narenthiran@gmail.com>
2020-12-05 20:09:47 +00:00
Nicki Skafte
1b40a4053d
Auto convert to contiguous format for all_gather ( #4907 )
...
* convert memory format
* changelog
* formatting
* suggestions
* retrigger tests
Co-authored-by: Nicki Skafte <nugginea@gmail.com>
Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com>
Co-authored-by: chaton <thomas@grid.ai>
2020-12-05 15:49:45 +01:00
Carlos Mocholí
72349706c1
Improve epoch_result_store code quality ( #4875 )
...
* Improve code quality
* black -l 120 -S
* Fix pyright error
Co-authored-by: Sean Naren <sean.narenthiran@gmail.com>
Co-authored-by: chaton <thomas@grid.ai>
2020-12-05 11:49:28 +00:00
Nicki Skafte
bf7c28cd54
[Metrics] PrecisionRecallCurve, ROC and AveragePrecision class interface ( #4549 )
...
* initial changes
* remove old
* init files
* add average precision
* add precision_recall_curve
* add roc
* cleaning
* docs
* pep8
* docs
* pep8
* changelog
* examples prune duplicate roc
* format
* imports
* fix
* format
* flake8
* duplicate
* fix
* flake8
* docs
* docs
Co-authored-by: Teddy Koker <teddy.koker@gmail.com>
Co-authored-by: Nicki Skafte <nugginea@gmail.com>
Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com>
Co-authored-by: Jirka Borovec <jirka.borovec@seznam.cz>
2020-12-04 22:42:23 +01:00
Justus Schock
f23f5e5648
Fix DP Logging Aggregation ( #4138 )
...
* add option to step result to do aggregation on a specific device
* in dp: do aggregation on root gpu
* Update CHANGELOG.md
* pep8
* trailing whitespace
* move to root
move result
stupid result object
revert to master
undo import
add "to" method to result
generalize to
try a test
try a test
Revert "try a test"
This reverts commit 22e3c1001e6c5774ea18ad925830304c245bf145.
Revert "try a test"
This reverts commit 4d2d8fb2a52d552894809a0cbe51af126d78f070.
new test
max epochs
super epoch end
log in test
hanging test
undo test
initial test that fails on master
step end
pass
step end
step end
epoch end
print
step
check dev
clean up test
sanity check
wtf is go ing on
frustration
debugging test
test
test
test
test
test
test
test
test
unused import
* move chlog entry
* clean
* remove outdated changes
Co-authored-by: Adrian Wälchli <aedu.waelchli@gmail.com>
Co-authored-by: Jirka Borovec <jirka.borovec@seznam.cz>
2020-12-04 19:10:07 +01:00
Sean Naren
ed5bda3eda
[docs] Added description of saving using ddp ( #4660 )
...
* Added description of saving using ddp
* Added code block example to explain DDP saving logic
* Fixed underline
* Added verbose explanation
* Apply suggestions from code review
* Added caveat when using custom saving functions
* flake8
Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com>
Co-authored-by: Jirka Borovec <jirka.borovec@seznam.cz>
2020-12-04 17:59:38 +01:00
chaton
62903717a4
[TEST] Min steps override early stopping ( #4283 )
...
* test to make sure behaviour is enforced
* test_min_steps_override_early_stopping_functionality
* make sure Excepted Behaviour is reproduced
* remove pollution from extra logging
* update docstring
* reduce test time
* resolve pep8
2020-12-04 17:10:14 +01:00
Rohit Gupta
342a2b6f25
Deprecate auto mode from ModelCheckpoint and EarlyStopping ( #4695 )
...
* remove auto mode from callbacks
* chlog
* remove auto mode from callbacks
* mode
* mode
* move back
* update docs
* update docstrings
* docstring warning
* fix syntax
* Apply suggestions from code review
Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com>
* isort
* default to 'auto'
* syntax
Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com>
2020-12-04 16:11:58 +01:00
Adrian Wälchli
f878a2699f
deprecate hprams setter method ( #4813 )
...
* deprecate hprams setter method
* update chlog
* isort
* update deprecation warning
Co-authored-by: Nicki Skafte <skaftenicki@gmail.com>
Co-authored-by: chaton <thomas@grid.ai>
Co-authored-by: Ananya Harsh Jha <ananya@pytorchlightning.ai>
Co-authored-by: Roger Shieh <sh.rog@protonmail.ch>
Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com>
2020-12-04 12:28:53 +01:00
Jirka Borovec
3976db597d
refactor imports of optional dependencies ( #4859 )
...
* refactor imports of optional dependencies
* fix
* fix
* fix
* fix
* fix
* flake8
* flake8
Co-authored-by: Sean Naren <sean.narenthiran@gmail.com>
Co-authored-by: chaton <thomas@grid.ai>
2020-12-04 10:26:10 +01:00
Jirka Borovec
eeae426b33
CI: skip hanging ( #4943 )
...
* CI: try increase time limit
* try min 3.8
* no ex
* CI
* dep
* test
* deps
* deps
* drop
* drop
Co-authored-by: chaton <thomas@grid.ai>
2020-12-02 16:18:14 +00:00
Lezwon Castelino
12cb9942a1
Tpu save ( #4309 )
...
* convert xla tensor to cpu before save
* move_to_cpu
* updated CHANGELOG.md
* added on_save to accelerators
* if accelerator is not None
* refactors
* change filename to run test
* run test_tpu_backend
* added xla_device_utils to tests
* added xla_device_utils to test
* removed tests
* Revert "added xla_device_utils to test"
This reverts commit 0c9316bb
* fixed pep
* increase timeout and print traceback
* lazy check tpu exists
* increased timeout
removed barrier for tpu during test
reduced epochs
* fixed torch_xla imports
* fix tests
* define xla utils
* fix test
* aval
* chlog
* docs
* aval
* Apply suggestions from code review
Co-authored-by: Jirka Borovec <jirka.borovec@seznam.cz>
Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com>
Co-authored-by: chaton <thomas@grid.ai>
Co-authored-by: Sean Naren <sean.narenthiran@gmail.com>
2020-12-02 13:05:11 +00:00
Jirka Borovec
add387c6a7
CI cleaning ( #4941 )
...
* set
* cut
* env
* oonce
* env
* env
* env
2020-12-02 10:00:05 +00:00
Sean Naren
e952dee292
Allow string plugins ( #4888 )
...
* Allow plugin to be chosen via string
* Fix implementation, add tests
* Fix codefactor issues
* Added missing env patch
* Skip test for windows
* Reword reason
* Add skip to invalid test
* Create required_plugins function, move sharded amp requirement to plugin
* Pass AMPType, fix setter for apex
* Better doc strings
* Add exception when using apex
* Add trainer available_plugins function, warn user when plugins have been added automatically with option to override behaviour
* Fixed pep8 indent
* Fix codefactor issues
* Add env variables
* Update pytorch_lightning/cluster_environments/cluster_environment.py
Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com>
* Addressed code review
* Update pytorch_lightning/plugins/plugin_connector.py
Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com>
* Update pytorch_lightning/plugins/plugin_connector.py
Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com>
* Update pytorch_lightning/plugins/plugin_connector.py
Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com>
* Addressed more code review feedback
* Fixed docstrings
* Swapped to verbose runtime error
* Apply suggestions from code review
* Apply suggestions from code review
* Update pytorch_lightning/plugins/sharded_plugin.py
Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com>
* Change name
* Pass trainer to plugins that may require it
* Fix sharded plugin
* Added test to ensure string sharded works
* Removed trainer typing as this breaks pep8
* Fixed doc issues
* Fixed tests
Co-authored-by: chaton <thomas@grid.ai>
Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com>
2020-12-01 20:30:49 +00:00
chaton
1d3724a878
[HotFix] Logging - One epoch delay on training epoch metrics. ( #4913 )
...
* add test
* resolve logging bug
* update
* resolve pep8
* resolve tests
Co-authored-by: Roger Shieh <sh.rog@protonmail.ch>
2020-12-01 09:26:52 +00:00
chaton
c2e6e68c7e
optimizer clean up ( #4658 )
...
* add LightningOptimizer
* typo
* add mock closure
* typo
* remove logic in optimizer_step
* update
* update
* update
* desactivate LightningOptimizer for hovorod
* resolve flake
* typo
* check optimizer name
* change name
* added backward to LightningOptimizer
* remove use_lightning_optimizer
* move update
* simplify init
* resolve comments
* resolve bug
* update
* update
* resolve bugs
* resolve flake8
* set state
* work manual_optimizer_step
* add doc
* add enable_pl_optimizer
* make optimizer_step
* add make_optimizer_step
* add examples
* resolve test
* add test_optimizer_return_options_enable_pl_optimizer
* add enable_pl_optimizer=True
* update
* update tests
* resolve bugs
* update
* set Trainer to False
* update
* resolve bugs
* update
* remove from doc
* resolve bug
* typo
* update
* set to True
* simplification
* typo
* resolve horovod
* unwrap horovod
* remove Optimizer
* resolve horovod
* move logic to amp_backend
* doesn't seem to be pickable
* update
* add again
* resolve some bugs
* cleanup
* resolve bug with AMP
* change __repr__
* round at -12
* udpate
* update
* update
* remove from horovod
* typo
* add convert_to_lightning_optimizers in each accelerators
* typo
* forgot
* forgot a convert_to_lightning_optimizers
* update
* update
* update
* increase coverage
* update
* resolve flake8
* update
* remove useless code
* resolve comments + add support for LightningOptimizer base class
* resolve flake
* check optimizer get wrapped back
* resolve DDPSharded
* reduce code
* lightningoptimizer
* Update pytorch_lightning/core/optimizer.py
Co-authored-by: Carlos Mocholí <carlossmocholi@gmail.com>
* Update pytorch_lightning/core/lightning.py
* remove reference to step function
* Apply suggestions from code review
* update on comments
* resolve
* Update CHANGELOG.md
* add back training_step in apex and native_amp
* rename optimizer_step
Co-authored-by: Carlos Mocholí <carlossmocholi@gmail.com>
Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com>
Co-authored-by: William Falcon <waf2107@columbia.edu>
Co-authored-by: Sean Naren <sean.narenthiran@gmail.com>
2020-12-01 00:09:46 +00:00
Jirka Borovec
405645daf8
formatting ( #4898 )
...
Co-authored-by: Sean Naren <sean.narenthiran@gmail.com>
2020-11-30 00:57:28 -05:00
William Falcon
f677efe61e
Merge pull request #4880 from PyTorchLightning/better_simple_profiler
...
Logging
2020-11-27 15:33:58 -05:00
SeanNaren
1719b2dca4
Skip a few tests to reduce drone CI wait times
2020-11-27 20:21:50 +00:00
tchaton
c6502adba1
resolve test
2020-11-27 19:34:45 +00:00
Sean Naren
06a856e055
Merge branch 'master' into feature/plug
2020-11-27 18:48:58 +00:00
chaton
6ba77c2611
Merge branch 'master' into better_simple_profiler
2020-11-27 18:43:01 +00:00
tchaton
1f1a20c45f
reduce parity to 0.22
2020-11-27 18:36:18 +00:00
tchaton
cef83dbbf8
optimize logging
2020-11-27 18:21:23 +00:00
Jirka Borovec
042152cd61
ref: fix & simplify test callback ( #4009 )
...
* simplify test callback
* update
* use mock
* flake8
2020-11-27 19:12:56 +01:00
tchaton
e17300f97d
add more profiler
2020-11-27 18:00:48 +00:00
tchaton
3a8fa6bf11
update
2020-11-27 17:48:51 +00:00
tchaton
290d74b40e
resolve test
2020-11-27 16:47:13 +00:00
SeanNaren
1704773712
Address code review
2020-11-27 14:50:12 +00:00
Sean Naren
00bd0d2e72
Merge branch 'master' into feature/plug
2020-11-27 13:18:50 +00:00
chaton
dee968f20b
[bug] Replace_sampler attach previous multiprocessing_context ( #4742 )
...
* resolve bug
* add test docstring
* Update tests/trainer/test_dataloaders.py
Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com>
* update test
Co-authored-by: Sean Naren <sean.narenthiran@gmail.com>
Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com>
2020-11-27 12:57:25 +00:00
SeanNaren
bde2a12990
Fix var name
2020-11-27 10:37:49 +00:00
SeanNaren
04bb0abe36
Merge branch 'master' into feature/plug
...
# Conflicts:
# pytorch_lightning/utilities/__init__.py
# requirements/extra.txt
2020-11-27 10:00:05 +00:00
Jirka Borovec
442d57f1e9
simplify imports xla / TPU ( #4872 )
...
* xla
* tpu
* fix
* fix
* flake8
2020-11-27 00:37:48 +01:00
SeanNaren
737447fc6e
Merge branch 'master' into feature/plug
...
# Conflicts:
# pytorch_lightning/trainer/connectors/precision_connector.py
# pytorch_lightning/utilities/__init__.py
2020-11-26 23:02:36 +00:00
Jirka Borovec
11e73ceaa6
fix import and typo in AMP ( #4871 )
...
* fix import and typo
* docs
* apex
* fix
* typo
2020-11-26 23:45:52 +01:00
SeanNaren
fc9b2bf015
Fix logic and add test for apex check, rename file, add DDP launcher tests
2020-11-26 22:45:21 +00:00
Sean Naren
74afcf71b7
Merge branch 'master' into feature/plug
2020-11-26 21:54:55 +00:00
Justus Schock
742ddd81b3
make device property always return a device with index ( #4851 )
...
* make device property always return a device with index
* pep8
* Update test_dtype_device_mixin.py
Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com>
2020-11-27 00:49:51 +05:30
SeanNaren
ab655e5118
Removed old eval logic, added eval tests
2020-11-26 18:49:06 +00:00
SeanNaren
47c121ef1a
Addressed code review points
2020-11-26 16:44:45 +00:00
Sean Naren
ff34a8fed9
Update tests/plugins/test_sharded_plugin.py
...
Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com>
2020-11-26 16:37:22 +00:00
SeanNaren
fa5934492f
Fixes
2020-11-26 10:50:32 +00:00
SeanNaren
5f2a64b778
Add explicit checkpoints for tests
2020-11-25 23:23:08 +00:00
SeanNaren
321e63ae8b
Fixes to import
2020-11-25 21:17:21 +00:00
SeanNaren
9215908fed
Removed line, dont abs
2020-11-25 20:38:04 +00:00
Sean Naren
22b4d5ee1a
Merge branch 'master' into feature/plug
2020-11-25 20:16:37 +00:00
chaton
204a0a2d03
[bugfix] Accumulated_gradient and TensoBoard ( #4738 )
...
* resolve bug
* update
* update
* modify one test
* remove paramters
* update on comments
* update changelog
* update docstring
Co-authored-by: Nicki Skafte <skaftenicki@gmail.com>
2020-11-25 19:44:05 +00:00
SeanNaren
d8224687b8
Move to percentage diff, increase diff
2020-11-25 16:16:57 +00:00
SeanNaren
99326088bb
Add additional test cases
2020-11-25 15:38:54 +00:00
SeanNaren
b39f290c4d
Merge branch 'master' into feature/plug
2020-11-25 12:55:42 +00:00
SeanNaren
bfe754da12
Removed comments, skip test
2020-11-25 12:55:02 +00:00
SeanNaren
a52e6a4a61
Add additional checkpoint tests
2020-11-24 21:12:18 +00:00
SeanNaren
f765364c02
Fixed configure_ddp, removed lr scheduler modification, added unit tests
2020-11-24 18:05:00 +00:00
Adrian Wälchli
fb0278a457
Update test for logging a metric object and state reset ( #4825 )
...
* update test
* docstring
Co-authored-by: Ananya Harsh Jha <ananya@pytorchlightning.ai>
2020-11-24 11:28:02 +01:00
Peter Gagarinov
70361ebb6d
Fixed a crash bug in MLFlow logger ( #4716 )
...
* warnings.warn doesn't accept tuples, which causes "TypeError: expected string or bytes-like object" when the execution flow gets to this warning. Fixed that.
* Try adding a mock test
* Try adding a mock test
Co-authored-by: rohitgr7 <rohitgr1998@gmail.com>
Co-authored-by: chaton <thomas@grid.ai>
2020-11-24 00:50:34 -05:00
Jeff Yang
7d96fd1168
[tests/checkpointing] refactor with BoringModel ( #4661 )
...
* [tests/checkpointing] refactor with BoringModel
* [tests/checkpointing] refactor with BoringModel
* [tests/checkpointing] refactor with BoringModel
* LessBoringModel -> LogInTwoMethods
* LessBoringModel -> LogInTwoMethods
* LessBoringModel -> TrainingStepCalled
Co-authored-by: chaton <thomas@grid.ai>
Co-authored-by: Ananya Harsh Jha <ananya@pytorchlightning.ai>
2020-11-24 01:23:12 +01:00
Adrian Wälchli
89e8796e2a
fix incomplete progress bar when refresh_rate > num batches ( #4577 )
...
* fix progress bar overshoot
* fix updates for partially incomplete main progress bar when val loop starts
* add tests
* chlog
2020-11-24 00:01:33 +01:00
Samyak S Sarnayak
ccf38ced2e
Use high progress_bar_refresh_rate on Google Colab ( #4654 )
...
* Use high refresh rate on Google Colab (#3786 )
Automatically override progress_bar_refresh_rate when on Google
Colab. Also added a constant IS_COLAB in utilities to check
whether it is being run in colab or not.
(#3786 )
* Show a warning instead of overriding when rate is low on colab
* Change warning to suggestion and move it
Moved warning to configure_progress_bar instead of on_trainer_init
* Apply suggestions from code review
Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com>
* add a mock test
Co-authored-by: chaton <thomas@grid.ai>
Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com>
Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com>
2020-11-24 02:13:33 +05:30
Boris Dayma
c586e5db77
feat(wandb): let wandb cli handle runs ( #4648 )
...
* feat(wandb): reinit handled by CLI
* fix: typo
* docs(wandb): improve formatting
* test(wandb): set wandb.run to None
* test(wandb): fix tests
* style: fix formatting
* docs(wandb): fix documentation
* Update code markup
Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com>
* docs(wandb): update CHANGELOG
* test(wandb): init called only when needed
* Update CHANGELOG.md
* try fix the test
Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com>
Co-authored-by: chaton <thomas@grid.ai>
Co-authored-by: Adrian Wälchli <aedu.waelchli@gmail.com>
Co-authored-by: edenlightning <66261195+edenlightning@users.noreply.github.com>
Co-authored-by: Sean Naren <sean.narenthiran@gmail.com>
Co-authored-by: rohitgr7 <rohitgr1998@gmail.com>
2020-11-24 01:31:28 +05:30
Sean Naren
404af43cde
5/n: Extract reference model call to plugins/accelerators ( #4773 )
...
* Encapsulate extracting reference model within the plugin to allow custom wrapper logic to live within the plugin/accelerators
* Add missing new lines
* Fix call to accelerator
* Removed double blank
* Use accelerator backend
* Handle case where wrapper has not been initialized within the plugin
* Added basic get model tests, add better typing
* Change model name
* Split GPU/DDP test
* Add stronger typing, skip ddp test on windows
* Fix import
* Fix import in dp
* Fixed PEP8 definition
* Add ddp launcher for ddp testing
* Modify accelerator reference model to property, change name to reflect func
* Revert property as this is incorrect.=
* Revert across accelerators
* Modified name to get_model_from_plugin
* Code review changes, fix issue with dp
* Add verb to function getter
Co-authored-by: chaton <thomas@grid.ai>
2020-11-23 17:21:47 +00:00
Nicki Skafte
6831ba9aa0
[Metrics] Unification of FBeta ( #4656 )
...
* implementation
* init files
* more stable reduction
* add tests
* docs
* remove old implementation
* pep8
* changelog
* Apply suggestions from code review
Co-authored-by: Adrian Wälchli <aedu.waelchli@gmail.com>
Co-authored-by: Nicki Skafte <nugginea@gmail.com>
Co-authored-by: Teddy Koker <teddy.koker@gmail.com>
Co-authored-by: Adrian Wälchli <aedu.waelchli@gmail.com>
2020-11-23 09:44:35 +01:00
Rohit Gupta
2d9d7e4daa
Add prefix argument in loggers ( #4557 )
...
* Add prefix parameter in loggers
* chlog
* pep
* patch test
* remove args, access via self
* try fix the test
* try fix the test
* try fix the test
* prefix test
* fix assert has calls
fix assert call
Co-authored-by: Adrian Wälchli <aedu.waelchli@gmail.com>
2020-11-22 06:38:58 +01:00
Rohit Gupta
db69d169e8
Deprecate prefix argument in ModelCheckpoint ( #4765 )
...
* Deprecate prefix in ModelCheckpoint
* chlog
Co-authored-by: chaton <thomas@grid.ai>
Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com>
2020-11-21 18:08:42 +05:30
Roger Shieh
42e59c6add
Cast hparams to dict when not using omegaconf ( #4770 )
...
* init fix
* init test
* more specific dict assert
* update changelog
* Update tests/checkpointing/test_model_checkpoint.py
Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com>
Co-authored-by: chaton <thomas@grid.ai>
Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com>
2020-11-20 19:53:05 +08:00
chaton
4803f681b0
[FEAT] DDP: Create DDPLauncher ( #4515 )
...
* test
* poc
* add simpler test for ddp
* typo
* resolve pep8
* try coverage testing
* trying to add coverage inside ddp
* resolve flake8
* update
* forgot coverage
* move .coveragerc
* update rcfile path
* update
* test
* update
* adding description
* add DDPLauncher decorator
* add undecorated
* push update
* update ddp testing
* Update tests/backends/launcher.py
Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com>
* Update tests/backends/launcher.py
Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com>
* update on comments
* update on comments
* resolve comments
* resolve isort
Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com>
2020-11-20 10:17:46 +00:00
Roger Shieh
cc8359be26
Proper casting for np scalars in hparams logging ( #4647 )
...
* first implementation
* add test and changelog
* Update tests/loggers/test_base.py
Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com>
* pep8
* rounding
* increase casting specificity to bool + number
* bugfix
* changelog formatting
* single loop
* Update CHANGELOG.md
Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com>
Co-authored-by: chaton <thomas@grid.ai>
2020-11-19 15:52:48 +08:00
Jeff Yang
c36121326d
[metrics] Update SSIM ( #4566 )
...
* [metrics] Update SSIM
* [metrics] Update SSIM
* [metrics] Update SSIM
* [metrics] Update SSIM
* [metrics] update ssim
* dist_sync_on_step True
* [metrics] update ssim
* Update tests/metrics/regression/test_ssim.py
Co-authored-by: chaton <thomas@grid.ai>
* Update pytorch_lightning/metrics/functional/ssim.py
Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com>
* ddp=True
* Update test_ssim.py
Co-authored-by: chaton <thomas@grid.ai>
Co-authored-by: Sean Naren <sean.narenthiran@gmail.com>
Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com>
Co-authored-by: Nicki Skafte <skaftenicki@gmail.com>
2020-11-19 11:51:18 +06:30
Carlos Mocholí
396a46f55f
Add current_score to ModelCheckpoint.on_save_checkpoint ( #4721 )
...
* Add current_score to ModelCheckpoint.on_save_checkpoint
* Update CHANGELOG
[ci skip]
* fix
Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com>
* fix2
* Add test for NaN
* Fix failing tests
* Simplify line
* Add test docstrings
Co-authored-by: chaton <thomas@grid.ai>
Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com>
Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com>
2020-11-18 08:09:44 +00:00
Akihiro Nitta
ece09f0c5f
Apply import formatting to files in the 2nd top level ( #4717 )
...
* Update pyproject.toml
* Apply isort to files in second level
Co-authored-by: chaton <thomas@grid.ai>
2020-11-18 00:29:09 +01:00
Maxim Ostroukhov
c208ac68c8
Added experiment_id to NeptuneLogger ( #3462 )
...
* 1) Added experiment_id to NeptuneLogger initialization input arguments.
2) Now function _create_or_get_experiment() overrides "experiment_name", "params", "properties", "tags".
* Added test case for existing experiment.
* Revert "Added test case for existing experiment."
This reverts commit 9f3ba2e37b
.
* Added test case for existing experiment.
* Fix merging issue.
* Moved experiment_id assignment directly to the part with experiment initialization.
* Update pytorch_lightning/loggers/neptune.py
Co-authored-by: Adrian Wälchli <aedu.waelchli@gmail.com>
Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com>
Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com>
2020-11-16 23:50:23 +05:30
Nicki Skafte
51097669b9
[metrics] change default behaviour of state dict ( #4685 )
...
* fix state dict
* Update docs/source/metrics.rst
Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com>
* changelog
Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com>
Co-authored-by: chaton <thomas@grid.ai>
2020-11-16 12:33:45 +00:00
Jirka Borovec
be60efb3cf
allow decorate model init with saving hparams ( #4662 )
...
* addd tests
* use boring model
* parsing init
* chlog
* double decorate
* Apply suggestions from code review
Co-authored-by: Carlos Mocholí <carlossmocholi@gmail.com>
* bug
Co-authored-by: chaton <thomas@grid.ai>
Co-authored-by: Carlos Mocholí <carlossmocholi@gmail.com>
Co-authored-by: Nicki Skafte <skaftenicki@gmail.com>
Co-authored-by: Roger Shieh <sh.rog@protonmail.ch>
2020-11-16 11:02:26 +01:00
chaton
867eef0e4c
[HOTFIX] Logging for evaluation ( #4684 )
...
* resolve bugs
* add should_flush_logs
* remove should_flush
* should work
* update test
* use something else
* Update pytorch_lightning/trainer/connectors/logger_connector/logger_connector.py
* log mock_log_metrics.mock_calls
* typo
* don't use keys
* convert to list
* typo
* check kwargs
* resolve bug
* resolve flake8
Co-authored-by: Sean Naren <sean.narenthiran@gmail.com>
2020-11-15 10:41:33 -05:00
Carlos Mocholí
61394d543c
Improve skipping step tests ( #4109 )
...
Co-authored-by: Adrian Wälchli <aedu.waelchli@gmail.com>
Co-authored-by: chaton <thomas@grid.ai>
Co-authored-by: Sean Naren <sean.narenthiran@gmail.com>
2020-11-14 21:10:24 +00:00
Jirka Borovec
e1955e3c89
isolate PL debugger in tests ( #4643 )
...
* isolate PL debugger in tests
* miss
Co-authored-by: Jeff Yang <ydcjeff@outlook.com>
2020-11-14 11:22:56 +00:00
ananthsub
d096a2ea6d
Fix setup callback hook to pass LightningModule through ( #4608 )
...
* Fix setup callback hook
* Update CHANGELOG.md
* Update test_trainer.py
* Update test_trainer.py
* Update test_trainer.py
* fix chlog
Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com>
2020-11-13 19:34:46 -05:00
chaton
4018237c30
[FEAT] Add lambda closure to manual_optimizer_step ( #4618 )
...
* added lambda_closure
* move to types
* add 2 new tests
* make example more complex
* add complex example to doc
* added more tests
* resolve doc
* typo
* update
* update tpu optimizer_step
* Apply suggestions from code review
* Update pytorch_lightning/core/lightning.py
Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com>
* update
Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com>
2020-11-12 19:22:06 +00:00
chaton
4a01fd048c
[FIX] Average Pbar Metrics ( #4534 )
...
* wip
* update
* normalize loss
* update test
* resolve bug
* update test and add TODO
* make sure it can be sync
* add TODO
* update sol
2020-11-12 15:59:01 +00:00
Sean Naren
33470ba605
Prevent crash if sync_dist=True on CPU ( #4626 )
...
* Added test/fix for sync_dist raising NotImplementedError
* Fixed comments/formatting
* Revert base class change, enforce sync tensors across accelerators, added GPU test
2020-11-11 22:04:05 +00:00
chaton
3d202f9ecc
[FEAT] Refactor logging 3/3 [v1] ( #4552 )
...
* wip
* wip check how many tests break
* wip
* resolve some bugs
* resolve more bugs
* resolve 2 bugs
* resolve
* temp fix
* update
* remove useless code
* remove result
* try to resolve bug
* update changelog
* formatting
* remove pl
Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com>
Co-authored-by: Sean Naren <sean.narenthiran@gmail.com>
2020-11-11 17:05:24 +00:00
chaton
7e08b0d710
[bug-fix] DDP and automatic_optimization=False ( #4485 )
...
* resolve bug
* add self._running_manual_optim
* update
* update tests
* update lightning module
* resolve bug
* update tests
* update
* resolve pep8
* update
* replace by `ddp_spawn`
* temporary fix
* update
* update
* move update to training_loop
* make both ddp_spawn
* introduce `manual_optimizer_step`
* update changelog
* added changelog wrong place
* add force_optimizer_step
* update docstring for tests
* update optimizer_step
* update zero_grad
* resolve flake8
* move update into manual_optimizer_step
* add zero_grad
* remove zero_grad tests
* remove manual_backward in AMP, it doesn't help
* update
* loosen tests
* update
* update doc
* add TODO
* Removed unnecessary get model from native amp
* Remove try except with pytest raise
* Add seed, clean up imports, remove try catch to reproduce error
* update code
* update test
* revert back
* formatting
* Update pytorch_lightning/core/lightning.py
Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com>
Co-authored-by: SeanNaren <sean@grid.ai>
Co-authored-by: Sean Naren <sean.narenthiran@gmail.com>
Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com>
2020-11-10 19:44:51 +00:00
maxjeblick
343d19fa86
Find parameters which are specified in the LightningDataModule, only ( #4347 )
...
* search for attribute in datamodule if not found elsewhere
* add test for datamodule
* add lightning_getattr test for datamodule
* Apply suggestions from code review
Co-authored-by: Adrian Wälchli <aedu.waelchli@gmail.com>
* Update CHANGELOG.md
* Update CHANGELOG.md
Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com>
Co-authored-by: Nicki Skafte <skaftenicki@gmail.com>
Co-authored-by: Adrian Wälchli <aedu.waelchli@gmail.com>
Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com>
2020-11-10 14:01:20 +01:00
Diedre Carmo
470e2945fc
fix logged keys in mlflow logger ( #4412 )
...
* [#4411 ] fix gpu_log_memory with mlflow logger
* sanitize parenthesis instead of removing for all loggers
* apply regex for mlflow key sanitization
* replace ',' with '.' typo
* add single warning and test
Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com>
Co-authored-by: chaton <thomas@grid.ai>
2020-11-10 17:20:25 +05:30
Kai Zhang
30ad3e2ad3
Replace a MisconfigurationException with warning in ModelCheckpoint callback ( #4560 )
...
* replace MisconfigurationException with warning
* update test
* check raising UserWarning
Co-authored-by: chaton <thomas@grid.ai>
Co-authored-by: Nicki Skafte <skaftenicki@gmail.com>
2020-11-10 10:44:43 +01:00
Nicki Skafte
465ec752f8
Metric ddp bugfix ( #4482 )
...
* changes
* fix spelling
* small note
* trying to fix ddp test
* fix ddp
* fix for test
* suggestion
* CHANGELOG
* Update pytorch_lightning/metrics/metric.py
Co-authored-by: chaton <thomas@grid.ai>
Co-authored-by: Sean Naren <sean.narenthiran@gmail.com>
Co-authored-by: Sean Naren <sean@grid.ai>
2020-11-10 09:16:31 +01:00
Nicki Skafte
4f3160ba2e
Skip tuner algorithms on fast dev ( #3903 )
...
* skip on fast dev
* fix error
* changelog
* fix recursive issue
* combine tests
* pep8
* move logic to base funcs
* fix mistake
* Update pytorch_lightning/tuner/lr_finder.py
Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com>
* pep
Co-authored-by: William Falcon <waf2107@columbia.edu>
Co-authored-by: Nicki Skafte <nugginea@gmail.com>
Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com>
Co-authored-by: chaton <thomas@grid.ai>
2020-11-10 00:34:42 +01:00
William Falcon
624f5b5938
ref: unify slurm and TE under backendPlugin 3/n ( #4581 )
2020-11-08 15:32:37 -05:00
William Falcon
bfaf014096
ref: unify slurm and TE under backendPlugin 2/n ( #4580 )
2020-11-08 15:07:16 -05:00
William Falcon
0f64f15f52
ref: unify slurm and TE under backendPlugin 1/n ( #4578 )
...
* ref: unify slurm and TE under backendPlugin
* ref: unify slurm and TE under backendPlugin
2020-11-08 14:28:55 -05:00
William Falcon
09a51697ed
Adds shortcut for path to log ( #4573 )
...
* added log_dir shortcut to trainer properties for writing logs
* added log_dir shortcut
* added log_dir shortcut
* added log_dir shortcut
* added log_dir shortcut
* added log_dir shortcut
* added log_dir shortcut
* added log_dir shortcut
* added log_dir shortcut
2020-11-08 12:16:22 -05:00
chaton
9c8701f2e2
[feat] Logging refactor 2/n - train ( #4495 )
...
* update logging
* solve more bugs
* replace Mapping by Dict
* update on comments
* resolve pep8
* Apply suggestions from code review
Co-authored-by: ananthsub <ananth.subramaniam@gmail.com>
* Update pytorch_lightning/trainer/connectors/logger_connector/epoch_result_store.py
Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com>
* update on comments
* typo
* update for coverage
* update test
* update
* Update tests/models/test_hooks.py
Co-authored-by: Sean Naren <sean.narenthiran@gmail.com>
* Update tests/models/test_hooks.py
Co-authored-by: Sean Naren <sean.narenthiran@gmail.com>
* update on comments
* remove deepcopy
* remove useless look for
* another small optim
* extra optim
* remove lastest optim, can be source of bug
* resolve bug
* add docstring
* optimize coverage
* Update pytorch_lightning/trainer/connectors/logger_connector/epoch_result_store.py
Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com>
* Update pytorch_lightning/trainer/connectors/logger_connector/epoch_result_store.py
Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com>
* Update tests/trainer/logging_tests/test_distributed_logging.py
Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com>
* Update pytorch_lightning/trainer/evaluation_loop.py
Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com>
* Update tests/trainer/logging/test_logger_connector.py
Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com>
* Update tests/trainer/logging_tests/test_train_loop_logging_1_0.py
Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com>
* update on comments
* update
* update on comments
* update parity speed
* get it down to 0.65
* update
* 0.8 max_dif
Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com>
Co-authored-by: ananthsub <ananth.subramaniam@gmail.com>
Co-authored-by: Sean Naren <sean.narenthiran@gmail.com>
Co-authored-by: William Falcon <waf2107@columbia.edu>
2020-11-05 22:27:04 +00:00
Travis Addair
51cc7a89ee
Horovod: fixed early stopping and added metrics aggregation ( #3775 )
...
* Fixed early stopping for Horovod
* Refactored to sync_dist_if_available
* Bump min Horovod version to support hvd.is_initialized
* Changelog
* Added back change for Horovod
* Removed redundant checks for initialization
* Implement metrics gathering for Horovod
* Added test for EvalResult
* Renamed ddp_sync_on_step -> dist_sync_on_step
* Added metric test for Horovod
* Added option pass callable allgather function to metric base class
* Added dist_sync_fn
* Fixed calls to private _sync_dist
* Fixed Horovod test
* Added sync_tensor to the distributed backend
* Skip Windows
* Insert test path
* Removed redundant import
* Updated drone
* Unset HOROVOD_GPU_ALLREDUCE
* Unset
* No cache dir
* No uninstall
* Unset variables
* Uninstall Horovod during initialization
* Replaced more references to ddp_sync_on_step
* Fixed imports
* Fixed attribute
* Added back default
* Lint
* Added back docstring
* Made gather_all_tensors default
* Added whitespace
* Update tests/models/test_horovod.py
Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com>
* Update pytorch_lightning/metrics/metric.py
Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com>
* Update CHANGELOG.md
Co-authored-by: Teddy Koker <teddy.koker@gmail.com>
Co-authored-by: Sean Naren <sean.narenthiran@gmail.com>
Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com>
2020-11-05 12:52:02 -05:00
chaton
11dc5264cd
Bugfix/4449 dict attribute error ( #4480 )
...
* resolve a bug
* resolve a bug
* remove todo
* resolve more bugs
* update tests
* Update pytorch_lightning/trainer/connectors/logger_connector/logger_connector.py
Co-authored-by: Sean Naren <sean.narenthiran@gmail.com>
* Update pytorch_lightning/trainer/connectors/logger_connector/logger_connector.py
Co-authored-by: Sean Naren <sean.narenthiran@gmail.com>
* resolve pyright
Co-authored-by: Teddy Koker <teddy.koker@gmail.com>
Co-authored-by: Sean Naren <sean.narenthiran@gmail.com>
2020-11-04 19:35:07 +00:00
ananthsub
5d08559c03
Avoid torchscript export for Metric forward ( #4428 )
...
* Update metric.py
* add test
* Update CHANGELOG.md
* Update test_metric_lightning.py
* Update test_metric_lightning.py
Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com>
2020-11-03 23:02:02 +01:00
Jeff Yang
ee414d25be
Switch to PyTorch 1.6 in Drone CI ( #4393 )
...
* switch to 1.6
* readme
* 1.7
* back to normal [ci skip]
* horovodrun --verbose
* try with apex
* add apex test
* change base
* description
* test with 1.7
* back to 1.6
* no gradient_clip_val
* re-add gradient_clip_val
* no amp
* temp skip torch.cuda.amp + horovod test
* Apply suggestion from code review
Co-authored-by: Sean Naren <sean.narenthiran@gmail.com>
* Fix formatting
* ddp
* Moved extended model outside of function to prevent pickling issue for drone
* typo
* resolve bug
* extract automatic_automization
Co-authored-by: Sean Naren <sean.narenthiran@gmail.com>
Co-authored-by: SeanNaren <sean@grid.ai>
Co-authored-by: chaton <thomas@grid.ai>
2020-11-03 18:01:51 +00:00
Adrian Wälchli
9b7f01654a
Update old "module_arguments" and "hparams" references in docs ( #4417 )
...
* replace module_arguments refernces
* update hparams docs
* add missing save_hyperparameters in example
* deprecate instead of remove
* Update docs/source/hyperparameters.rst
Co-authored-by: chaton <thomas@grid.ai>
* Update docs/source/hyperparameters.rst
Co-authored-by: Teddy Koker <teddy.koker@gmail.com>
Co-authored-by: chaton <thomas@grid.ai>
Co-authored-by: Sean Naren <sean.narenthiran@gmail.com>
2020-11-03 12:13:10 +01:00
Rohit Gupta
1396321b4d
Add fsspec to tuner ( #4458 )
...
* Add fsspec to tuner
* suggestions
* pathlib
* pep
* missed pep
2020-11-03 15:09:40 +05:30
Rohit Gupta
360b3d8844
Disable training when limit_train_batches=0 ( #4371 )
...
* Disable training when limit_train_batches=0
* chlog
* pep
* limit_train_batches
* BoringModel
Co-authored-by: Roger Shieh <sh.rog@protonmail.ch>
2020-11-03 12:10:35 +05:30
Rohit Gupta
ad2556b669
Disable saving checkpoints if not trained ( #4372 )
...
* Disable saving checkpoints if not trained
* chlog
* update test
* fix
Co-authored-by: chaton <thomas@grid.ai>
2020-11-03 11:38:32 +05:30
chaton
958aa1aee7
[test] Accumulated gradient optimization tests ( #4477 )
...
* adding tests
* wip
* update
* Update tests/trainer/test_trainer.py
Co-authored-by: Sean Naren <sean.narenthiran@gmail.com>
Co-authored-by: Sean Naren <sean.narenthiran@gmail.com>
2020-11-02 23:44:11 +00:00
chaton
ac3f7393fd
[FEAT] logging refactors 1/n ( #4439 )
...
* introducing new logging object
* typo
* typo
* Update pytorch_lightning/trainer/logging.py
Co-authored-by: Justus Schock <12886177+justusschock@users.noreply.github.com>
* Update pytorch_lightning/trainer/logging.py
Co-authored-by: Justus Schock <12886177+justusschock@users.noreply.github.com>
* update on comments
* update on comments
* add more doctstring
* Update pytorch_lightning/core/lightning.py
Co-authored-by: Sean Naren <sean.narenthiran@gmail.com>
* resolve on comments
* solve pyright
* Update pytorch_lightning/trainer/connectors/logger_connector/epoch_result_store.py
Co-authored-by: Justus Schock <12886177+justusschock@users.noreply.github.com>
* update on comments
* Update pytorch_lightning/trainer/connectors/logger_connector/epoch_result_store.py
Co-authored-by: Sean Naren <sean.narenthiran@gmail.com>
* update on comments
Co-authored-by: Justus Schock <12886177+justusschock@users.noreply.github.com>
Co-authored-by: Sean Naren <sean.narenthiran@gmail.com>
2020-11-02 20:51:43 +00:00
Carlos Mocholí
66ade19d56
Rename conflicting test directories ( #4451 )
...
* logging -> logging_tests
* warnings -> warnings_tests
Co-authored-by: Jeff Yang <ydcjeff@outlook.com>
Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com>
2020-11-03 00:03:37 +05:30
chaton
102fa9ee7d
[BUGFIX] AMP + Precision unscale grad ( #4441 )
...
* move unscale within Native plugin
* remove gradient tracking from lightning backward
* forgot trainer.fit
* typo
* update
* cleanup
* set to 1.6
* typo
* skip if below 1.6 strict
* update changelog
* remove useless code
* Update tests/plugins/test_amp_plugin.py
Co-authored-by: Sean Naren <sean.narenthiran@gmail.com>
* Update tests/plugins/test_amp_plugin.py
Co-authored-by: Sean Naren <sean.narenthiran@gmail.com>
* update changelog
* Update CHANGELOG.md
Co-authored-by: Sean Naren <sean.narenthiran@gmail.com>
Co-authored-by: Jeff Yang <ydcjeff@outlook.com>
2020-11-02 16:36:48 +00:00
Jirka Borovec
ef03c39ab7
Add step index in checkpoint name ( #3807 )
...
* true final value of global step
* ch check
* tests
* save each validation interval
* wip
* add test
* add test
* wip
* fix tests, revert old edits, fix merge conflicts, update doctests
* test + bugfix
* sort files
* format test
* suggestion by ananth
* added changelog
* naming
* docs
* example
* suggestion
Co-authored-by: Carlos Mocholí <carlossmocholi@gmail.com>
* fix test
* pep
* pep
Co-authored-by: Adrian Wälchli <aedu.waelchli@gmail.com>
Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com>
Co-authored-by: Carlos Mocholí <carlossmocholi@gmail.com>
2020-11-02 15:05:58 +01:00
chaton
c2e72c3c86
[BUG-FIX] WandbLogger _sanitize_callable ( #4422 )
...
* fix
* resolve CodeFormatter
* Update pytorch_lightning/loggers/base.py
Co-authored-by: Adrian Wälchli <aedu.waelchli@gmail.com>
Co-authored-by: Adrian Wälchli <aedu.waelchli@gmail.com>
2020-11-02 10:04:50 +01:00
Adrian Wälchli
6ae4c6ec85
update docs on checkpoint_callback Trainer argument ( #4461 )
...
* docs update
* update callbacks docs
* docs
* notebook examples
* warning
* line lenght
* update deprecation
Co-authored-by: Sean Naren <sean.narenthiran@gmail.com>
Co-authored-by: Roger Shieh <55400948+s-rog@users.noreply.github.com>
2020-11-02 06:18:20 +01:00
Lezwon Castelino
839813eb7b
timeout for tpu check ( #4340 )
...
* timeout for tpu check
* added tests
* updated CHANGELOG.md
* fixed windows tests
* Update pytorch_lightning/utilities/xla_device_utils.py
Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com>
* requested changes
Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com>
Co-authored-by: Adrian Wälchli <aedu.waelchli@gmail.com>
2020-11-01 01:04:25 +01:00
Dusan Drevicky
38bb4e2da0
[Metrics] Add multiclass auroc ( #4236 )
...
* Add functional multiclass AUROC metric
* Add multiclass_auroc tests
* fixup! Add functional multiclass AUROC metric
* fixup! fixup! Add functional multiclass AUROC metric
* Add multiclass_auroc doc reference
* Update CHANGELOG
* formatting
* Shorter error message regex match in tests
* Set num classes as pytest parameter
* formatting
* Update CHANGELOG
Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com>
Co-authored-by: Nicki Skafte <skaftenicki@gmail.com>
2020-10-30 19:56:13 +01:00
Jeff Yang
0f584faa6b
PyTorch 1.7 Stable support ( #3821 )
...
* prepare for 1.7 support [ci skip]
* tpu [ci skip]
* test run 1.7
* all 1.7, needs to fix tests
* couple with torchvision
* windows try
* remove windows
* 1.7 is here
* on purpose fail [ci skip]
* return [ci skip]
* 1.7 docker
* back to normal [ci skip]
* change to some_val [ci skip]
* add seed [ci skip]
* 4 places [ci skip]
* fail on purpose [ci skip]
* verbose=True [ci skip]
* use filename to track
* use filename to track
* monitor epoch + changelog
* Update tests/checkpointing/test_model_checkpoint.py
Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com>
Co-authored-by: Sean Naren <sean.narenthiran@gmail.com>
Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com>
2020-10-30 15:42:14 +00:00
Nicki Skafte
e0b856c105
[Metrics] Confusion matrix class interface ( #4348 )
...
* docs + precision + recall + f_beta + refactor
Co-authored-by: Teddy Koker <teddy.koker@gmail.com>
* rebase
Co-authored-by: Teddy Koker <teddy.koker@gmail.com>
* fixes
Co-authored-by: Teddy Koker <teddy.koker@gmail.com>
* added missing file
* docs
* docs
* extra import
* add confusion matrix
* add to docs
* add test
* pep8 + isort
* update tests
* move util function
* unify functional and class
* add to init
* remove old implementation
* update tests
* pep8
* add duplicate
* fix doctest
* Update pytorch_lightning/metrics/classification/confusion_matrix.py
Co-authored-by: Justus Schock <12886177+justusschock@users.noreply.github.com>
* changelog
* bullet point args
* bullet docs
* bullet docs
Co-authored-by: ananyahjha93 <ananya@pytorchlightning.ai>
Co-authored-by: Teddy Koker <teddy.koker@gmail.com>
Co-authored-by: Justus Schock <12886177+justusschock@users.noreply.github.com>
Co-authored-by: chaton <thomas@grid.ai>
Co-authored-by: Roger Shieh <55400948+s-rog@users.noreply.github.com>
Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com>
2020-10-30 11:44:25 +01:00
Adrian Wälchli
d1234c592d
deprecate passing ModelCheckpoint instance to Trainer(checkpoint_callback=...) ( #4336 )
...
* first attempt
* update tests
* support multiple
* test bugfix
* changelog
* pep
* pep
* import order
* import
* improve test for resuming
* test
* update test
* add references test
Co-authored-by: Carlos Mocholí <carlossmocholi@gmail.com>
* docstring suggestion deprecation
Co-authored-by: Jeff Yang <ydcjeff@outlook.com>
* paramref
Co-authored-by: Carlos Mocholí <carlossmocholi@gmail.com>
Co-authored-by: Jeff Yang <ydcjeff@outlook.com>
2020-10-30 04:47:37 +01:00
Martin Hwang
b459fd26ac
fix: `nb` is set total number of devices, when nb is -1. ( #4209 )
...
* fix: `nb` is set total number of devices, when nb is -1.
Refs: #4207
* feat: add test code
1. test combination `auto_select_gpus`, `gpus` options using
Trainer
2. test `pick_multiple_gpus` function directly
Refs: #4207
* docs: modify contents in `Select GPU devices`
Refs: #4207
* refactore: reflect the reuslt of review
Refs: #4207
* refactore: reflect the reuslt of review
Refs: #4207
* Update CHANGELOG.md
Co-authored-by: chaton <thomas@grid.ai>
Co-authored-by: Roger Shieh <55400948+s-rog@users.noreply.github.com>
Co-authored-by: Nicki Skafte <skaftenicki@gmail.com>
2020-10-29 10:50:37 +01:00
Boris Dayma
ff41d80706
feat(wandb): log in sync with Trainer step ( #4405 )
...
* feat(wandb): log in sync with Trainer step
* docs: update CHANGELOG
* style(test_wandb): fix formatting
* parentheses
Co-authored-by: Adrian Wälchli <aedu.waelchli@gmail.com>
Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com>
2020-10-29 01:07:06 +05:30
Jeremy Jordan
1e1a42260a
add option to log momentum ( #4384 )
...
* add option to log momentum
* add docstring
* refactor for cleanliness
Co-authored-by: Nicki Skafte <skaftenicki@gmail.com>
2020-10-28 21:56:58 +05:30
Rohit Gupta
b26c71eadf
Add optimizer hooks in callbacks ( #4379 )
...
* Add optimizer hooks in callbacks
* optimizer param
* update test
Co-authored-by: Nicki Skafte <skaftenicki@gmail.com>
2020-10-28 13:15:22 +01:00
Carlos Mocholí
00cc69aed7
Add "monitor" to saved ModelCheckpoints ( #4383 )
...
* Add key
* Remove unused variables
* Update CHANGELOG [skip ci]
* best_model_monitor -> monitor
Co-authored-by: Sean Naren <sean.narenthiran@gmail.com>
Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com>
2020-10-28 15:21:08 +05:30
Alexander
4106e2f112
Fix COMET_EXPERIMENT_KEY environment variable usage in comet logger ( #4230 )
...
* Fix COMET_EXPERIMENT_KEY environment variable usage
* Remove unused arg
* Update comet.py
* Add test by Lothiraldan
* remove blank
Co-authored-by: chaton <thomas@grid.ai>
Co-authored-by: Nicki Skafte <skaftenicki@gmail.com>
Co-authored-by: Sean Naren <sean.narenthiran@gmail.com>
2020-10-27 14:30:56 +00:00
ananthsub
6878f3bf4e
Enable DDP Plugin to pass through args to LightningDistributedDataParallel ( #4382 )
...
* Update ddp_plugin.py
* Update ddp_plugin.py
* Update ddp_plugin.py
* Update test_ddp_plugin.py
* Update pytorch_lightning/plugins/ddp_plugin.py
* Update pytorch_lightning/plugins/ddp_plugin.py
* Fixed imports, make ddp_kwargs protected
Co-authored-by: SeanNaren <sean.narenthiran@gmail.com>
2020-10-27 12:27:59 +00:00
Dusan Drevicky
c50c225f05
feature: Allow str arguments in Trainer.profiler ( #3656 )
...
* allow trainer's profiler param to have a str value
* add tests
* update docs
* update exception message
* Update CHANGELOG
* fix pep8 issues
* cleanup test code
Co-authored-by: Carlos Mocholí <carlossmocholi@gmail.com>
* Add deprecation warning if using bool for profiler
* Add deprecation tests and move deprecated tests
* Remove bool option to profiler from docs
* Deprecate bool args to profiler in CHANGELOG
* fixup! Add deprecation warning if using bool for profiler
* fixup! Add deprecation tests and move deprecated tests
* Apply suggestions from code review
Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com>
* Implement suggestions, remove whitespace
* fixup! Implement suggestions, remove whitespace
* Allow bool, str (case insensitive), BaseProfiler
* Add info about bool deprecation to trainer
* fixup! Add info about bool deprecation to trainer
* Move deprecate todo to test_deprecated
* Test wrong profiler type, improve error message
* fixup! Test wrong profiler type, improve error message
* Update pytorch_lightning/trainer/connectors/profiler_connector.py
Co-authored-by: Carlos Mocholí <carlossmocholi@gmail.com>
* Apply suggestions from code review
* Readd bool to profiler types, test cli profiler arg
* Remove extra whitespace in doc
Co-authored-by: Adrian Wälchli <aedu.waelchli@gmail.com>
* Apply suggestions from code review
Co-authored-by: Adrian Wälchli <aedu.waelchli@gmail.com>
* Update deprecation versions
Co-authored-by: Carlos Mocholí <carlossmocholi@gmail.com>
Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com>
Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com>
Co-authored-by: Adrian Wälchli <aedu.waelchli@gmail.com>
2020-10-27 16:27:16 +05:30
Chenglu
8e3faa2da1
get help from docstring ( #4344 )
...
* Add geting help message from docstring
* Fix pep8 issue
* Apply suggestions from code review
Co-authored-by: Adrian Wälchli <aedu.waelchli@gmail.com>
* 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: Jirka Borovec <Borda@users.noreply.github.com>
Co-authored-by: Sean Naren <sean.narenthiran@gmail.com>
2020-10-26 23:38:58 +05:30
chaton
f07ee33db6
BUG - Wandb: Sanitize callable. ( #4320 )
...
* add _sanitize_callable_params
* add call on _val if callable
* clean code formatter
* resolve pep8
* default return function name
* resolve pep8
* Apply suggestions from code review
Co-authored-by: Adrian Wälchli <aedu.waelchli@gmail.com>
* Update CHANGELOG.md
Co-authored-by: Sean Naren <sean.narenthiran@gmail.com>
Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com>
Co-authored-by: Adrian Wälchli <aedu.waelchli@gmail.com>
2020-10-26 11:57:03 +00:00
William Falcon
98205fb438
Enable custom apex and amp plugins ( #4355 )
...
* enable custom apex, amp plugin
* enable custom apex, amp plugin
* enable custom apex, amp plugin
* enable custom apex, amp plugin
2020-10-25 17:11:07 -04:00
Dusan Drevicky
6ad299573f
[Metrics] Fix/4237 auc unstable reorder ( #4281 )
...
* =Add deprecation warning for auc reorder
* =Add test for deprecation warning for auc reorder
* Update CHANGELOG
* Add reorder deprecation warning to auc docstring
* Fix pep8 f-string error
* remove duplicate import
Co-authored-by: Nicki Skafte <skaftenicki@gmail.com>
2020-10-25 10:26:40 +01:00
ananthsub
f6efb712ed
Skip replacing dataloader sampler if it's already a distributed sampler ( #4273 )
...
* Update data_loading.py
* Update data_loading.py
* add test + update flag description
* add to changelog
* Update test_dataloaders.py
* fix-pickle
* Update test_dataloaders.py
* Added missing reference calls
* Update tests/trainer/test_dataloaders.py
* Apply suggestions from code review
* Update data_loading.py
* Update test_dataloaders.py
Co-authored-by: Sean Naren <sean.narenthiran@gmail.com>
Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com>
2020-10-23 17:34:07 +01:00
chaton
3abfec8962
[HOTFIX] ModelCheckpoint - Don't increase current_epoch and global_step if not trained ( #4291 )
...
* add two tests w/wo tempdir
* resolve flake8
* this test is failing
* update bug report
* resolve bug and add test
* remove bug_report
* resolve flake8
* resolve bug
* resolve pep8
* resolve pep8
Co-authored-by: Teddy Koker <teddy.koker@gmail.com>
2020-10-23 11:17:50 +01:00
Rohit Gupta
4c7ebdc32b
Add dirpath and filename parameter in ModelCheckpoint ( #4213 )
...
* Add dirpath and filename parameter in ModelCheckpoint
* remove old function
* chlog
* codefactor
* update tests
* docs
* fix doctest and added tests
* pathlib dirpath
* dep version and docs
* try fix doctest
* pep
* suggestions
Co-authored-by: carmocca <carlossmocholi@gmail.com>
* suggestions
* fix test
* pep
* trigger tests
* Apply suggestions from code review
Co-authored-by: Carlos Mocholí <carlossmocholi@gmail.com>
* suggestions
* try fix windows test
* add and update some tests
* trigger tests
* Apply suggestions from code review
* Apply suggestions from code review
Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com>
Co-authored-by: Carlos Mocholí <carlossmocholi@gmail.com>
Co-authored-by: Adrian Wälchli <aedu.waelchli@gmail.com>
Co-authored-by: William Falcon <waf2107@columbia.edu>
2020-10-23 09:59:12 +05:30
Sean Naren
065cc94112
Fix bug comparing max_steps to global step which inits at 0 ( #4278 )
...
* Fix bug comparing max_steps to global step which inits at 0
* Added test to ensure accumulate grad batch works with max steps
* check fix with TODO test
* correct call counts
* Add check to ensure we've finished accumulation of this global step before exiting loop in conjuction with max steps
* Remove + 1 check in test as this was incorrect
* Update incorrect expected outputs in lr finder test
* Added brackets for clarity
Co-authored-by: Adrian Wälchli <aedu.waelchli@gmail.com>
2020-10-22 13:58:59 +01:00
Rohit Gupta
af449310aa
limit monitor callback with log_every_n_steps ( #3881 )
...
* limit monitor callback with row_log_interval
* try fix gpu test
* log_every_n_steps
* Apply suggestions from code review
* Apply suggestions from code review
* rebase and staticmethod
* suggestions
Co-authored-by: Jeff Yang <ydcjeff@outlook.com>
2020-10-22 16:38:03 +05:30
William Falcon
753362d0a4
enable ddp as a plugin ( #4285 )
...
* enable custom ddp plugin
* enable custom ddp plugin
* enable custom ddp plugin
* enable custom ddp plugin
* enable custom ddp plugin
* enable custom ddp plugin
* enable custom ddp plugin
* enable custom ddp plugin
* enable custom ddp plugin
* enable custom ddp plugin
* enable custom ddp plugin
Co-authored-by: chaton <thomas@grid.ai>
2020-10-22 05:15:51 -04:00