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

Enable self_chat to seed messages from tasks in parlai_internal #3852

Merged
merged 2 commits into from
Jul 23, 2021

Conversation

skywalker023
Copy link
Contributor

Patch description

A fix for enabling self_chat to seed messages from tasks in parlai_internal.

Currently, when we give --task internal:xxx --seed-messages-from-task true for self_chat,
the load_openers() function will try to create a dummy task from parlai.tasks.internal.agents
instead of parlai_internal.tasks.xxx.agents and fails.

This is because the first line of load_openers() parses the basetask according to :.
As a result, when we try to seed from tasks in parlai_internal by prepending internal:, it will parse the "internal" as basetask.
So, I fixed load_openers() to pass the task as is when it starts with "internal:".
Then the create_task() will handle it seamlessly as in other circumstances.

Testing steps

Other information

Copy link
Contributor

@stephenroller stephenroller left a comment

Choose a reason for hiding this comment

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

Thanks for the contribution!

parlai/tasks/self_chat/worlds.py Outdated Show resolved Hide resolved
@stephenroller stephenroller merged commit 59774ab into facebookresearch:master Jul 23, 2021
@skywalker023
Copy link
Contributor Author

Anytime! 😆

@skywalker023 skywalker023 deleted the selfchat_internal branch August 10, 2021 03:44
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