-
Notifications
You must be signed in to change notification settings - Fork 28.1k
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 slow tests v2 #8746
Fix slow tests v2 #8746
Conversation
tests/test_modeling_bart.py
Outdated
@@ -492,7 +492,9 @@ def test_mnli_inference(self): | |||
inputs_dict = prepare_bart_inputs_dict(model.config, input_ids) | |||
# Test that model hasn't changed | |||
with torch.no_grad(): | |||
batched_logits, features = model(**inputs_dict) | |||
outputs = model(**inputs_dict)[:] |
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.
outputs = model(**inputs_dict)[:] | |
outputs = model(**inputs_dict).to_tuple() |
Might be easier toread like this?
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.
Actually the [:]
part wasn't supposed to be part of this PR. The [0]
and [1]
right below should be enough.
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 fixing!
* Fix BART test * Fix MBART tests * Remove erroneous line from yaml * Update tests/test_modeling_bart.py * Quality
Fix a few tests that were broken in recent PRs.