cerebras.modelzoo.common.run_utils.run_with_params#
- cerebras.modelzoo.common.run_utils.run_with_params(params, model_fn, train_data_fn=None, eval_data_fn=None, extra_args_parser_fn=None)[source]#
Runs a full end-to-end CS/non-CS workflow for a given model.
- Parameters
params (Dict[str, Any]) – The parsed YAML config dictionary.
model_fn (Union[Callable[[dict], torch.nn.Module], str]) – A callable that takes in a ‘params’ argument which it uses to configure and return a torch.nn.Module
train_data_fn (Optional[Callable[[dict], torch.utils.data.DataLoader]]) – A callable that takes in a ‘params’ argument which it uses to configure and return a PyTorch dataloader corresponding to the training dataset
eval_data_fn (Optional[Callable[[dict], torch.utils.data.DataLoader]]) – A callable that takes in a ‘params’ argument which it uses to configure and return a PyTorch dataloader corresponding to the evaluation dataset
extra_args_parser_fn (Optional[Callable[[], List[argparse.ArgumentParser]]]) – An optional callable that adds any extra parser args not covered in get_parser fn.