From 7cccc0a9bec3fa0fd2d66be66fe0b0dad9db1b79 Mon Sep 17 00:00:00 2001 From: Mozhi Zhang Date: Thu, 10 Feb 2022 15:26:04 +0800 Subject: [PATCH] update doc for passing mutator args to task-specific mutators --- docs/source/tutorial_mutators.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/docs/source/tutorial_mutators.md b/docs/source/tutorial_mutators.md index 04c752cc1c9..f2a400d7481 100644 --- a/docs/source/tutorial_mutators.md +++ b/docs/source/tutorial_mutators.md @@ -68,6 +68,22 @@ parlai display_data -t dailydialog:mutators=word_shuffle,convai2:mutators=flatte ``` +### Mutator arguments + +Some mutators have additional arguments. For example, `episode_shuffle` has an +argument `preserve_context`. + +```bash +parlai display_data -t dailydialog --mutators episode_shuffle --preserve_context True +``` + +Unfortunately, mutator arguments cannot be directly specified when using the `--task X:mutators=` format. Instead, we can pass mutator arguments through the task argument. + +```bash +parlai display_data -t dailydialog:mutators=episode_shuffle:preserve_context=True +``` + + ## Writing your own Mutators Mutators are meant to be added too. Following other patterns in ParlAI, you can