[EncoderDecoder Tests] Improve tests#4046
[EncoderDecoder Tests] Improve tests#4046patrickvonplaten merged 4 commits intohuggingface:masterfrom
Conversation
Codecov Report
@@ Coverage Diff @@
## master #4046 +/- ##
==========================================
+ Coverage 78.84% 78.85% +0.01%
==========================================
Files 114 114
Lines 18689 18689
==========================================
+ Hits 14735 14737 +2
+ Misses 3954 3952 -2
Continue to review full report at Codecov.
|
LysandreJik
left a comment
There was a problem hiding this comment.
This looks great! What do you think @julien-c ?
julien-c
left a comment
There was a problem hiding this comment.
Small nit but otherwise looks good to me
Co-authored-by: Julien Chaumond <chaumond@gmail.com>
90657fe to
0ed64db
Compare
* Hoist bert model tester for patric * indent * make tests work * Update tests/test_modeling_bert.py Co-authored-by: Julien Chaumond <chaumond@gmail.com> Co-authored-by: sshleifer <sshleifer@gmail.com> Co-authored-by: Julien Chaumond <chaumond@gmail.com>
|
By the way, do you guys want to do this for all other ModelTester objects @patrickvonplaten and @sshleifer? And maybe (if relevant) define a common abstract class they inherit from? |
I think this would be a good idea. We can probably clean up the tests a lot this way! I will note it down on my To-Do-List |
|
LMK if you want to split it up @patrickvonplaten |
I tihnk I won't find time in the next 2 weeks to do this - feel free to start working on it if you want :-) |
Currently when executing:
pytest tests/test_modeling_encoder_decoder.pyall BERT tests are run as well due to problems with the import of BertModelTester (see PR #3383).This PR takes the PR: #4027 and does some minimal changes in the encoder decoder test file.
I think @sshleifer found a great solution to circumvent that by moving the
BertModelTesterclass out of the BertModelTest class.What do you think @julien-c , @LysandreJik ?