Skip to content
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

Merged
merged 5 commits into from
Nov 24, 2020
Merged

Fix slow tests v2 #8746

merged 5 commits into from
Nov 24, 2020

Conversation

LysandreJik
Copy link
Member

Fix a few tests that were broken in recent PRs.

@LysandreJik LysandreJik requested a review from sgugger November 23, 2020 23:32
@@ -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)[:]
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
outputs = model(**inputs_dict)[:]
outputs = model(**inputs_dict).to_tuple()

Might be easier toread like this?

Copy link
Member Author

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.

Copy link
Collaborator

@sgugger sgugger left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for fixing!

@LysandreJik LysandreJik merged commit 6fdd0bb into master Nov 24, 2020
@LysandreJik LysandreJik deleted the fix-slow-tests-v2 branch November 24, 2020 14:35
LysandreJik added a commit that referenced this pull request Nov 24, 2020
* Fix BART test

* Fix MBART tests

* Remove erroneous line from yaml

* Update tests/test_modeling_bart.py

* Quality
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.

2 participants