diff --git a/parlai/crowdsourcing/tasks/model_chat/model_chat_blueprint.py b/parlai/crowdsourcing/tasks/model_chat/model_chat_blueprint.py index c6dedbdf78a..bf0e74bc201 100644 --- a/parlai/crowdsourcing/tasks/model_chat/model_chat_blueprint.py +++ b/parlai/crowdsourcing/tasks/model_chat/model_chat_blueprint.py @@ -453,7 +453,7 @@ def __init__( def _get_shared_models(self, args: "DictConfig") -> Dict[str, dict]: with open(args.blueprint.model_opt_path) as f: - all_model_opts = yaml.load(f.read()) + all_model_opts = yaml.safe_load(f.read()) active_model_opts = { model: opt for model, opt in all_model_opts.items() @@ -557,5 +557,5 @@ def __init__( def _get_shared_models(self, args: "DictConfig") -> Dict[str, dict]: with open(args.blueprint.model_opt_path) as f: - model_opts = yaml.load(f.read()) + model_opts = yaml.safe_load(f.read()) return TurkLikeAgent.get_bot_agents(args=args, model_opts=model_opts)