-
Notifications
You must be signed in to change notification settings - Fork 31.7k
[CI] Automatic rerun of certain test failures #36694
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
Conversation
|
Hi 👋, thank you for opening this pull request! The pull request is converted to draft by default. When it is ready for review, please click the |
|
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. |
bc0e16c to
22a4df5
Compare
| RUN uv pip install --no-cache-dir --no-deps accelerate --extra-index-url https://download.pytorch.org/whl/cpu | ||
| RUN uv pip install --no-cache-dir "transformers[ja,testing,sentencepiece,jieba,spacy,ftfy,rjieba]" unidic unidic-lite | ||
| RUN uv pip install --no-cache-dir --no-deps accelerate --extra-index-url https://download.pytorch.org/whl/cpu | ||
| RUN uv pip install --no-cache-dir "git+https://github.com/huggingface/transformers.git@${REF}#egg=transformers[ja,testing,sentencepiece,jieba,spacy,ftfy,rjieba]" unidic unidic-lite |
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.
A little confused about this line - is this to ensure the tests get fixed now rather than waiting for a release?
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.
No, this is to build the dev image correctly :)
Previous version of these dockerfiles: we installed from pypi's transformers, the latest release.
This version: we install from the latest commit in the REF branch, REF being the branch that pushes a commit.
In other words, these images were not affected by the changes in setup.py until a release, even when building new dev images. This pattern exists in all docker images, but was missing on these. As a result, before the changes in the dockerfiles, CI crashed because these images didn't have the new testing requirement :)
ydshieh
left a comment
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 think we need to add pytest-rerunfailures to
extras["testing"] = (
and make sure all docker files (used for circleci test jobs) have testing.
Am I right ?
Nice for
git+https://github.com/huggingface/transformers.git@${REF}
@ydshieh good catch! I added it to the PR that builds the dev image, but forgot to add it here. Added ✅ |
|
image pushed in #36427 , merging |
ArthurZucker
left a comment
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.
thanks all for working on this!
What does this PR do?
Adds
pytest-rerunfailuresto our push CI. This should help stabilize our CI and allow faster dev cycles 🤗In a nutshell, if a test failure has a substring in the newly added
FLAKY_TEST_FAILURE_PATTERNSvariable (.circleci/create_circleci_config.py), that test is repeated up to 5 times.FLAKY_TEST_FAILURE_PATTERNSin this PR includes the following categories of failures:'OSError'/'Timeout'-- generic transient machine/connection errors'HTTPError.*502'/'HTTPError.*504'-- hub HTTP failures"AssertionError: Tensor-likes are not close!"-- unluckytorch.testing.assert_closecasesThank you for the suggestion @Wauplin 💛
Follow up: remove some uses of
@is_flaky(), since they serve the same purpose:@is_flaky()additions that I couldn't reproduce with--flake-finder --flake-runs 1000@is_flaky()that were tagged because one of the criteria in the list aboveSee diff in this commit
Corresponding PR for docker image update: #36427