-
Notifications
You must be signed in to change notification settings - Fork 297
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
Refactor get_output_from_encoder() to be member of JiantTaskModel #1283
Merged
jeswan
merged 4 commits into
js/feature/easy_add_model
from
js/feature/encoder_output_in_model_2
Mar 4, 2021
Merged
Refactor get_output_from_encoder() to be member of JiantTaskModel #1283
jeswan
merged 4 commits into
js/feature/easy_add_model
from
js/feature/encoder_output_in_model_2
Mar 4, 2021
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jeswan
changed the title
refactor getting output from encoder to be member function of jiant m…
Refactor get_output_from_encoder() to be member of JiantTaskModel
Feb 25, 2021
jeswan
force-pushed
the
js/feature/encoder_output_in_model_2
branch
from
February 25, 2021 16:13
a396f6a
to
e4245c0
Compare
Codecov Report
@@ Coverage Diff @@
## js/feature/easy_add_model #1283 +/- ##
=============================================================
+ Coverage 49.29% 49.36% +0.07%
=============================================================
Files 162 162
Lines 11186 11168 -18
=============================================================
- Hits 5514 5513 -1
+ Misses 5672 5655 -17
Continue to review full report at Codecov.
|
zphang
reviewed
Feb 26, 2021
jeswan
force-pushed
the
js/feature/encoder_output_in_model_2
branch
from
March 4, 2021 18:13
f359c91
to
3affeb3
Compare
jeswan
added a commit
that referenced
this pull request
May 4, 2021
* Update to Transformers v4.3.3 (#1266) * use default return_dict in taskmodels and remove hidden state context manager in models. * return hidden states in output of model wrapper * Switch to task model/head factories instead of embedded if-else statements (#1268) * Use jiant transformers model wrapper instead of if-else. Use taskmodel and head factory instead of if-else. * switch to ModelArchitectures enum instead of strings * Refactor get_output_from_encoder() to be member of JiantTaskModel (#1283) * refactor getting output from encoder to be member function of jiant model * switch to explicit encode() in jiant transformers model * fix simple runscript test * update to tokenizer 0.10.1 * Add tests for flat_strip() (#1289) * add flat_strip test * add list to test cases flat_strip * mlm_weights(), feat_spec(), flat_strip() if-else refactors (#1288) * moves remaining if-else statments to jiant model or replaces with model agnostic method * switch from jiant_transformers_model to encoder * fix bug in flat_strip() * Move tokenization logic to central JiantModelTransformers method (#1290) * move model specific tokenization logic to JiantTransformerModels * implement abstract methods for JiantTransformerModels * fix tasks circular import (#1296) * Add DeBERTa (#1295) * Add DeBERTa with sanity test * fix tasks circular import * [WIP] add deberta tests * Revert "fix tasks circular import" This reverts commit f924640. * deberta tests passing with transformers 6472d8 * switch to deberta-v2 * fix get_mlm_weights_dict() for deberta-v2 * update to transformers 4.5.0 * mark deberta test_export as slow * Update test_tokenization_normalization.py * add guide to add a model * fix test_expor_model tests * minor pytest fixes (add num_labels for rte, overnight flag fix) * bugfix for simple api notebook * bugfix for #1310 * bugfix for #1306: simple api notebook path name * squad running * 2nd bugfix for #1310: not all tasks have num_labels property * simple api notebook back to roberta-base * run test matrix for more steps to compare to master * save last/best model test fix Co-authored-by: Jesse Swanson <js11133Wnyu.edu>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
These changes move the if-else statements (for
ModelArchitectures
) inget_output_from_encoder()
to the newly addedJiantTransformersModel
when using__call__
.