Skip to content

Conversation

@JingyaHuang
Copy link
Collaborator

@JingyaHuang JingyaHuang commented Nov 3, 2025

What does this PR do?

Fixes #1015

Optimum released a major 2.0 version which detached some legacy code for backends unrelated to Neuron. The PR aims at supporting Optimum 2.0 and cleaning deprecated code.

@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.

@JingyaHuang JingyaHuang marked this pull request as ready for review November 4, 2025 16:40
Copy link
Collaborator

@dacorvo dacorvo left a comment

Choose a reason for hiding this comment

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

Thanks for this pull-request !
Unless I am mistaken, starting with optimum 2.0 we must not have any __init__.py at the top level (i.e. under optimum/neuron: see the explanation.
Other than that, this looks good to me (still an issue with mobilenet in the CI).

@JingyaHuang
Copy link
Collaborator Author

Thanks @dacorvo, will fix the issue in CI. For the init file of neuron, as explained @IlyasMoutawwakil here: huggingface/optimum#2361 (comment), it seems that we don't need to remove it, the change only need to be done on the top level of Optimum main pkg.

@dacorvo
Copy link
Collaborator

dacorvo commented Nov 5, 2025

Thanks @dacorvo, will fix the issue in CI. For the init file of neuron, as explained @IlyasMoutawwakil here: huggingface/optimum#2361 (comment), it seems that we don't need to remove it, the change only need to be done on the top level of Optimum main pkg.

So I was mistaken 😉

Copy link
Collaborator

@dacorvo dacorvo left a comment

Choose a reason for hiding this comment

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

LGTM, thanks !

@dacorvo dacorvo merged commit 3924d7b into main Nov 5, 2025
30 checks passed
@dacorvo dacorvo deleted the upgrade-optimum-2.0 branch November 5, 2025 16:10
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.

Upgrade Optimum version to 2.0.0 + Python to 3.12

5 participants