ExperimentTracker#
Module: exa.core.sequence.experiment_tracker
- class ExperimentTracker(experiment)#
Bases:
objectWraps an instance of
Experimentand tracks the run IDs and analysis.ExperimentTracker behaves like a normal Experiment, but also keeps track of run IDs generated with
run()and arguments given toanalyze().The ExperimentTracker is provided so that users may subclass it to customize the behavior of
run()andanalyze(). Seeexa.sequence.definitions.trackersfor examples.Note
The ExperimentTracker is only meant to be used for one round of run-analyze. To do multiple rounds, use a new ExperimentTracker object. Otherwise, only the latest results are tracked.
- Parameters:
experiment (Experiment) – An instance of Experiment that is wrapped.
Attributes
Custom analysis function to call for the experiment instead of the native analyze method.
Returns the class name of the experiment.
Methods
Wraps :experiment analyze and captures the used arguments and resulting
AnalyzeResult.Wraps
Experiment.run()and captures the resulting run ID.Returns the captured content.
- custom_analysis: Callable[[...], AnalyzeResult] | None = None#
Custom analysis function to call for the experiment instead of the native analyze method.
- run(*args, **kwargs)#
Wraps
Experiment.run()and captures the resulting run ID.- Return type:
- analyze(custom_analysis=None, **kwargs)#
Wraps :experiment analyze and captures the used arguments and resulting
AnalyzeResult.- Parameters:
custom_analysis (Callable[[...], AnalyzeResult] | None) – Custom analysis function to call for the experiment instead of
Experiment.analyze().kwargs – Additional arguments for the analysis function.
- Returns:
The analyze result.
- Return type:
- tracked_content()#
Returns the captured content.
- Returns:
The captured result of analyze, and other data needed to reconstruct the analysis.
- Return type:
Inheritance
