candle.benchmark_def.Benchmark

candle.benchmark_def.Benchmark#

class candle.benchmark_def.Benchmark(filepath, defmodel, framework, prog=None, desc=None, parser=None, additional_definitions=None, required=None)#

Class that implements an interface to handle configuration options for the different CANDLE benchmarks.

It provides access to all the common configuration options and configuration options particular to each individual benchmark. It describes what minimum requirements should be specified to instantiate the corresponding benchmark. It interacts with the argparser to extract command-line options and arguments from the benchmark’s configuration files.

__init__(filepath, defmodel, framework, prog=None, desc=None, parser=None, additional_definitions=None, required=None)#

Initialize Benchmark object.

Parameters:
  • filepath (string) – ./ os.path.dirname where the benchmark is located. Necessary to locate utils and establish input/ouput paths

  • defmodel (string) – ‘p*b*_default_model.txt’ string corresponding to the default model of the benchmark

:param string framework‘keras’, ‘neon’, ‘mxnet’, ‘pytorch’

framework used to run the benchmark

Parameters:
  • prog (string) – ‘p*b*_baseline_*’ string for program name (usually associated to benchmark and framework)

  • desc (string) – ‘ ‘ string describing benchmark (usually a description of the neural network model built)

  • parser (argparser) – (default None) if ‘neon’ framework a NeonArgparser is passed. Otherwise an argparser is constructed.

Methods

__init__(filepath, defmodel, framework[, ...])

Initialize Benchmark object.

check_required_exists(gparam)

Functionality to verify that the required model parameters have been specified.

format_benchmark_config_arguments(dictfileparam)

Functionality to format the particular parameters of the benchmark.

get_parameter_from_file(absfname, param)

Functionality to extract the value of one parameter from the configuration file given.

parse_parameters()

Functionality to parse options common for all benchmarks.

read_config_file(file)

Functionality to read the configue file specific for each benchmark.

set_locals()

Functionality to set variables specific for the benchmark.