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

Allow self-chats in nested task folders #3785

Merged
merged 7 commits into from
Jul 19, 2021

Conversation

EricMichaelSmith
Copy link
Contributor

@EricMichaelSmith EricMichaelSmith commented Jul 13, 2021

Patch description
Currently, it doesn't seem like we can run a self-chat world if the value of --task has a '.' in it, because the code to specify a self-chat world is parsed after we return from load_world_module() in that case. This PR shifts that logic around to not fall back on the default world before checking if we want to do self-chats.

Testing steps
CI checks, as well as checking that the following command (referring to an internal task) is now possible due to this change:

parlai self_chat \
--num-self-chats 1 \
--outfile ~/__test.jsonl \
--selfchat-max-turns 7 \
--model_file zoo:blender/blender_90M/model \
--beam-block-full-context True \
--task parlai_internal.tasks.bias_dialogue.cities.agents

Also, added testing for the self-chat and interactive mode for a long-form task string

@EricMichaelSmith EricMichaelSmith marked this pull request as draft July 13, 2021 23:00
@EricMichaelSmith EricMichaelSmith marked this pull request as ready for review July 14, 2021 12:42
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.

This seems reasonable? Any way we can add some tests? Maybe just refer to the public ones via absolute paths?


task = task_path_list[0].lower()
Copy link
Contributor

Choose a reason for hiding this comment

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

Wtf why did we lower it

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Convention, probably? Namely, none of our task folder names (convai2, blended_skill_talk, etc.) are capitalized

module_name = task_path_list[0]
else:
task = task_path_list[0].lower()
module_name = "%s.tasks.%s.worlds" % (repo, task)
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 upgrade to f-strings while we're at it

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, changed

@EricMichaelSmith EricMichaelSmith merged commit 533609f into master Jul 19, 2021
@EricMichaelSmith EricMichaelSmith deleted the allow-multifolder-self-chats branch July 19, 2021 12:40
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