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

Modified ActionSpaceWalker to use DomainLanguage #3006

Merged
merged 5 commits into from
Jun 25, 2019

Conversation

pdasigi
Copy link
Member

@pdasigi pdasigi commented Jun 25, 2019

Also moved the script used for searching for logical forms for WTQ from iterative-search-semparse.

@pdasigi pdasigi requested a review from matt-gardner June 25, 2019 21:16
Copy link
Contributor

@matt-gardner matt-gardner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@@ -20,7 +20,7 @@
from allennlp.data.tokenizers.word_splitter import SpacyWordSplitter
from allennlp.data.token_indexers import SingleIdTokenIndexer
from allennlp.data.token_indexers.token_indexer import TokenIndexer
from allennlp.semparse import ParsingError
from allennlp.semparse.domain_languages import ParsingError
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn't this imported at the module level? If it's not, it should be, so this line shouldn't need to be changed.

for next_set in filtered_path_indices[1:]:
return_set = return_set.intersection(next_set)
paths = [self._completed_paths[index] for index in return_set]
index_to_num_items: Dict[int, int] = defaultdict(int)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This logic is pretty hard to follow without comments explaining what's going on.

@pdasigi pdasigi merged commit 0a26739 into allenai:master Jun 25, 2019
@pdasigi pdasigi deleted the lf_search_script_fixes branch June 25, 2019 23:22
Whu-wxy added a commit to Whu-wxy/allennlp that referenced this pull request Jun 26, 2019
Modified ActionSpaceWalker to use DomainLanguage (allenai#3006)
reiyw pushed a commit to reiyw/allennlp that referenced this pull request Nov 12, 2019
* moved action space walker and lf search script from iterative search

* action space walker uses DomainLanguage

* modified script for searching nlvr logical forms

* addressed PR comments

* mypy fix
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants