Skip to content

1380 pytorch 260 - #1382

Closed
manuelgloeckler wants to merge 0 commit into
mainfrom
1380-pytorch-260
Closed

manuelgloeckler wants to merge 0 commit into
mainfrom
1380-pytorch-260

Conversation

@manuelgloeckler

Copy link
Copy Markdown
Contributor

There are some unusual issues with Pyright in the new version of PyTorch, 2.6.0. Specifically:

  • Any buffers or parameters no longer support mathematical operations according to Pyright which is wrong.
  • There are multiple Pyright errors related to modules and tensors that shouldn't be happening.

I have used "type: ignore" to bypass these issues. Probably we should add comments at each ignore that it is due to PyTorch 2.6.0. (Assuming Pyright will fix this at some point)

@manuelgloeckler manuelgloeckler linked an issue Jan 30, 2025 that may be closed by this pull request
@codecov

codecov Bot commented Jan 30, 2025 •

Copy link
Copy Markdown

Codecov Report

Attention: Patch coverage is 42.10526% with 11 lines in your changes missing coverage. Please review.

Project coverage is 78.45%. Comparing base (6d527f7) to head (de8f9c8).
Report is 18 commits behind head on main.

Files with missing lines Patch % Lines
sbi/inference/trainers/npe/npe_a.py 28.57% 5 Missing ⚠️
sbi/inference/trainers/npe/npe_c.py 0.00% 3 Missing ⚠️
sbi/inference/abc/smcabc.py 0.00% 2 Missing ⚠️
sbi/neural_nets/estimators/nflows_flow.py 0.00% 1 Missing ⚠️

❌ Your patch check has failed because the patch coverage (42.10%) is below the target coverage (50.00%). You can increase the patch coverage or adjust the target coverage.

Additional details and impacted files
@@             Coverage Diff             @@
##             main    #1382       +/-   ##
===========================================
- Coverage   89.31%   78.45%   -10.87%     
===========================================
  Files         119      119               
  Lines        8779     8786        +7     
===========================================
- Hits         7841     6893      -948     
- Misses        938     1893      +955     
Flag Coverage Δ
unittests 78.45% <42.10%> (-10.87%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
...i/neural_nets/estimators/flowmatching_estimator.py 93.10% <100.00%> (ø)
sbi/neural_nets/estimators/score_estimator.py 92.89% <100.00%> (ø)
sbi/neural_nets/net_builders/score_nets.py 95.23% <100.00%> (+0.04%) ⬆️
sbi/neural_nets/estimators/nflows_flow.py 63.46% <0.00%> (ø)
sbi/inference/abc/smcabc.py 12.34% <0.00%> (-70.07%) ⬇️
sbi/inference/trainers/npe/npe_c.py 73.15% <0.00%> (-21.48%) ⬇️
sbi/inference/trainers/npe/npe_a.py 63.91% <28.57%> (-27.40%) ⬇️

... and 31 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@manuelgloeckler

manuelgloeckler commented Mar 13, 2025 •

Copy link
Copy Markdown
Contributor Author

Unfortunately, pyright errors persists on new pyright versions with torch 2.6.0 :(

@manuelgloeckler manuelgloeckler added the blocked Something is in the way of fixing this. Refer to it in the issue label Mar 13, 2025
@janfb

janfb commented Aug 14, 2025

Copy link
Copy Markdown
Contributor

@manuelgloeckler how has this been resolved? Is it fixed in the new PyTorch release?

@manuelgloeckler
manuelgloeckler deleted the 1380-pytorch-260 branch February 17, 2026 16:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

blocked Something is in the way of fixing this. Refer to it in the issue

Projects

None yet

Development

Successfully merging this pull request may close these issues.

PyTorch 2.6.0

2 participants