-
Notifications
You must be signed in to change notification settings - Fork 26.7k
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
Install the tensorflow example requirements in docker #31428
Install the tensorflow example requirements in docker #31428
Conversation
@amyeroberts There are PT example failures too, possibly related (e.g see here, from this PR) |
@gante Thanks for flagging!
Scratch all that. If we're installing from the library's |
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. |
@gante Are you sure the linked PR is from the latest main? If I look at recent runs for |
It makes Thank you! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll open a fix for both next week, but we should not allow such quick fixes anymore given that the process to update the docker image is super straigforward now
@@ -326,7 +326,7 @@ def job_name(self): | |||
"examples_tensorflow", | |||
cache_name="tensorflow_examples", | |||
docker_image=[{"image":"huggingface/transformers-examples-tf"}], | |||
install_steps=["uv venv && uv pip install ."], | |||
install_steps=["uv venv && uv pip install . && uv pip install -r examples/tensorflow/_tests_requirements.txt"], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mmmm again, that is not what we should do. The CI is gonna get slower because we just need the docker that is built to run this.
@ArthurZucker I think "not allow" is very strong here for fixing something which would essentially be required anyway: regardless of upstream changes to the docker images (and how easy that is to implement) the commands for setting up our examples runs were not consistent. So, either, we need to have inconsistent docker images for the different frameworks (harder to maintain) or the pytorch command would need to be updated to remove the requirements install |
@amyeroberts possibly not, can't confirm 👼 In any case, rebasing to the latest |
We already have different docker images for different frameworks, and docker image exist for example_tensorflow and example_torch. So I think we do need to update this but the idea is to make sure we don't install anything in the CIs |
Make sense. Sorry I didn't think of this aspect. We can definitely take the requirements in |
Yes, I'd expect the docker images to be different. After all, we need one with a tensorflow environment and one for torch. Their overall setup should be consistent though, and the errors which were being experienced on the CI highlighted that they weren't (the pytorch one was reliant on the requirements installs, whereas TF wasn't). Once the docker images have been updated, we can remove the installs here. And, I'm assuming the |
I guess those are better to be kept even if we update the docker file, although I don't feel strong (as it means there are duplication and we have to keep them synced.). Or better, if we can use |
Yes please :) |
Lines 466 to 479 in 682f221
should be what we are looking for! Either this or the requirement but yes everything should be in the docker build |
What does this PR do?
Unlike the pytorch examples here the docker file used to run the tensorflow examples doesn't install the requirements from the examples requirements file.
Recently, we had to pin the datasets version used for the examples #31417, but this wasn't propogated for tensorflow because of this omisison.
This means added requirements won't be included, and is currently causing failing tests on main: https://app.circleci.com/pipelines/github/huggingface/transformers/95698/workflows/52a112da-0d84-4569-8f69-ca180f4c7b2a/jobs/1260731