forked from allenai/allennlp
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow embedding extension to load from pre-trained embeddings file. (a…
…llenai#2387) * Rough attempt for Embedder/Embedding extension. * fix some mistakes. * add tests for token-embedder and text-field-embedder extension. * fix vocab_namespace usage in embedding.py * update names and change some comments. * update embedding tests. * fix some typos. * add more tests. * update some comments. * fix minor pylint issue. * Implement extend_vocab for TokenCharactersEncoder. * minor simplification. * Update help text for --extend-vocab in fine-tune command. * Shift location of model tests appropriately. * Allow root Embedding in model to be extendable. * Incorporate PR comments in embedding.py. * Fix annotations. * Add appropriate docstrings and minor cleanup. * Resolve pylint complains. * shift disable pytlint protected-access to top of tests. * Add a test to increase coverage. * minor update in TokenEmbedder docstrings. * Allow to pass pretrained_file in embedding extension (with tests). * Remove a blank line. * Add a blank line before Returns block in Embedding docstring. * Fix pylint complains. * Allow pretrained file to be passed in token_characters_encoder also. * Fix pylint complains and update some comments. * Test to ensure trained embeddings do not get overriden. * PR feedback: update comments, fix annotation.
- Loading branch information
1 parent
174f539
commit 9719b5c
Showing
3 changed files
with
71 additions
and
9 deletions.
There are no files selected for viewing
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
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
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