Params#

(hivenas.config.params)

All operational parameters used by HiveNAS and configuration methods.

class Params[source]#

Bases: object

Wrapper for all global operational parameters and the configuration loader

static config_form()[source]#

Facilitates the configuration UI form (for Google Colab) and exports all parameters as a dictionary

Returns

main global parameters dictionary (locals)

Return type

dict

static evaluation_strategy_config()[source]#

Returns the evaluation strategy config dict

Returns

dictionary containing the NASEval-related parameters

Return type

dict

static export_yaml(path, filename, from_formdata=False)[source]#

Saves the current configurations to the given path as yaml

Parameters
  • path (str) – output path to save the yaml config file to

  • filename (str) – output file name

  • from_formdata (bool, optional) – determines whether the export instruction originated from the Google Colab UI form or called in code. When it originates from the form, data reload is required to ensure consistency (could be altered within the form)

static get_all_config()[source]#

Returns all operational parameters

Returns

returns the dict containing all configurations (for argparsing purposes)

Return type

dict

static get_results_path()[source]#

Gets the results path from RESULTS_BASE_PATH and CONFIG_VERSION

Returns

the joined path to the results directory or None if either RESULTS_BASE_PATH or CONFIG_VERSION is invalid

Return type

str

static init_from_yaml(path)[source]#

Initializes the global parameters from a given yaml config file

Parameters

path (str) – path to yaml configuration file

static search_space_config()[source]#

Returns the search space config dict

Returns

dictionary containing the NASSearchSpace-related parameters

Return type

dict

static set_parameter(key, val)[source]#

Overrides a default parameter (used by argparser)

Parameters
  • key (str) – dictionary key to select parameter

  • val (any) – new value to override default parameter