Skip to content

Commit

Permalink
Fix broken pretrained embeddings option (#400)
Browse files Browse the repository at this point in the history
  • Loading branch information
pierregodard authored and msperber committed May 15, 2018
1 parent 8f807bb commit 3704b20
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
1 change: 0 additions & 1 deletion test/test_run.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ def test_multi_task_speech(self):
def test_preproc(self):
run.main(["test/config/preproc.yaml"])

@unittest.expectedFailure # TODO: these tests need to be fixed
def test_pretrained_emb(self):
run.main(["test/config/pretrained_embeddings.yaml"])

Expand Down
3 changes: 2 additions & 1 deletion xnmt/embedder.py
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,7 @@ def embed_sent(self, sent):
return ExpressionSequence(expr_list=embeddings, mask=sent.mask)


class PretrainedSimpleWordEmbedder(SimpleWordEmbedder):
class PretrainedSimpleWordEmbedder(SimpleWordEmbedder, Serializable):
"""
Simple word embeddings via lookup. Initial pretrained embeddings must be supplied in FastText text format.
Expand All @@ -335,6 +335,7 @@ class PretrainedSimpleWordEmbedder(SimpleWordEmbedder):

yaml_tag = '!PretrainedSimpleWordEmbedder'

@register_xnmt_handler
@serializable_init
def __init__(self,
filename,
Expand Down

0 comments on commit 3704b20

Please sign in to comment.