QDpy
Loading...
Searching...
No Matches
qdpy.base.Saveable Class Reference
Inheritance diagram for qdpy.base.Saveable:
qdpy.algorithms.base.QDAlgorithm qdpy.algorithms.base.Sq qdpy.algorithms.logging.AlgorithmLogger qdpy.algorithms.base.AlgWithBatchSuggestions qdpy.algorithms.base.AlgWrapper qdpy.algorithms.base.FromArchive qdpy.algorithms.base.Lambda qdpy.algorithms.dynamic_mutation.DynamicMutationMAPElites qdpy.algorithms.evolution.CMAES qdpy.algorithms.evolution.Evolution qdpy.algorithms.evolution.MutGaussian.CMAES qdpy.algorithms.gram_elites.GramElites qdpy.algorithms.modern.IsoLineMAPElites qdpy.algorithms.modern._FixedGeneration qdpy.algorithms.monte_carlo.MonteCarloElites qdpy.algorithms.sampling.SamplingDecorator qdpy.algorithms.search.RandomUniform sequence_distribution_qd._TileBaseline qdpy.algorithms.logging.TQDMAlgorithmLogger qdpy.algorithms.logging.TQDMAlgorithmLogger

Public Member Functions

Mapping[str, Any] __get_saved_state__ (self)
None save (self, str output_path, str output_type="pickle")

Detailed Description

Write a result dictionary supplied by the object.

Subclasses choose what the snapshot holds through the saved-state
hook. Result files can contain Python objects and should only be
loaded from trusted sources.

Definition at line 512 of file base.py.

Member Function Documentation

◆ __get_saved_state__()

Mapping[str, Any] qdpy.base.Saveable.__get_saved_state__ ( self)
Return a dictionary containing the relevant information to save.
By default, it includes all public attributes of the class. Must be overridden by subclasses.

Definition at line 520 of file base.py.

◆ save()

None qdpy.base.Saveable.save ( self,
str output_path,
str output_type = "pickle" )
Serialize a result dictionary and replace the destination atomically.

Write the new pickle to a temporary file in the destination directory.
Preserve the previous result if serialisation or replacement fails.

:param output_path: Destination file in an existing directory.
:param output_type: Output format. The supported value is ``pickle``.
:raises ValueError: If another output type is requested.

Definition at line 527 of file base.py.


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