Skip to content

Commit

Permalink
Merge branch 'master' into ci/py3.10
Browse files Browse the repository at this point in the history
  • Loading branch information
Borda committed Jan 10, 2022
2 parents a8e6ee4 + 33a9a4d commit 0a59c6b
Show file tree
Hide file tree
Showing 40 changed files with 1,185 additions and 367 deletions.
6 changes: 3 additions & 3 deletions .deepsource.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@ test_patterns = ["tests/**"]

[[analyzers]]
name = "test-coverage"
enabled = true
enabled = false

[[analyzers]]
name = "shell"
enabled = true
enabled = false

[[analyzers]]
name = "python"
enabled = true
enabled = false

[analyzers.meta]
runtime_version = "3.x.x"
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/ci_docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ on: # Trigger the workflow on push or pull request, but only for the master bran
- ".github/workflows/*docker*.yml"
- "setup.py"

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.head_ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/master' }}

jobs:
build-PL:
runs-on: ubuntu-20.04
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/ci_test-conda.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ on: # Trigger the workflow on push or pull request, but only for the master bra
pull_request:
branches: [master, "release/*"]

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.head_ref }}
cancel-in-progress: ${{ ! (github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/heads/release/')) }}

jobs:
conda:
runs-on: ubuntu-20.04
Expand All @@ -22,7 +26,7 @@ jobs:
TRANSFORMERS_CACHE: .cache/huggingface/

# Timeout: https://stackoverflow.com/a/59076067/4521646
timeout-minutes: 55
timeout-minutes: 60
steps:
- uses: actions/checkout@v2

Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/ci_test-full.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ on: # Trigger the workflow on push or pull request, but only for the master bra
branches: [master, "release/*"]
types: [opened, reopened, ready_for_review, synchronize]

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.head_ref }}
cancel-in-progress: ${{ ! (github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/heads/release/')) }}

jobs:
pytest:

Expand Down
20 changes: 19 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- `CHRFScore` ([#641](https://github.com/PyTorchLightning/metrics/pull/641))
- `TranslationEditRate` ([#646](https://github.com/PyTorchLightning/metrics/pull/646))

- Added `MultiScaleSSIM` into image metrics ([#679](https://github.com/PyTorchLightning/metrics/pull/679))


- Added a default VSCode devcontainer configuration ([#621](https://github.com/PyTorchLightning/metrics/pull/621))

Expand All @@ -28,7 +30,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Added `MinMaxMetric` to wrappers ([#556](https://github.com/PyTorchLightning/metrics/pull/556))


- Added `ignore_index` to to retrieval metrics ([#676](https://github.com/PyTorchLightning/metrics/pull/676))
- Added `ignore_index` to retrieval metrics ([#676](https://github.com/PyTorchLightning/metrics/pull/676))


- Added support for multi references in `ROUGEScore` ([#680](https://github.com/PyTorchLightning/metrics/pull/680))
Expand Down Expand Up @@ -63,6 +65,22 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
* `PearsonCorrcoef` -> `PearsonCorrCoef`
* `SpearmanCorrcoef` -> `SpearmanCorrCoef`

- Renamed audio SDR metrics: ([#711](https://github.com/PyTorchLightning/metrics/pull/711))
* `functional.sdr` -> `functional.signal_distortion_ratio`
* `functional.si_sdr` -> `functional.scale_invariant_signal_distortion_ratio`
* `SDR` -> `SignalDistortionRatio`
* `SI_SDR` -> `ScaleInvariantSignalDistortionRatio`


- Renamed audio SNR metrics: ([#712](https://github.com/PyTorchLightning/metrics/pull/712))
* `functional.snr` -> `functional.signal_distortion_ratio`
* `functional.si_snr` -> `functional.scale_invariant_signal_noise_ratio`
* `SNR` -> `SignalNoiseRatio`
* `SI_SNR` -> `ScaleInvariantSignalNoiseRatio`

- Renamed F-score metrics: ([#731](https://github.com/PyTorchLightning/metrics/pull/731))
* `torchmetrics.functional.f1` -> `torchmetrics.functional.f1_score`
* `torchmetrics.F1` -> `torchmetrics.F1Score`

### Removed

Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -266,9 +266,9 @@ acc = torchmetrics.functional.accuracy(preds, target)
We currently have implemented metrics within the following domains:

- Audio (
[SI_SDR](https://torchmetrics.readthedocs.io/en/latest/references/modules.html#si-sdr),
[SI_SNR](https://torchmetrics.readthedocs.io/en/latest/references/modules.html#si-snr),
[SNR](https://torchmetrics.readthedocs.io/en/latest/references/modules.html#snr)
[ScaleInvariantSignalDistortionRatio](https://torchmetrics.readthedocs.io/en/latest/references/modules.html#ScaleInvariantSignalDistortionRatio),
[ScaleInvariantSignalNoiseRatio](https://torchmetrics.readthedocs.io/en/latest/references/modules.html#ScaleInvariantSignalNoiseRatio),
[SignalNoiseRatio](https://torchmetrics.readthedocs.io/en/latest/references/modules.html#SignalNoiseRatio)
and [few more](https://torchmetrics.readthedocs.io/en/latest/references/modules.html#audio-metrics)
)
- Classification (
Expand Down
2 changes: 1 addition & 1 deletion azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
# how much time to give 'run always even if cancelled tasks' before stopping them
cancelTimeoutInMinutes: "2"

pool: azure-gpus-spot
pool: gridai-spot-pool

container:
image: "pytorch/pytorch:1.8.1-cuda10.2-cudnn7-runtime"
Expand Down
1 change: 1 addition & 0 deletions docs/source/links.rst
Original file line number Diff line number Diff line change
Expand Up @@ -76,3 +76,4 @@
.. _chrF score: https://aclanthology.org/W15-3049.pdf
.. _chrF++ score: https://aclanthology.org/W17-4770.pdf
.. _TER: https://aclanthology.org/2006.amta-papers.25.pdf
.. _MultiScaleSSIM: https://ece.uwaterloo.ca/~z70wang/publications/msssim.pdf
55 changes: 31 additions & 24 deletions docs/source/references/functional.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
Functional metrics
##################

*************
Audio Metrics
*************
*****
Audio
*****

pesq [func]
~~~~~~~~~~~
Expand All @@ -24,31 +24,31 @@ pit [func]
:noindex:


sdr [func]
~~~~~~~~~~
signal_distortion_ratio [func]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

.. autofunction:: torchmetrics.functional.sdr
.. autofunction:: torchmetrics.functional.signal_distortion_ratio
:noindex:


si_sdr [func]
~~~~~~~~~~~~~
scale_invariant_signal_distortion_ratio [func]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

.. autofunction:: torchmetrics.functional.si_sdr
.. autofunction:: torchmetrics.functional.scale_invariant_signal_distortion_ratio
:noindex:


si_snr [func]
~~~~~~~~~~~~~
scale_invariant_signal_noise_ratio [func]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

.. autofunction:: torchmetrics.functional.si_snr
:noindex:


snr [func]
~~~~~~~~~~
signal_noise_ratio [func]
~~~~~~~~~~~~~~~~~~~~~~~~~

.. autofunction:: torchmetrics.functional.snr
.. autofunction:: torchmetrics.functional.signal_noise_ratio
:noindex:


Expand All @@ -59,9 +59,9 @@ stoi [func]
:noindex:


**********************
Classification Metrics
**********************
**************
Classification
**************

accuracy [func]
~~~~~~~~~~~~~~~
Expand Down Expand Up @@ -122,7 +122,7 @@ dice_score [func]
f1 [func]
~~~~~~~~~~~~~~~

.. autofunction:: torchmetrics.functional.f1
.. autofunction:: torchmetrics.functional.f1_score
:noindex:


Expand Down Expand Up @@ -230,9 +230,9 @@ to_onehot [func]
.. autofunction:: torchmetrics.utilities.data.to_onehot
:noindex:

*************
Image Metrics
*************
*****
Image
*****

image_gradients [func]
~~~~~~~~~~~~~~~~~~~~~~
Expand All @@ -241,6 +241,13 @@ image_gradients [func]
:noindex:


multiscale_structural_similarity_index_measure [func]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

.. autofunction:: torchmetrics.functional.multiscale_structural_similarity_index_measure
:noindex:


psnr [func]
~~~~~~~~~~~

Expand All @@ -254,9 +261,9 @@ ssim [func]
.. autofunction:: torchmetrics.functional.ssim
:noindex:

******************
Regression Metrics
******************
**********
Regression
**********

cosine_similarity [func]
~~~~~~~~~~~~~~~~~~~~~~~~
Expand Down
Loading

0 comments on commit 0a59c6b

Please sign in to comment.