EasyTPP Model Runner Modules
- class runner.Runner(runner_config, unique_model_dir=False, **kwargs)[source]
Bases:
Registrable
Registrable Base Runner class.
- __init__(runner_config, unique_model_dir=False, **kwargs)[source]
Initialize the base runner.
- Parameters:
runner_config (RunnerConfig) – config for the runner.
unique_model_dir (bool, optional) – whether to give unique dir to save the model. Defaults to False.
- static build_from_config(runner_config, unique_model_dir=False, **kwargs)[source]
Build up the runner from runner config.
- Parameters:
runner_config (RunnerConfig) – config for the runner.
unique_model_dir (bool, optional) – whether to give unique dir to save the model. Defaults to False.
- Returns:
the corresponding runner class.
- Return type:
- train(train_loader=None, valid_loader=None, test_loader=None, **kwargs)[source]
Train the model.
- Parameters:
train_loader (EasyTPP.DataLoader, optional) – data loader for train set. Defaults to None.
valid_loader (EasyTPP.DataLoader, optional) – data loader for valid set. Defaults to None.
test_loader (EasyTPP.DataLoader, optional) – data loader for test set. Defaults to None.
- Returns:
_description_
- Return type:
model
- class runner.TPPRunner(runner_config, unique_model_dir=False, **kwargs)[source]
Bases:
Runner
Standard TPP runner
- __init__(runner_config, unique_model_dir=False, **kwargs)[source]
Initialize the base runner.
- Parameters:
runner_config (RunnerConfig) – config for the runner.
unique_model_dir (bool, optional) – whether to give unique dir to save the model. Defaults to False.