QDpy
Loading...
Searching...
No Matches
qdpy.experiment.QDExperiment Class Reference
Inheritance diagram for qdpy.experiment.QDExperiment:

Public Member Functions

 set_defaultconfig_entry (self, path, val)
 fitness_type (self)
 reinit (self)
 run (self)
 several_eval_fn (self, inds)
 eval_fn (self, ind)

Protected Member Functions

 _init_seed (self, rnd_seed=None)
 Resolve and record the seed used by the experiment.

Detailed Description

Construct and run a native QD optimisation from YAML.

The file defines named containers and algorithms and identifies
``main_algorithm_name``. Domain entries named after objectives and
descriptors can supply bounds to the configured archives.

Override eval_fn for a real objective. The base evaluator draws
demonstration values from the configured domains. Override
several_eval_fn to evaluate packed candidates as a group.

:param config_filename: YAML file describing the experiment.
:param parallelism_type: Backend for ParallelismManager.
:param seed: Optional seed override for Python and NumPy.
:param base_config: Top-level configuration overrides applied after loading.

Definition at line 46 of file experiment.py.

Member Function Documentation

◆ _init_seed()

qdpy.experiment.QDExperiment._init_seed ( self,
rnd_seed = None )
protected

Resolve and record the seed used by the experiment.

Parameters
rnd_seedExplicit override, if supplied.

Use the override first, the configuration second, and a generated seed last. Record the effective value with the results.

Definition at line 131 of file experiment.py.

◆ eval_fn()

qdpy.experiment.QDExperiment.eval_fn ( self,
ind )
Return demonstration fitness, descriptors, and named scores for one candidate.

The base implementation draws random values inside declared domains.
Subclasses supply the real measurements for an application.

Definition at line 260 of file experiment.py.

◆ fitness_type()

qdpy.experiment.QDExperiment.fitness_type ( self)
First configured objective name, or None when no objective name is configured.

Definition at line 111 of file experiment.py.

◆ reinit()

qdpy.experiment.QDExperiment.reinit ( self)
Rebuild the configured archives, algorithms, logger, and output paths.

The constructor seeds the random generators before calling reinit.
This method can also be called after changing the configuration.

Definition at line 147 of file experiment.py.

◆ run()

qdpy.experiment.QDExperiment.run ( self)
Execute the selected optimiser and write result files and plots.

Use the YAML batch mode and packed evaluator settings, create the
selected executor, and close it after the run. The output directory
holds timestamped final results and grid plots.

Definition at line 205 of file experiment.py.

◆ set_defaultconfig_entry()

qdpy.experiment.QDExperiment.set_defaultconfig_entry ( self,
path,
val )
Insert a key into a nested configuration mapping using the supplied path.

Definition at line 83 of file experiment.py.

◆ several_eval_fn()

qdpy.experiment.QDExperiment.several_eval_fn ( self,
inds )
Evaluate each candidate in input order and return one result per candidate.

Definition at line 253 of file experiment.py.


The documentation for this class was generated from the following file: