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

Fix T_co import bug #484

Merged
merged 3 commits into from
Jan 7, 2025
Merged

Fix T_co import bug #484

merged 3 commits into from
Jan 7, 2025

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?

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