Bases: watcher.common.loader.loadable.Loadable
A base class for all the Scoring Engines.
A Scoring Engine is an instance of a data model, to which the learning data was applied.
Please note that this class contains non-static and non-class methods by design, so that it’s easy to create multiple Scoring Engine instances using a single class (possibly configured differently).
Calculates a score value based on arguments passed.
Scoring Engines might be very different to each other. They might solve different problems or use different algorithms or frameworks internally. To enable this kind of flexibility, the method takes only one argument (string) and produces the results in the same format (string). The consumer of the Scoring Engine is ultimately responsible for providing the right arguments and parsing the result.
Parameters: | features (str) – Input data for Scoring Engine |
---|---|
Returns: | A score result |
Return type: | str |
Defines the configuration options to be associated to this loadable
Returns: | A list of configuration options relative to this Loadable |
---|---|
Return type: | list of oslo_config.cfg.Opt instances |
Returns the description of the Scoring Engine.
The description might contain any human readable information, which might be useful for Strategy developers planning to use this Scoring Engine. It will be also visible in the Watcher API and CLI.
Returns: | A Scoring Engine description |
---|---|
Return type: | str |
Returns the metadata information about Scoring Engine.
The metadata might contain a machine-friendly (e.g. in JSON format) information needed to use this Scoring Engine. For example, some Scoring Engines require to pass the array of features in particular order to be able to calculate the score value. This order can be defined in metadata and used in Strategy.
Returns: | A Scoring Engine metadata |
---|---|
Return type: | str |
Bases: watcher.common.loader.loadable.Loadable
A base class for all the Scoring Engines Containers.
A Scoring Engine Container is an abstraction which allows to plugin multiple Scoring Engines as a single Stevedore plugin. This enables some more advanced scenarios like dynamic reloading of Scoring Engine implementations without having to restart any Watcher services.