Skip to content
This repository was archived by the owner on Nov 3, 2023. It is now read-only.

[LIGHT] Jericho World dataset #3957

Merged
merged 31 commits into from
Aug 31, 2021
Merged

[LIGHT] Jericho World dataset #3957

merged 31 commits into from
Aug 31, 2021

Conversation

mojtaba-komeili
Copy link
Contributor

Patch description
Added ParlAI teachers for the JerichoWorld Dataset dataset. There are two sets of teachers for predicting (1) knowledge graph (2) actions. The focus of this patch is on knowledge graph teachers; although a simple action teacher is added as well. Here is a list of main teachers that are expected to use (not abstract etc.):

StaticKGTeacher: predict knowledge graph for a single state
Screen Shot 2021-08-18 at 5 49 54 PM

ActionKGTeacher predicts mutations to the knowledge graph after an action
Screen Shot 2021-08-18 at 5 51 14 PM

StateToActionTeacher: predicts player actions given the observation
Screen Shot 2021-08-18 at 5 52 18 PM

Copy link
Contributor

@JackUrb JackUrb left a comment

Choose a reason for hiding this comment

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

Overall this implementation is looking good - thanks for taking the time to break down the Jericho dataset and figure out what was not quite aligning. Did you come up with an answer to why some of the target actions weren't aligning with the given content?

I've left some nits, mostly about documentation for things that aren't super clear. You don't need to necessarily always be documenting at this level, but it certainly helps for getting code OSS ready early on, and makes it easier to return to this later when we need it again.


# The set of words in the description of graph that we skip while checking
# for overlap between knowledge grapj vertices and the description.
GRAPH_VERT_SKIP_TOKEN = set(stopwords.words('english')) - {'you'}
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit - it's useful to include reasonings for this kind of decision when external context drove the decision. Here the choice to leave out "you" is deliberate, but the note just describes what these tokens are used for.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added extra explanation.

return True
return False

def keep_edge(edge, text_tokens):
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm not sure I follow what your keep_edge heuristic is here - so we keep all 'you in X' and 'you have X', but otherwise we keep edges where the subject and object are in the text? Probably could use a quick one line desc to this effect.

'''
Returns true if all the components of the edge are in the given text, or if it is the player location or unpruned inventory
'''

Sure this documentation isn't required, but it makes it easier to grok what's happening.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Explained it in details in the method docstring.

@mojtaba-komeili
Copy link
Contributor Author

Overall this implementation is looking good - thanks for taking the time to break down the Jericho dataset and figure out what was not quite aligning. Did you come up with an answer to why some of the target actions weren't aligning with the given content?

I've left some nits, mostly about documentation for things that aren't super clear. You don't need to necessarily always be documenting at this level, but it certainly helps for getting code OSS ready early on, and makes it easier to return to this later when we need it again.

I couldn't figure out many of them, so ended up dropping them if them if they were detected as incomplete. But was able to "patch" some of them to some extent by checking the step before/after. I reached out to them about clarifying, but haven't received any response yet.

@mojtaba-komeili mojtaba-komeili merged commit 6c56a29 into master Aug 31, 2021
@mojtaba-komeili mojtaba-komeili deleted the jericho-world branch August 31, 2021 14:24
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants