Description API

This file describes the Description API interface of the Online Prediction Framework (OPF).

The Description API interface encapsulates the following two important sets of configuration parameters in OPF

  1. model creation parameters (via getDescription)
  2. task control parameters (via getExperimentTasks)

The description class objects instantiated in implements the functionality by subclassing the Description API interface.

This allows to be generic and oblivious to the specific experiments.

class nupic.frameworks.opf.exp_description_api.DescriptionIface(modelConfig, control)

This is the base interface class for description API classes which provide OPF configuration parameters.

This mechanism abstracts description API from the specific description objects created by the individual users.

TODO: logging interface?

  • modelConfig – (dict) Holds user-defined settings for model creation. See OPF here for config dict documentation.
  • control – (dict) How the model is to be run. The schema of this dictionary depends on the ‘environment’ parameter, which specifies the context in which the model is being run.

Converts the control element from Nupic format to a default OPF format with 1 task. This is useful when you have a base description file that you want to run both permutations on (which requires the Nupic environment format) and single OPF experiments on (which requires the OPF format).


Returns the task instances of the experiment description.

Returns:(dict) describing how the model is to be run
Returns:the model creation parameters based on the settings in the config



Inspects the control task and updates any stream sources it finds that are not absolute paths into paths generated by pkg_resources relative to nupic.datafiles.

class nupic.frameworks.opf.exp_description_api.ExperimentDescriptionAPI(modelConfig, control)

Bases: nupic.frameworks.opf.exp_description_api.DescriptionIface

TODO: Document this.


TODO: document


TODO: document :param stream:


TODO: document