Skip to content
This repository has been archived by the owner on Apr 9, 2022. It is now read-only.

Commit

Permalink
Update allennlp dependency (#21)
Browse files Browse the repository at this point in the history
* Update allennlp dependency

* fix calls to Embedding()

Co-authored-by: Matt Gardner <[email protected]>
  • Loading branch information
schmmd and matt-gardner authored Feb 20, 2020
1 parent e1ff04c commit 339e617
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion allennlp_semparse/models/atis/atis_semantic_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ def __init__(

self._num_entity_types = 2 # TODO(kevin): get this in a more principled way somehow?
self._entity_type_decoder_embedding = Embedding(
self._num_entity_types, action_embedding_dim
num_embeddings=self._num_entity_types, embedding_dim=action_embedding_dim
)
self._decoder_num_layers = decoder_num_layers

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -130,9 +130,11 @@ def __init__(

self._num_entity_types = 5 # TODO(mattg): get this in a more principled way somehow?
self._embedding_dim = question_embedder.get_output_dim()
self._entity_type_encoder_embedding = Embedding(self._num_entity_types, self._embedding_dim)
self._entity_type_encoder_embedding = Embedding(
num_embeddings=self._num_entity_types, embedding_dim=self._embedding_dim
)
self._entity_type_decoder_embedding = Embedding(
self._num_entity_types, action_embedding_dim
num_embeddings=self._num_entity_types, embedding_dim=action_embedding_dim
)
self._neighbor_params = torch.nn.Linear(self._embedding_dim, self._embedding_dim)

Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# To be changed to allennlp>=1.0 once that's released.
git+git://github.com/allenai/allennlp@28028a0544632307fe48e66a15a4b2a22c3dddda
git+git://github.com/allenai/allennlp@fa14bd8c177a12709a2fac0616eafaa9ad430b0a

# Used to create grammars for parsing SQL
parsimonious>=0.8.0
Expand Down

0 comments on commit 339e617

Please sign in to comment.