-
Notifications
You must be signed in to change notification settings - Fork 28.4k
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
Fix some tests #35682
Fix some tests #35682
Conversation
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. |
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.
Let's use tooslow
, otherwise LGTM!
src/transformers/testing_utils.py
Outdated
def require_torch_large_gpu(test_case, memory: float = 20): | ||
"""Decorator marking a test that requires a GPU with more than `memory` GiB of memory.""" | ||
if torch_device != "cuda": | ||
return unittest.skip(reason=f"test requires a GPU with more than {memory} GiB of memory")(test_case) | ||
|
||
return unittest.skipUnless( | ||
torch.cuda.get_device_properties(0).total_memory / 1024**3 > memory, | ||
f"test requires a GPU with more than {memory} GiB of memory", | ||
)(test_case) |
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.
we can also just use the @tooslow
😉
From what I see, |
Yes, CI will run A10 on some special events. Let's go with this new |
I have to double check if the CI bot has the access to those repo. decorated with Update: |
Thanks for double-checking @ydshieh! I applied your comments. Merging then as we agree! |
* cohere tests * glm tests * cohere2 model name * create decorator * update * fix cohere2 completions * style * style * style * add cuda in comments
* cohere tests * glm tests * cohere2 model name * create decorator * update * fix cohere2 completions * style * style * style * add cuda in comments
What does this PR do?
Fixes some tests: