Skip to content

Conversation

gucci-j
Copy link
Contributor

@gucci-j gucci-j commented Jan 3, 2025

What does this PR do?

This PR fixes a bug (ImportError) when trying to import T_co with torch==2.5.0 or newer. It appears that the variable T_co has been renamed to _T_co in torch. Please see https://github.com/pytorch/pytorch/blob/ee1b6804381c57161c477caa380a840a84167676/torch/utils/data/distributed.py#L10 and https://github.com/pytorch/pytorch/blob/a1ae8fadc709f7c18788f8828ee3166f96245bec/torch/utils/data/distributed.py#L13

@HuggingFaceDocBuilderDev
Copy link
Collaborator

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.

@clefourrier
Copy link
Member

clefourrier commented Jan 6, 2025

Hi!
Thanks for the PR, it LGTM! Can you fix the styling?
I'll merge it once it's good

@gucci-j
Copy link
Contributor Author

gucci-j commented Jan 7, 2025

Hi! Thanks for the PR, it LGTM! Can you fix the styling? I'll merge it once it's good

Thanks for the review! I've just fixed the styling.

@clefourrier clefourrier merged commit 6560c75 into huggingface:main Jan 7, 2025
3 checks passed
@gucci-j gucci-j deleted the fix-tco branch January 8, 2025 11:32
@gueraf
Copy link

gueraf commented Jan 16, 2025

I think this is enough to make lighteval work with torch 2.5.1, allowing us to revert #369. Sorry if I missed it in the docs; do you have canonical instructions on how and in which environment to run all tests?

hynky1999 pushed a commit that referenced this pull request May 22, 2025
* Fix T_co import bug

* Fix styling
NathanHB pushed a commit that referenced this pull request Sep 19, 2025
* Fix T_co import bug

* Fix styling
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

Successfully merging this pull request may close these issues.

4 participants