athena.main

starting point for model training

Module Contents

Functions

parse_config(config)

parse config

parse_jsonfile(jsonfile)

parse the jsonfile, output the parameters

build_model_from_jsonfile(jsonfile)

creates model using configurations in json, load from checkpoint

train(jsonfile, Solver[, rank_size, rank])

entry point for model training, implements train loop

Attributes

SUPPORTED_DATASET_BUILDER

SUPPORTED_MODEL

SUPPORTED_OPTIMIZER

SOLVERS

DEFAULT_CONFIGS

jsonfile

athena.main.SUPPORTED_DATASET_BUILDER
athena.main.SUPPORTED_MODEL
athena.main.SUPPORTED_OPTIMIZER
athena.main.SOLVERS
athena.main.DEFAULT_CONFIGS
athena.main.parse_config(config)

parse config

athena.main.parse_jsonfile(jsonfile)

parse the jsonfile, output the parameters

athena.main.build_model_from_jsonfile(jsonfile)

creates model using configurations in json, load from checkpoint if previous models exist in checkpoint dir

athena.main.train(jsonfile, Solver, rank_size=1, rank=0)

entry point for model training, implements train loop

Parameters
  • jsonfile – json file to read configuration from

  • Solver – an abstract class that implements high-level logic of train, evaluate, decode, etc

  • rank_size – total number of workers, 1 if using single gpu

  • rank – rank of current worker, 0 if using single gpu

athena.main.jsonfile