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

Mark two logger tests as flaky #28458

Merged
merged 2 commits into from
Jan 12, 2024

Conversation

amyeroberts
Copy link
Collaborator

What does this PR do?

Two tests which capture and check the logger's output occasionally fail.

FAILED tests/test_modeling_utils.py::ModelUtilsTest::test_model_from_pretrained_with_different_pretrained_model_name - AssertionError: False is not true
FAILED tests/test_modeling_utils.py::ModelUtilsTest::test_unexpected_keys_warnings - AssertionError: "were not used when initializing ModelWithHead: ['added_key']" not found in ''

It looks like the logger isn't capturing the output. I have never been able to replicate the errors outside of circle CI, locally or on a VM.

The reason for the failure is unclear: there are other tests in the same module which utilise CaptureLogger. However, it's always these two tests which fail.

Example runs, where failing tests were unrelated to the PR:

Before submitting

  • This PR fixes a typo or improves the docs (you can dismiss the other checks if that's the case).
  • Did you read the contributor guideline,
    Pull Request section?
  • Was this discussed/approved via a Github issue or the forum? Please add a link
    to it if that's the case.
  • Did you make sure to update the documentation with your changes? Here are the
    documentation guidelines, and
    here are tips on formatting docstrings.
  • Did you write any new necessary tests?

Copy link
Collaborator

@ydshieh ydshieh left a comment

Choose a reason for hiding this comment

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

Thanks. I could take a look in the future. Would be nice to provide the error message or a link of the run page using description= in is_flaky

@amyeroberts
Copy link
Collaborator Author

@ydshieh Sure, will add!

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

@amyeroberts amyeroberts merged commit 4e36a6c into huggingface:main Jan 12, 2024
18 checks passed
@amyeroberts amyeroberts deleted the mark-flaky-logging-tests branch January 12, 2024 11:59
staghado pushed a commit to staghado/transformers that referenced this pull request Jan 15, 2024
* Mark two logger tests as flaky

* Add description to is_flaky
MadElf1337 pushed a commit to MadElf1337/transformers that referenced this pull request Jan 15, 2024
* Mark two logger tests as flaky

* Add description to is_flaky
wgifford pushed a commit to wgifford/transformers that referenced this pull request Jan 21, 2024
* Mark two logger tests as flaky

* Add description to is_flaky
AjayP13 pushed a commit to AjayP13/transformers that referenced this pull request Jan 22, 2024
* Mark two logger tests as flaky

* Add description to is_flaky
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.

3 participants