HiveNAS#

(hivenas.HiveNAS)

Top-level module used to run the framework.

class HiveNAS[source]#

Bases: object

Encapsulates all high level modules and runs the ABC-based optimization

static find_topology(evaluation_logging=True, config_path=None)[source]#

Runs the base NAS optimization loop

Parameters
  • evaluation_logging (bool, optional) – determines whether to log evaluation info or not; defaults to True

  • config_path (str, optional) – yaml configuration file path; defaults to hard-coded config in Params

static fully_train_topology(config_path=None)[source]#

Given the current configuration file, extract the best previously-found topology and fully-train it

Parameters

config_path (str, optional) – yaml configuration file path; defaults to hard-coded config in Params

static manual_arch_evaluation(arch_str, config_path=None)[source]#

Evaluates a given architecture string (used primarily for debugging)

Parameters
  • config_path (str, optional) – yaml configuration file path; defaults to hard-coded config in Params

  • arch_str (str) – string-encoded representation of the architecture to evaluate

static set_reproducible(seed_value)[source]#

Sets the backend’s RNG seed to reproduce results.

Note: Keras has additional internal stochastic processes when using GPU acceleration. Run the framework a couple of times and you’re bound to get an exact reproduction of the rseults.

Parameters

seed_value (int) – the RNG seed value, According to Params, negative values disable reproductions and revert to default randomness

static test_numerical_optimization(evaluation_logging=True, config_path=None)[source]#

Used to test Artificial Bee Colony’s optimization on numerical benchmarks

Raises

ValueError – raised when the test_numerical_optimization is called while OPTIMIZATION_OBJECTIVE parameter is improperly set`

Parameters
  • evaluation_logging (bool, optional) – determines whether to log evaluation info or not; defaults to True

  • config_path (str, optional) – yaml configuration file path; defaults to hard-coded config in Params

  • kill_after (bool, optional) – kills the Colab runtime after completion to preserve computational units and free the instance for others to use