Jirka Borovec
ee03bce7f0
fix some minor typos in docs (PL^5369)
...
* fix docs typos
* Apply suggestions from code review
Co-authored-by: Wansoo Kim <rladhkstn8@gmail.com>
* flake8
Co-authored-by: Wansoo Kim <rladhkstn8@gmail.com>
(cherry picked from commit a047323cc796dcf5d4709399083bfc4b3b411de9)
2021-02-22 01:24:20 +01:00
Jirka Borovec
1cccdc73d9
drop duplicated metric helper (PL^5366)
...
* drop duplicated metric helper
* .
* fix tests
Co-authored-by: Nicki Skafte <skaftenicki@gmail.com>
(cherry picked from commit 220dfaf7dcd12ad230ea2938d8d67a119a22e143)
2021-02-22 01:24:20 +01:00
Abhik Banerjee
261177efa2
Updated metrics/classification/precision_recall.py (PL^5348)
...
There was a typo in Documentation of Code of the ```compute()``` function of ```Recall``` metric at line 210. It said "Computes accuracy over state." which should have been "Computes recall over state."
(cherry picked from commit d568533b6ba0768ac7a6d028b3a25c5970a65e80)
(cherry picked from commit d2b7faf452890225dd4b7b62634bcbd8d0fdff96)
2021-02-22 01:24:20 +01:00
Tadej Svetina
20859b966e
Fix metric state reset (PL^5273)
...
* Fix metric state reset
* Fix test
* Improve formatting
Co-authored-by: Ananya Harsh Jha <ananya@pytorchlightning.ai>
(cherry picked from commit 26488794e1af6e2fbe05bf21de52cf999252cbe7)
(cherry picked from commit c55f02a770b5fb5f6d59c48154256ef50f8fa6f1)
2021-02-22 01:24:20 +01:00
Jirka Borovec
21081669b0
drop deprecated fbeta metrics (PL^5322)
...
* drop deprecated fbeta metrics
* flake8
* imports
* chlog
(cherry picked from commit 89cc91060057d78a51682c9d6aebc580b194a44d)
2021-02-22 01:24:20 +01:00
Nicki Skafte
8736ee01eb
R2Score (PL^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>
(cherry picked from commit 4d44437074051a24366973e1ead758ff2f44c3b2)
2021-02-22 01:24:20 +01:00
Tadej Svetina
247e085d5f
Classification metrics overhaul: stat scores (3/n) (PL^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>
(cherry picked from commit 71556b5ddd91df86ab4135aab33c2d86eee5f286)
2021-02-22 01:24:20 +01:00
Prudhvi Rampey
527fa67a7b
Implement partial auroc metric (PL^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>
(cherry picked from commit 36ea27be9d02ed4a702f0d5711808fb51bf13976)
2021-02-22 01:24:20 +01:00
Tadej Svetina
3ac52f16b5
Classification metrics overhaul: accuracy metrics (2/n) (PL^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>
(cherry picked from commit 01365eb7b22ed4fc53bd95c77e44c643e0808484)
2021-02-22 01:24:20 +01:00
Jirka Borovec
59cb104296
fix/enable - check F401 (PL^5201)
...
* refactor - check F401
* missed
* fix
(cherry picked from commit 8003acbf68160c2f3357ed966464604a2d1510e9)
2021-02-22 01:24:20 +01:00
Jirka Borovec
07f2b802ad
refactor - check E501 (PL^5200)
...
(cherry picked from commit 143714bd280aae92253609df77b5eac077debbe2)
2021-02-22 01:24:20 +01:00
Jirka Borovec
078fde2afa
refactor - check F841 (PL^5202)
...
(cherry picked from commit 94d5b043ff701bd1bc88e36691ea1667ed894ea6)
2021-02-22 01:24:20 +01:00
Jirka Borovec
048a415b26
annotat unused vars (PL^5017)
...
* annotate all unused vars
* rank_zero_warn
* Apply suggestions from code review
Co-authored-by: Carlos Mocholí <carlossmocholi@gmail.com>
* f1 fixed
Co-authored-by: Carlos Mocholí <carlossmocholi@gmail.com>
(cherry picked from commit dfbad656c493bd392c59e7d563125006b95d225c)
2021-02-22 01:24:20 +01:00
Tadej Svetina
b79e64dff0
Fix hanging metrics tests (PL^5134)
2021-02-22 01:24:20 +01:00
Roger Shieh
0f2f1fb9a0
Remove beta arg from F1 class and functional (PL^5076)
...
* remove beta from F1
* remove from functional
Co-authored-by: Teddy Koker <teddy.koker@gmail.com>
2021-02-22 01:24:20 +01:00
Roger Shieh
0eef19942b
Fix docs metrics formatting (PL^5077)
...
* fix functional f1 fbeta formatting
* Update f_beta.py
* remove line breaks
* Update f_beta.py
add line breaks and pad
* pad linea breaks with 2 spaces instead of tab
2021-02-22 01:24:20 +01:00
Jirka Borovec
829f5e8316
add back compatibility for deprecated metrics 2/n (PL^5068)
...
* add back compatibility for deprecated metrics
* fix
* imports
* imports
2021-02-22 01:24:20 +01:00
Jirka Borovec
75cd4df3ad
add back compatibility for deprecated metrics 1/n (PL^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>
2021-02-22 01:24:20 +01:00
Jirka Borovec
0f173fa5ea
drop duplicate metrics (PL^5014)
...
* drop duplicate metrics
* keep
* fix
2021-02-22 01:24:20 +01:00
Jirka Borovec
e3befa7d8b
drop deprecated reorder from AUC (PL^5004)
...
* drop deprecated reorder from AUC
* chlog
* fix
* fix
* simple
* fix
* fix
* fix
Co-authored-by: Roger Shieh <sh.rog@protonmail.ch>
2021-02-22 01:24:20 +01:00
Tadej Svetina
4b8d78b737
Classification metrics overhaul: input formatting standardization (1/n) (PL^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>
2021-02-22 01:24:20 +01:00
Nicki Skafte
fadced267d
Auto convert to contiguous format for all_gather (PL^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>
2021-02-22 01:24:20 +01:00
Nicki Skafte
dbd17ccc98
PrecisionRecallCurve, ROC and AveragePrecision class interface (PL^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>
2021-02-22 01:24:20 +01:00
Teddy Koker
57ac5569a3
Add formulas and references to metrics docs (PL^4823)
...
* precision
* precision
* recall
* f beta
* confusion matrix
* mse
* mae
* msle
* expalained variance
* psnr
* ssim
* text fp fn tp
* accuracy
* wiki -> sklearn for confusion metrix link
* confusion matrix logging note
Co-authored-by: Roger Shieh <sh.rog@protonmail.ch>
2021-02-22 01:24:20 +01:00
Adrian Wälchli
abf61c0d58
Update test for logging a metric object and state reset (PL^4825)
...
* update test
* docstring
Co-authored-by: Ananya Harsh Jha <ananya@pytorchlightning.ai>
2021-02-22 01:24:20 +01:00
Nicki Skafte
ccb9cee771
Unification of FBeta (PL^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>
2021-02-22 01:24:20 +01:00
Jeff Yang
44bb88f0fd
Update SSIM (PL^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>
2021-02-22 01:24:20 +01:00
Nicki Skafte
639bc9d165
change default behaviour of state dict (PL^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>
2021-02-22 01:24:20 +01:00
Nicki Skafte
214b9393ad
Metric ddp bugfix (PL^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>
2021-02-22 01:24:20 +01:00
Travis Addair
f2c0dbf51c
Horovod: fixed early stopping and added metrics aggregation (PL^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>
2021-02-22 01:24:20 +01:00
ananthsub
1f2e80a7b2
Avoid torchscript export for Metric forward (PL^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>
2021-02-22 01:24:20 +01:00
Nicki Skafte
d771a9abf9
Detach bugfix (PL^4313)
...
* detach on buffer
* doc update
* remove file
* changelog
* suggestions
* Update docs/source/metrics.rst
Co-authored-by: Teddy Koker <teddy.koker@gmail.com>
* fix for 4266
* Update docs/source/metrics.rst
Co-authored-by: Adrian Wälchli <aedu.waelchli@gmail.com>
* Update CHANGELOG.md
Co-authored-by: Teddy Koker <teddy.koker@gmail.com>
Co-authored-by: chaton <thomas@grid.ai>
Co-authored-by: Adrian Wälchli <aedu.waelchli@gmail.com>
Co-authored-by: Ananya Harsh Jha <ananya@pytorchlightning.ai>
Co-authored-by: Roger Shieh <sh.rog@protonmail.ch>
Co-authored-by: Sean Naren <sean.narenthiran@gmail.com>
Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com>
2021-02-22 01:24:20 +01:00
Dusan Drevicky
a2b17f6a21
Add multiclass auroc (PL^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>
2021-02-22 01:24:20 +01:00
Jeff Yang
942305aa34
PyTorch 1.7 Stable support (PL^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>
2021-02-22 01:24:20 +01:00
Nicki Skafte
06d40f7bf7
Confusion matrix class interface (PL^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>
2021-02-22 01:24:20 +01:00
Dusan Drevicky
f3a0e14290
Fix auc unstable reorder (PL^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>
2021-02-22 01:24:20 +01:00
Nicki Skafte
6af47f4aad
Unification of regression (PL^4166)
...
* moved to utility
* add files
* unify
* add desc
* update
* end of line
* Apply suggestions from code review
Co-authored-by: Justus Schock <12886177+justusschock@users.noreply.github.com>
* Apply suggestions from code review
Co-authored-by: Justus Schock <12886177+justusschock@users.noreply.github.com>
* add back functional test in new interface
* pep8
* doctest fix
* test name fix
* unify psnr + add class psnr, TODO: psnr test refactor ala mean squared error
* unify psnr
* rm unused code
* pep8
* docs
* unify ssim
* lower tolerance for ssim
* fix import
* pep8
* docs
* flake8
* test smaller images
* trying to fix test
* no ddp test for ssim
* pep8
Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com>
Co-authored-by: Justus Schock <12886177+justusschock@users.noreply.github.com>
Co-authored-by: Teddy Koker <teddy.koker@gmail.com>
2021-02-22 01:24:20 +01:00
Dusan Drevicky
f91f0d1730
iou input expectations (PL^4261)
...
* =Add iou input checks
* =Add test for iou input checks
* =Update docstring for iou pred and target
2021-02-22 01:24:20 +01:00
Akihiro Nitta
ee4cde9c4c
docs: Add empty lines in docstring [ci skip] (PL^4232)
...
* Add empty lines in docstring for proper docs
* Remove Returns:
* Remove unnecessary Returns:
* Update pytorch_lightning/accelerators/ddp2_accelerator.py
Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com>
* fix returns
Co-authored-by: William Falcon <waf2107@columbia.edu>
Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com>
2021-02-22 01:24:20 +01:00
Dusan Drevicky
4c510524ab
Fix unintended zero-only target in iou example (PL^4262)
2021-02-22 01:24:20 +01:00
Abhinav Gupta
807e9ff15f
Corrected f_beta computation (PL^4183)
...
* Update f_beta.py
Added METRIC_EPS in the denominator to avoid nan values in f_beta score.
* Update f_beta.py
Made changes flake8 compliant
* Update f_beta.py
Makes use of class_reduce for macro f_beta computation to avoid nans
* Update f_beta.py
Made flake8 compliant
* Corrected F beta computation
* Removed offset to make the computation precise
2021-02-22 01:24:20 +01:00
Jirka Borovec
1660d92373
CI: add flake8 (PL^4239)
2021-02-22 01:24:20 +01:00
Teddy Koker
0898471050
Add persistent flag to Metric.add_state (PL^4195)
...
* add persistant flag to add_state in metrics
* wrap register_buffer with try catch
* pep8
* use loose version
* test
* pep8
2021-02-22 01:24:20 +01:00
Akihiro Nitta
f5957d4220
Use `Optional` for arguments set to `None` by default (PL^4164)
...
* Use `Optional` for variables set to `None` by default
* Use `Optional` instead of `Union[None, ...]` for consistency
2021-02-22 01:24:20 +01:00
Jirka Borovec
4783673f21
Tests: clean metrics (PL^4152)
...
* namme inputs
* sk rename
* imports
2021-02-22 01:24:20 +01:00
Nicki Skafte
1a1653ad34
Speedup of metric tests (PL^4122)
...
* speedup
* something working
* update the rest
* more desc
* recurse tests/metrics again
* pep8
Co-authored-by: Teddy Koker <teddy.koker@gmail.com>
2021-02-22 01:24:19 +01:00
William Falcon
6978076ee1
notices (PL^4118)
2021-02-22 01:24:19 +01:00
William Falcon
9ee4069d0a
temporary drop metrics tests while speeding them up (PL^4071)
2021-02-22 01:24:14 +01:00
Ananya Harsh Jha
e816ebc44d
classification metrics (PL^4043)
...
* 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
Co-authored-by: Teddy Koker <teddy.koker@gmail.com>
2021-02-22 01:12:00 +01:00
Nicki Skafte
5d8bedd3ba
Update explained variance metric (PL^4024)
...
* update metrics
* pep8
* Update pytorch_lightning/metrics/regression/explained_variance.py
Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com>
* add typing for testing utils
* change from assert to raise exception
* add test for raised shape error
Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com>
2021-02-22 01:11:52 +01:00