-
Notifications
You must be signed in to change notification settings - Fork 28.2k
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
[generate] move max time tests #35962
Conversation
tests/generation/test_utils.py
Outdated
@@ -4300,6 +4301,46 @@ def test_generate_from_inputs_embeds_with_bos_token_id_is_none(self): | |||
with self.assertRaises(ValueError): | |||
model.generate(max_length=20, bos_token_id=None) | |||
|
|||
@slow | |||
def test_max_time(self): |
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.
(this is almost a copy from the gpt2 test. the last assertion was incorrect, and it is fixed here)
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.
(not sure class TokenHealingTestCase
is the best class for this test, but it's super nit ...)
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. |
@ydshieh it is not 🙈 moving to the right class Thank you for noticing it! |
* move max time tests to their right place * move test to the right place
* move max time tests to their right place * move test to the right place
* move max time tests to their right place * move test to the right place
What does this PR do?
2-in-1 PR:
generate()
'smax_time
flag from specific models to the generation integration tests. It is agenerate
feature, and not a model featuregpt2
had an incorrect assertion(found while working on #35802 )