-
Notifications
You must be signed in to change notification settings - Fork 27.1k
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
Test fetcher: missing return on filtered tests; don't write empty files #33224
Conversation
(see slack convo: https://huggingface.slack.com/archives/C014N4749J9/p1725033526299719) |
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. |
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! If the test list is empty, we should not even have the job start! I think this was fixed on main by #33220
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.
Actually saw that this was a different failure
…es (huggingface#33224) * missing return * skip files without contents * test 2 * dbg * dbg * how about this?
What does this PR do?
See title :)
This PR addresses two problems:
missing return
The
filter_tests(tests, module=module)
call always returnedNone
, because it is missing areturn
. ThisNone
would then cause the fetcher to fail: https://app.circleci.com/pipelines/github/huggingface/transformers/102546/workflows/5e358605-da6b-4c2f-886f-84c9e455a211/jobs/1365782With this return, the failing job above no longer happens, and CI runs as expected :) (see this PR)
writing empty files
The test fetcher can write empty files for a given job (e.g.
test_preparation/tests_torch_and_tf_test_list.txt
). This caused a downstream error because:Uploading artifacts
)curl
step (see here)As such, this PR changes our test fetcher to skip writing a test file if the file is empty 🤗 No file -> no job -> no problem