Skip to content

Conversation

@gante
Copy link
Contributor

@gante gante commented Jan 29, 2025

What does this PR do?

2-in-1 PR:

  1. Moves the tests regarding generate()'s max_time flag from specific models to the generation integration tests. It is a generate feature, and not a model feature
  2. Fixes the test -- e.g. the one on gpt2 had an incorrect assertion

(found while working on #35802 )

@gante gante requested a review from ydshieh January 29, 2025 16:23
model.generate(max_length=20, bos_token_id=None)

@slow
def test_max_time(self):
Copy link
Contributor Author

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)

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.

(not sure class TokenHealingTestCase is the best class for this test, but it's super nit ...)

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

@gante
Copy link
Contributor Author

gante commented Jan 29, 2025

@ydshieh it is not 🙈 moving to the right class

Thank you for noticing it!

@gante gante merged commit 4d3b107 into huggingface:main Jan 29, 2025
25 checks passed
@gante gante deleted the fix_max_time_tests branch January 29, 2025 17:56
bursteratom pushed a commit to bursteratom/transformers that referenced this pull request Feb 5, 2025
* move max time tests to their right place

* move test to the right place
elvircrn pushed a commit to elvircrn/transformers that referenced this pull request Feb 13, 2025
* move max time tests to their right place

* move test to the right place
sbucaille pushed a commit to sbucaille/transformers that referenced this pull request Feb 16, 2025
* move max time tests to their right place

* move test to the right place
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