-
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: smaller TF serving test #18840
Conversation
@@ -2180,8 +2180,8 @@ def test_checkpoint_sharding_local(self): | |||
self.assertTrue(np.allclose(p1.numpy(), p2.numpy())) | |||
|
|||
def test_generate_tf_function_export(self): | |||
test_model = TFAutoModelForSeq2SeqLM.from_pretrained("hf-internal-testing/tiny-random-t5") | |||
max_length = 8 | |||
test_model = TFAutoModelForCausalLM.from_pretrained("hf-internal-testing/tiny-random-gpt2") |
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.
smaller model (saves ~10s in my machine)
test_model = TFAutoModelForSeq2SeqLM.from_pretrained("hf-internal-testing/tiny-random-t5") | ||
max_length = 8 | ||
test_model = TFAutoModelForCausalLM.from_pretrained("hf-internal-testing/tiny-random-gpt2") | ||
max_length = 2 |
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.
smaller sequences (saves ~6s in my machine)
The documentation is not available anymore as the PR was closed or merged. |
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.
Looks good to me, thanks @gante!
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.
Thank you @gante for saving the tests :-)
What does this PR do?
tests/test_modeling_tf_common.py::UtilsFunctionsTest::test_generate_tf_function_export
is often failing because it times out (>60s).The previous version took ~35s in my machine. This PR's takes ~19s, which may avoid the time out issue.
If it still fails, a custom config must be added :)