Options
Options
mozuma.torch.options.TorchRunnerOptions
dataclass
Options for PyTorch runners
Attributes:
Name | Type | Description |
---|---|---|
device |
torch.device |
Torch device |
data_loader_options |
dict |
Options passed to |
tqdm_enabled |
bool |
Whether to print a |
mozuma.torch.options.TorchMultiGPURunnerOptions
dataclass
Options for PyTorch multi-gpu runners
Attributes:
Name | Type | Description |
---|---|---|
data_loader_options |
dict |
Options passed to |
tqdm_enabled |
bool |
Whether to print a |
dist_options |
dict |
Options passed to |
seed |
int |
random state seed to set. Default, 543. |
Note
data_loader_options
's options batch_size
and num_worker
will be automatically scaled according to world_size
and nprocs
respectively.
For more info visit auto_dataloader
documentation.
Note
dist_options
usually include backend
and nproc_per_node
parameters.
For more info visit PyTorch Ignite's distributed documentation.
mozuma.torch.options.TorchTrainingOptions
dataclass
Options for PyTorch training runners
Attributes:
Name | Type | Description |
---|---|---|
criterion |
Union[Callable, torch.nn.Module] |
the loss function to use during training. |
optimizer |
torch.optim.Optimizer |
Optimization strategy to use during training. |
num_epochs |
int |
number of epochs to train the model. |
validate_every |
int |
run model's validation every |
checkpoint_every |
Optional[int] |
store training checkpoint every |
metrics |
Dict[str, Metric] |
Dictionary where values are Ignite's metrics to compute during evaluation. |
data_loader_options |
dict |
Options passed to |
tqdm_enabled |
bool |
Whether to print a |
dist_options |
dict |
Options passed to |
seed |
int |
random state seed to set. Default, 543. |
loggers_factory |
Callable[[Engine, Engine, Engine], None] | None |
Function to attach additional loggers to training runner and its evaluators internal (PyTorch Ignite) engines. The function receives three engines, one for training and two for evaluation, where the first is for the train set and second for the test set. |
Note
data_loader_options
's options batch_size
and num_worker
will be automatically scaled according to world_size
and nprocs
respectively.
For more info visit auto_dataloader
documentation.
Note
dist_options
usually include backend
and nproc_per_node
parameters.
For more info visit PyTorch Ignite's distributed documentation.