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

Less flaky test_assisted_decoding_matches_greedy_search #23451

Merged
merged 2 commits into from
May 18, 2023
Merged

Conversation

ydshieh
Copy link
Collaborator

@ydshieh ydshieh commented May 18, 2023

What does this PR do?

Less flaky test_assisted_decoding_matches_greedy_search: fail only if more than 1 failure among 10.

@ydshieh ydshieh requested a review from gante May 18, 2023 13:44
config, input_ids, attention_mask, max_length = self._get_input_ids_and_config(batch_size=1)
# This for loop is a naive and temporary effort to make the test less flaky.
failures = []
for i in range(10):
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

with this for loop, each test's runtime increases by ~1 second

@ydshieh ydshieh marked this pull request as ready for review May 18, 2023 14:00
@HuggingFaceDocBuilderDev
Copy link

HuggingFaceDocBuilderDev commented May 18, 2023

The documentation is not available anymore as the PR was closed or merged.

Copy link
Member

@gante gante left a comment

Choose a reason for hiding this comment

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

👍

I'm also okay with moving to a slow test -- from what I've seen, we either have a hard (non-numerical) exception or the method is fine for the model (the differences are expected due to masking, as we have discussed before).

tests/generation/test_utils.py Outdated Show resolved Hide resolved
@ydshieh ydshieh merged commit 2406dbd into main May 18, 2023
@ydshieh ydshieh deleted the less_flaky_ass branch May 18, 2023 15:28
gojiteji pushed a commit to gojiteji/transformers that referenced this pull request Jun 5, 2023
…e#23451)

* fix

* fix

---------

Co-authored-by: ydshieh <ydshieh@users.noreply.github.com>
novice03 pushed a commit to novice03/transformers that referenced this pull request Jun 23, 2023
…e#23451)

* fix

* fix

---------

Co-authored-by: ydshieh <ydshieh@users.noreply.github.com>
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