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

Wizard of Wikipedia, knowledge source page title. #3845

Merged
merged 6 commits into from
Jul 23, 2021
Merged

Conversation

mojtaba-komeili
Copy link
Contributor

Patch description
Added WikiPageTitleTeacher to the Wizard of Internet task. It generates the title of the Wikipedia page of the passage that Wizard selected as their source of knowledge, or no_passages_used if there was no selection.

Testing steps

  • Added TestWikiPageTitleTeacher to teacher tests.
  • Running ``parlai dd -t wizard_of_wikipedia:wiki_page_title`

Screen Shot 2021-07-22 at 3 25 41 PM

Copy link
Contributor

@klshuster klshuster left a comment

Choose a reason for hiding this comment

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

awesome, thanks for including this!

parlai/tasks/wizard_of_wikipedia/agents.py Outdated Show resolved Hide resolved
'--conversation-history-length',
type=int,
default=0,
help='Number of previous utterances to keep in context, 0 (default) includes all',
Copy link
Contributor

Choose a reason for hiding this comment

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

can we make the default -1? and have that map to including all? making 0 mean includes all doesn't seem right (as one could argue this should include... none)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I changed default to -1, and added something to change any non-positive value to that.

type='bool',
default=False,
help=(
'Whether to skip the example if no passage was selected. If `false` '
Copy link
Contributor

Choose a reason for hiding this comment

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

i wonder if this teacher would be more useful with this flag default to True, since we really want to train a model that can generate titles (not just generate TOKEN_NOCHOSEN). Anyway that's up to you

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I agree, that might make more sense.

@mojtaba-komeili mojtaba-komeili merged commit fb4d8aa into master Jul 23, 2021
@mojtaba-komeili mojtaba-komeili deleted the wow-titles branch July 23, 2021 03:13
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