Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PyTorch >=2.5.0 - TypeError: Type parameter +RV without a default follows type parameter with a default #1441

Open
tanwarsh opened this issue Mar 12, 2025 · 0 comments

Comments

@tanwarsh
Copy link
Collaborator

Describe the bug
Version:
PyTorch >=2.5.0
PIP > 24.1.2
Torchvision >=0.20.1

The error shown in screenshot below occurs when using a dataset with PyTorch and Torchvision.

To Reproduce
Steps to reproduce the behavior:

  1. Follow https://openfl.readthedocs.io/en/latest/tutorials/taskrunner.html# and run torch/mnist workspace with version mentioned above.

Expected behavior
The experiment should run without any issues.

Screenshots

Image

Solution

  1. Use PIP version <=24.1.2 for dependency management.
  2. Apply the following patch before importing datasets from torchvision.
import sys
import typing_extensions
sys.modules["pip._vendor.typing_extensions"] = typing_extensions
from torchvision import datasets
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant