Skip to content

Fix amp deprecation issue#38100

Merged
SunMarc merged 2 commits into
mainfrom
fix-apex
Jun 2, 2025
Merged

Fix amp deprecation issue#38100
SunMarc merged 2 commits into
mainfrom
fix-apex

Conversation

@SunMarc

@SunMarc SunMarc commented May 13, 2025

Copy link
Copy Markdown
Member

What does this PR do?

Fixes #38095

apex.amp is deprecated, so we need to make sure the user have access to amp when they set half_precision_backend = "apex". Also we remove import at the beginning of trainer.py file and import it when needed.

@github-actions

Copy link
Copy Markdown
Contributor

Hi 👋, thank you for opening this pull request! The pull request is converted to draft by default. The CI will be paused while the PR is in draft mode. When it is ready for review, please click the Ready for review button (at the bottom of the PR page). This will assign reviewers and trigger CI.

@github-actions github-actions Bot marked this pull request as draft May 13, 2025 11:30
@SunMarc SunMarc marked this pull request as ready for review May 13, 2025 11:30
@HuggingFaceDocBuilderDev

Copy link
Copy Markdown

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.

@ArthurZucker ArthurZucker left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

long due thanks

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.

ImportError: cannot import name 'amp' from 'apex'

3 participants