-
Notifications
You must be signed in to change notification settings - Fork 25.6k
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: Fix CI related to #20727 #21003
Conversation
The documentation is not available anymore as the PR was closed or merged. |
@@ -3037,7 +3037,7 @@ def test_eos_token_id_int_and_list_greedy_search(self): | |||
text = """Hello, my dog is cute and""" | |||
tokens = tokenizer(text, return_tensors="pt") | |||
|
|||
model = GPT2LMHeadModel.from_pretrained("hf-internal-testing/tiny-random-gpt2").to(torch_device) |
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.
I feel it's better to keep it is, but change (line above)
tokens = tokenizer(text, return_tensors="pt")
to
tokens = tokenizer(text, return_tensors="pt").to(torch_device)
WDYT?
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.
TIL that can be done :D
Changed!
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 for the fixes!
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.
King of generate! Thanks
What does this PR do?
Fixes the error that showed up here: https://github.com/huggingface/transformers/actions/runs/3834635537/jobs/6527258530
Related to #20727