def main(config, model_type=None, controller_type=None, struct_type=None, visualizer_type=None, load_path=None, save_path=None): config = copy(config) if model_type is not None: config["model_type"] = model_type if controller_type is not None: config["controller_type"] = controller_type if struct_type is not None: config["struct_type"] = struct_type if load_path is not None: config["load_path"] = load_path if save_path is not None: config["save_path"] = save_path task = Task.from_config_dict(config) metrics = task.run_experiment() if visualizer_type is not None: visualizer = visualizer_type(task) visualizer.visualize_generic_example() return metrics