-
Notifications
You must be signed in to change notification settings - Fork 26.3k
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
[docs] Add integration test example to copy pasta template #5961
[docs] Add integration test example to copy pasta template #5961
Conversation
@@ -268,7 +270,33 @@ def test_for_token_classification(self): | |||
self.model_tester.create_and_check_xxx_for_token_classification(*config_and_inputs) | |||
|
|||
@slow | |||
def test_model_from_pretrained(self): |
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 am not a fan of this thing.
It wastes time and money and is very very shallow.
self.attention_probs_dropout_prob = attention_probs_dropout_prob | ||
self.max_position_embeddings = max_position_embeddings | ||
self.type_vocab_size = type_vocab_size | ||
self.type_sequence_label_size = type_sequence_label_size |
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.
would love to not have this take any kwargs./
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.
Looks good to me, thanks!
Will add another PR since the template does not mention doc at all :-(
Codecov Report
@@ Coverage Diff @@
## master #5961 +/- ##
==========================================
- Coverage 78.50% 77.27% -1.23%
==========================================
Files 146 146
Lines 26214 26218 +4
==========================================
- Hits 20578 20259 -319
- Misses 5636 5959 +323
Continue to review full report at Codecov.
|
@@ -55,4 +55,5 @@ jobs: | |||
USE_CUDA: yes | |||
run: | | |||
source .env/bin/activate | |||
pip install -r examples/requirements.txt |
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.
diff is wrong.
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.
? That's weird
"loss": loss, | ||
"logits": logits, | ||
} | ||
self.parent.assertListEqual(list(result["logits"].size()), [self.batch_size, self.num_labels]) |
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.
ugh
@@ -55,4 +55,5 @@ jobs: | |||
USE_CUDA: yes | |||
run: | | |||
source .env/bin/activate | |||
pip install -r examples/requirements.txt |
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.
? That's weird
Encourage testing practices that have been encouraged since last update, namely:
My code is probably broken because this thing isn't tested!
Add:
"""
Try to make this test take a string and check that a resultant string == desired_result using your tokenizers encode and decode functions
""