Skip to content

Commit

Permalink
Added missing typehints for run method of CIFAR10 (pytorch#2718)
Browse files Browse the repository at this point in the history
  • Loading branch information
vfdev-5 committed Sep 21, 2022
1 parent af0641b commit fd62e70
Showing 1 changed file with 22 additions and 21 deletions.
43 changes: 22 additions & 21 deletions examples/contrib/cifar10/main.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
from datetime import datetime
from pathlib import Path
from typing import Any, Optional

import fire
import torch
Expand Down Expand Up @@ -136,27 +137,27 @@ def _():


def run(
seed=543,
data_path="/tmp/cifar10",
output_path="/tmp/output-cifar10/",
model="resnet18",
batch_size=512,
momentum=0.9,
weight_decay=1e-4,
num_workers=12,
num_epochs=24,
learning_rate=0.4,
num_warmup_epochs=4,
validate_every=3,
checkpoint_every=1000,
backend=None,
resume_from=None,
log_every_iters=15,
nproc_per_node=None,
stop_iteration=None,
with_clearml=False,
with_amp=False,
**spawn_kwargs,
seed: int = 543,
data_path: str = "/tmp/cifar10",
output_path: str = "/tmp/output-cifar10/",
model: str = "resnet18",
batch_size: int = 512,
momentum: float = 0.9,
weight_decay: float = 1e-4,
num_workers: int = 12,
num_epochs: int = 24,
learning_rate: float = 0.4,
num_warmup_epochs: int = 4,
validate_every: int = 3,
checkpoint_every: int = 1000,
backend: Optional[str] = None,
resume_from: Optional[str] = None,
log_every_iters: int = 15,
nproc_per_node: Optional[int] = None,
stop_iteration: Optional[int] = None,
with_clearml: bool = False,
with_amp: bool = False,
**spawn_kwargs: Any,
):
"""Main entry to train an model on CIFAR10 dataset.
Expand Down

0 comments on commit fd62e70

Please sign in to comment.