Skip to content

changed the type of the parameter data_range from the classes and fun…#3349

Open
f-fuchs wants to merge 1 commit intoLightning-AI:masterfrom
f-fuchs:master
Open

changed the type of the parameter data_range from the classes and fun…#3349
f-fuchs wants to merge 1 commit intoLightning-AI:masterfrom
f-fuchs:master

Conversation

@f-fuchs
Copy link
Copy Markdown

@f-fuchs f-fuchs commented Mar 27, 2026

changed the type of the parameter data_range from the classes and functional implementations of psnr and psnrb from tuple to sequence. I also changed the type of dim from tuple to Sequence because internally it was casted to list anyway.

What does this PR do?

  • Changes the type of data_range from tuple to Sequence as discussed in Enchance use of data_range in image metrics #1606, for both the classes and functional implementations of PSNR and PSNRB
  • Changes the type of dim from tuple to Sequence for both the class and functional implementation of PSNR

📚 Documentation preview 📚: https://torchmetrics--3349.org.readthedocs.build/en/3349/

…ctional implementations of psnr and psnrb from tuple to sequence
@codecov
Copy link
Copy Markdown

codecov bot commented Apr 1, 2026

Codecov Report

❌ Patch coverage is 28.57143% with 5 lines in your changes missing coverage. Please review.
✅ Project coverage is 31%. Comparing base (5e8b01d) to head (2b4d535).

❌ Your project check has failed because the head coverage (31%) is below the target coverage (95%). You can increase the head coverage or adjust the target coverage.

❗ There is a different number of reports uploaded between BASE (5e8b01d) and HEAD (2b4d535). Click for more details.

HEAD has 742 uploads less than BASE
Flag BASE (5e8b01d) HEAD (2b4d535)
macOS 28 2
python3.10 152 11
cpu 200 15
torch2.0.1 14 1
torch2.8.0 14 1
python3.12 48 4
torch2.0.1+cpu 26 2
Windows 22 2
torch2.8.0+cpu 35 3
Linux 150 11
torch2.7.1+cpu 27 2
torch2.3.1+cpu 14 1
torch2.2.2+cpu 14 1
torch2.1.2+cpu 14 1
torch2.4.1+cpu 14 1
torch2.6.0+cpu 14 1
gpu 1 0
unittest 1 0
torch2.5.1+cpu 14 1
Additional details and impacted files
@@           Coverage Diff            @@
##           master   #3349     +/-   ##
========================================
- Coverage      37%     31%     -6%     
========================================
  Files         364     349     -15     
  Lines       20096   19903    -193     
========================================
- Hits         7521    6199   -1322     
- Misses      12575   13704   +1129     
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant