Repository navigation
remove pytroch restriction - #1768
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1768 +/- ##
=======================================
Coverage ? 86.87%
=======================================
Files ? 141
Lines ? 12644
Branches ? 0
=======================================
Hits ? 10985
Misses ? 1659
Partials ? 0
Flags with carried forward coverage won't be shown. Click here to find out more. |
|
So there are two options:
The first option has the disadvantages as it allows "False-Positives" (i.e. torch unrelated thinks). The (ii) has the advantages that we need to add 70 pyright ignores across 10 files (+ every future torch line would also be type ignored). Do you have any preference for either? @janfb The only other alternative I know of is writing a custom torch ".pyi" (stubs) file, but this seems like too much. |
janfb
left a comment
There was a problem hiding this comment.
Thanks @manuelgloeckler for looking into this!
I am fine with option (i), but should add a comment in pyproject.toml for reference.
This PR updates the pyproject.toml to align with recent changes in the repository. Main changes include: - Cleaned up Pyright configuration by removing redundant 'false' flags for torch-related issues. - Updated project metadata and classifiers for better consistency. - Standardized dependency formatting. This follows the work initiated in PR sbi-dev#1768 to handle Torch 2.5+ type-stub issues more cleanly.
This finally removes dependency upper bound on torch fixing #1380.
The problem is:
This new Tensor | Module divide makes it very hard to type (e.g because buffers or parameters or Modules). This was introduce in torch 2.6 and will likely stay like this, so we have to adapt to ignore this.