Evaluator (Core)#

alts.core.evaluator
class Evaluate(func)[source]#

Bases: object

Description
Evaluate is a modifiable function decorator/wrapper . You may set a function that runs beforehand, afterwards, or receives the original function as an argument.
Call the currently wrapped function with Evaluate().
Parameters:

func (function) – Function to be wrapped

post(func)[source]#

pre(self, func) -> None | Description | Sets the function to run after the wrapped function.

Parameters:

func (function) – Function to run after the wrapped function

pre(self, func) None[source]#
Description
Sets the function to run before the wrapped function.
Parameters:

func (function) – Function to run before the wrapped function

warp(func)[source]#

wrap(self, func) -> None | Description | Sets the function to wrap the original function (takes the original function as an argument).

Parameters:

func (function) – Function to wrap the original function

class Evaluator[source]#

Bases: Configurable

Description
The Evaluator evaluates the results of an experiment. An evaluation can take any shape and may wrap any function of the experiment.
experiment: Experiment = Field(name=None,type=None,default=<dataclasses._MISSING_TYPE object>,default_factory=<dataclasses._MISSING_TYPE object>,init=False,repr=False,hash=None,compare=True,metadata=mappingproxy({}),_field_type=None)#
register(self, experiment) None[source]#
Description
Registers a new experiment as the one to be evaluated.
Parameters:

experiment (Experiment) – The experiment to be evaluated

class LogingEvaluator(experiment)[source]#

Bases: Evaluator

Description
Logs the evaluation of the experiment into a `./eval/log` folder.
Parameters:

experiment (Experiment) – The experiment to be evaluated

folder: str = 'log'#
property iteration#
Description
Returns the current iteration of the experiment.
Returns:

Current iteration of the experiment

Return type:

int

path = './eval'#
register(self, experiment) None[source]#
Description
Registers the experiment to be evaluated and creates the appropiate logging folders.
Parameters:

experiment (Experiment) – The experiment to be evaluated

root_path: str = './eval'#