QDpy
Loading...
Searching...
No Matches
results.py File Reference

Versioned experiment metadata and portable numeric grid snapshots. More...

Go to the source code of this file.

Namespaces

namespace  qdpy

Functions

 qdpy.results._json_value (value)
 Convert configuration to JSON, preserving iteration order and tagging nonfinite floats.
 qdpy.results._decode_float (value)
 Decode reserved tags used for nonfinite configuration values and bounds.
 qdpy.results._json_bytes (value)
 Encode a portable JSON document as UTF-8.
 qdpy.results._write (path, payload)
 Publish a complete file atomically on the output filesystem.
 qdpy.results._numeric_row (values)
 Preserve integer and floating point measurements without converting integer genomes.
 qdpy.results._grid_snapshot (grid)
 Record built-in grid geometry, admission settings, and live entries.
 qdpy.results.export_grid (grid, path)
 Write a numeric archive snapshot without pickle or estimator objects.
 qdpy.results._restore_grid (snapshot)
 qdpy.results.load_grid (path, *, expected_sha256=None)
 Load a portable grid without executing serialized Python.
 qdpy.results.grid_to_dataframe (grid)
 Expose archive rows and geometry to pandas.
 qdpy.results._installed_versions ()
 Record the installed versions relevant to QDpy and its integrations.
 qdpy.results._source_revision ()
 Resolve the source revision for a checkout, VCS install or stamped build.
 qdpy.results._evaluator_info (evaluate)
 Identify an evaluator and retain positional and keyword bindings of partials.
 qdpy.results.read_run_manifest (path)
 Read a versioned manifest and restore tagged values.
 qdpy.results.write_run_manifest (path, algorithm, *, configuration, evaluate, execution, initial_evaluations=0, final_pickle=None, bundle=None)
 Write run metadata and, when supported, a content-addressed grid result.

Detailed Description

Versioned experiment metadata and portable numeric grid snapshots.

Definition in file results.py.

Function Documentation

◆ _restore_grid()

qdpy.results._restore_grid ( snapshot)
protected
Rebuild a portable archive in storage order, validating every admission.

Definition at line 208 of file results.py.

◆ export_grid()

qdpy.results.export_grid ( grid,
path )

Write a numeric archive snapshot without pickle or estimator objects.

Export a built-in grid and return its SHA-256 fingerprint.

Rows follow archive storage order. They contain the numeric genome,
effective fitness and descriptors, and the stored cell. A CVT file
includes centroid coordinates and a Sliding Boundaries file records
its current bin edges. Specialized grids include admission settings.
The snapshot is for inspection, comparison, and plotting. Custom
objects, historical offers, and optimiser state use other formats.

Definition at line 133 of file results.py.

◆ grid_to_dataframe()

qdpy.results.grid_to_dataframe ( grid)

Expose archive rows and geometry to pandas.

Return an independent DataFrame of numeric elite records in storage order.

The columns are ``cell``, ``genome``, ``fitness``, ``fitness_weights``
and ``descriptors``. Each stores a tuple per elite. The DataFrame's
``attrs`` hold the snapshot header, including the descriptor bounds,
named score order and any CVT centroids.

Definition at line 300 of file results.py.

◆ load_grid()

qdpy.results.load_grid ( path,
* ,
expected_sha256 = None )

Load a portable grid without executing serialized Python.

Load a numeric archive from :func:`export_grid` or a run manifest.

Pass the manifest's archive SHA-256 to verify the file before parsing.
The archive owns newly created individuals and preserves storage order,
geometry, effective named scores and fitness weights. Offer history,
T-DominO anchors, and custom candidate attributes are outside the
portable format. Use a checkpoint for exact continuation.

Definition at line 280 of file results.py.

◆ read_run_manifest()

qdpy.results.read_run_manifest ( path)

Read a versioned manifest and restore tagged values.

Read JSON result metadata, checking the schema version.

Definition at line 386 of file results.py.

◆ write_run_manifest()

qdpy.results.write_run_manifest ( path,
algorithm,
* ,
configuration,
evaluate,
execution,
initial_evaluations = 0,
final_pickle = None,
bundle = None )

Write run metadata and, when supported, a content-addressed grid result.

Publish a manifest for the search's current evaluation count.

Supply the resolved configuration and execution settings. When
reusing an optimiser, pass its initial evaluation count to report
only attempts from this run. A built-in numeric grid gets a sibling
JSON export. Unsupported archive and configuration values are
recorded with a reason. Sweep reports mark a run as incomplete until
its attempted count reaches the configured budget. An optional
``bundle`` includes portable artifact links and their checksums.

Definition at line 396 of file results.py.