def run(seed=543, data_path='/tmp/cifar10', output_path='/tmp/output-cifar10/', model='resnet18', batch_size=512, momentum=0.9, weight_decay=0.0001, num_workers=12, num_epochs=24, learning_rate=0.4, num_warmup_epochs=4, validate_every=3, checkpoint_every=200, backend=None, resume_from=None, log_every_iters=15, nproc_per_node=None, stop_iteration=None, with_trains=False, **spawn_kwargs):
    'Main entry to train an model on CIFAR10 dataset.\n\n    Args:\n        seed (int): random state seed to set. Default, 543.\n        data_path (str): input dataset path. Default, "/tmp/cifar10".\n        output_path (str): output path. Default, "/tmp/output-cifar10".\n        model (str): model name (from torchvision) to setup model to train. Default, "resnet18".\n        batch_size (int): total batch size. Default, 512.\n        momentum (float): optimizer\'s momentum. Default, 0.9.\n        weight_decay (float): weight decay. Default, 1e-4.\n        num_workers (int): number of workers in the data loader. Default, 12.\n        num_epochs (int): number of epochs to train the model. Default, 24.\n        learning_rate (float): peak of piecewise linear learning rate scheduler. Default, 0.4.\n        num_warmup_epochs (int): number of warm-up epochs before learning rate decay. Default, 4.\n        validate_every (int): run model\'s validation every ``validate_every`` epochs. Default, 3.\n        checkpoint_every (int): store training checkpoint every ``checkpoint_every`` iterations. Default, 200.\n        backend (str, optional): backend to use for distributed configuration. Possible values: None, "nccl", "xla-tpu",\n            "gloo" etc. Default, None.\n        nproc_per_node (int, optional): optional argument to setup number of processes per node. It is useful,\n            when main python process is spawning training as child processes.\n        resume_from (str, optional): path to checkpoint to use to resume the training from. Default, None.\n        log_every_iters (int): argument to log batch loss every ``log_every_iters`` iterations.\n            It can be 0 to disable it. Default, 15.\n        stop_iteration (int, optional): iteration to stop the training. Can be used to check resume from checkpoint.\n        with_trains (bool): if True, experiment Trains logger is setup. Default, False.\n        **spawn_kwargs: Other kwargs to spawn run in child processes: master_addr, master_port, node_rank, nnodes\n\n    '
    config = locals()
    config.update(config['spawn_kwargs'])
    del config['spawn_kwargs']
    spawn_kwargs['nproc_per_node'] = nproc_per_node
    with idist.Parallel(backend=backend, **spawn_kwargs) as parallel:
        parallel.run(training, config)
Main entry to train an model on CIFAR10 dataset.

Args:
    seed (int): random state seed to set. Default, 543.
    data_path (str): input dataset path. Default, "/tmp/cifar10".
    output_path (str): output path. Default, "/tmp/output-cifar10".
    model (str): model name (from torchvision) to setup model to train. Default, "resnet18".
    batch_size (int): total batch size. Default, 512.
    momentum (float): optimizer's momentum. Default, 0.9.
    weight_decay (float): weight decay. Default, 1e-4.
    num_workers (int): number of workers in the data loader. Default, 12.
    num_epochs (int): number of epochs to train the model. Default, 24.
    learning_rate (float): peak of piecewise linear learning rate scheduler. Default, 0.4.
    num_warmup_epochs (int): number of warm-up epochs before learning rate decay. Default, 4.
    validate_every (int): run model's validation every ``validate_every`` epochs. Default, 3.
    checkpoint_every (int): store training checkpoint every ``checkpoint_every`` iterations. Default, 200.
    backend (str, optional): backend to use for distributed configuration. Possible values: None, "nccl", "xla-tpu",
        "gloo" etc. Default, None.
    nproc_per_node (int, optional): optional argument to setup number of processes per node. It is useful,
        when main python process is spawning training as child processes.
    resume_from (str, optional): path to checkpoint to use to resume the training from. Default, None.
    log_every_iters (int): argument to log batch loss every ``log_every_iters`` iterations.
        It can be 0 to disable it. Default, 15.
    stop_iteration (int, optional): iteration to stop the training. Can be used to check resume from checkpoint.
    with_trains (bool): if True, experiment Trains logger is setup. Default, False.
    **spawn_kwargs: Other kwargs to spawn run in child processes: master_addr, master_port, node_rank, nnodes
def run(seed=543, data_path='/tmp/cifar10', output_path='/tmp/output-cifar10/', model='resnet18', batch_size=512, momentum=0.9, weight_decay=0.0001, num_workers=12, num_epochs=24, learning_rate=0.4, num_warmup_epochs=4, validate_every=3, checkpoint_every=200, backend=None, resume_from=None, log_every_iters=15, nproc_per_node=None, stop_iteration=None, with_trains=False, **spawn_kwargs):
    'Main entry to train an model on CIFAR10 dataset.\n\n    Args:\n        seed (int): random state seed to set. Default, 543.\n        data_path (str): input dataset path. Default, "/tmp/cifar10".\n        output_path (str): output path. Default, "/tmp/output-cifar10".\n        model (str): model name (from torchvision) to setup model to train. Default, "resnet18".\n        batch_size (int): total batch size. Default, 512.\n        momentum (float): optimizer\'s momentum. Default, 0.9.\n        weight_decay (float): weight decay. Default, 1e-4.\n        num_workers (int): number of workers in the data loader. Default, 12.\n        num_epochs (int): number of epochs to train the model. Default, 24.\n        learning_rate (float): peak of piecewise linear learning rate scheduler. Default, 0.4.\n        num_warmup_epochs (int): number of warm-up epochs before learning rate decay. Default, 4.\n        validate_every (int): run model\'s validation every ``validate_every`` epochs. Default, 3.\n        checkpoint_every (int): store training checkpoint every ``checkpoint_every`` iterations. Default, 200.\n        backend (str, optional): backend to use for distributed configuration. Possible values: None, "nccl", "xla-tpu",\n            "gloo" etc. Default, None.\n        nproc_per_node (int, optional): optional argument to setup number of processes per node. It is useful,\n            when main python process is spawning training as child processes.\n        resume_from (str, optional): path to checkpoint to use to resume the training from. Default, None.\n        log_every_iters (int): argument to log batch loss every ``log_every_iters`` iterations.\n            It can be 0 to disable it. Default, 15.\n        stop_iteration (int, optional): iteration to stop the training. Can be used to check resume from checkpoint.\n        with_trains (bool): if True, experiment Trains logger is setup. Default, False.\n        **spawn_kwargs: Other kwargs to spawn run in child processes: master_addr, master_port, node_rank, nnodes\n\n    '
    config = locals()
    config.update(config['spawn_kwargs'])
    del config['spawn_kwargs']
    spawn_kwargs['nproc_per_node'] = nproc_per_node
    with idist.Parallel(backend=backend, **spawn_kwargs) as parallel:
        parallel.run(training, config)