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 the bug that Trainer cannot correctly call torch_jit_model_eval #35722

Merged
merged 1 commit into from
Jan 16, 2025

Conversation

Wanguy
Copy link
Contributor

@Wanguy Wanguy commented Jan 16, 2025

What does this PR do?

Fix the bug that the accelerator.autocast does not pass parameters correctly when calling torch_jit_model_eval (#35706)

Accelerator.autocast no longer accepts a cache_enabled arg, users must make an AutocastKwargs instance and pass it in as a kwarg handler. (from 🚨🚨🚨 The Great Deprecation 🚨🚨🚨)

Before submitting

Who can review?

@SunMarc

Copy link
Member

@SunMarc SunMarc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks ! Left a comment

src/transformers/trainer.py Show resolved Hide resolved
Copy link
Member

@SunMarc SunMarc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM !

@SunMarc SunMarc merged commit 8b78d9d into huggingface:main Jan 16, 2025
25 checks passed
@HuggingFaceDocBuilderDev

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.

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.

3 participants