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

[Mutators] Check if partial_opts is None #4730

Merged
merged 1 commit into from
Aug 9, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion parlai/core/teachers.py
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,9 @@ def add_cmdline_args(
default=None,
help='Apply one or more mutators to the data.',
)
mutators = Mutator.load_mutator_types(partial_opt.get('mutators'))
mutators = Mutator.load_mutator_types(
partial_opt.get('mutators') if partial_opt else None
)
for m in mutators:
m.add_cmdline_args(parser, partial_opt)
return parser
Expand Down