Skip to content

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
# 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.

3 participants