Evaluator (Core)#
alts.core.evaluator
- class Evaluate(func)[source]#
Bases:
object
DescriptionEvaluate 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
- class Evaluator[source]#
Bases:
Configurable
DescriptionThe 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]#
- DescriptionRegisters a new experiment as the one to be evaluated.
- Parameters:
experiment (Experiment) – The experiment to be evaluated
- class LogingEvaluator(experiment)[source]#
Bases:
Evaluator
DescriptionLogs the evaluation of the experiment into a`./eval/log`
folder.- Parameters:
experiment (Experiment) – The experiment to be evaluated
- folder: str = 'log'#
- property iteration#
- DescriptionReturns the current iteration of the experiment.
- Returns:
Current iteration of the experiment
- Return type:
int
- path = './eval'#
- register(self, experiment) None [source]#
- DescriptionRegisters the experiment to be evaluated and creates the appropiate logging folders.
- Parameters:
experiment (Experiment) – The experiment to be evaluated
- root_path: str = './eval'#