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

CI build test for neuron backend #3047

Closed
wants to merge 28 commits into from
Closed

CI build test for neuron backend #3047

wants to merge 28 commits into from

Conversation

dacorvo
Copy link
Collaborator

@dacorvo dacorvo commented Feb 21, 2025

What does this PR do?

Only used to debug the extra step added in the CI build for the neuron backend

dacorvo and others added 20 commits February 20, 2025 16:14
The base image used to compile the rust components seems to have a low
ulimit for opened files, which leads to errors during compilation.
The neuron tests require models to have been previously exported and
cached on the hub. This is done automatically by the neuron.model
fixture the first time the tests are ran for a specific version.
This fixture used to export the models using optimum-neuron directly,
but this package is not necessarily present on the system.
Instead, it is now done through the neuron TGI itself, since it
contains all the tools required to export the models.
Note that since the CI runs docker in docker (dind) it does not seem
possible to share a volume between the CI container and the container
used to export the model.
For that reason, a specific image with a modified entrypoint is built
on-the-fly when a model export is required.
The SageMaker image is built differently anyway.
@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.

@dacorvo dacorvo force-pushed the neuron_backend_ci_test branch 2 times, most recently from 71e5829 to b926ee1 Compare February 21, 2025 13:45
We now manually evaluate the apparent hash of the neuron backend by
combining the hash of the neuron backend directory and Dockerfile.
This new hash is used to identify exported neuron models instead of the
image sha.
This has two benefits:
- it changes less frequently (only hwen the neuron backend changes),
  which means less neuron models being pushed to the hub,
- it can be evaluated locally, meaning that running the tests once
  locally will export the models before the CI uses them.
@dacorvo dacorvo force-pushed the neuron_backend_ci_test branch from b926ee1 to 16793c7 Compare February 21, 2025 15:38
@dacorvo
Copy link
Collaborator Author

dacorvo commented Feb 21, 2025

Closing after successful build.

@dacorvo dacorvo closed this Feb 21, 2025
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