chemparseplot.parse.surrogate.model#

Producer-independent records of surrogate-assisted saddle searches.

A surrogate-assisted search spends calls on an expensive oracle (the true potential) and answers the rest from a fitted surrogate. The classes here hold what a plot needs, whichever code produced it. NaN marks a quantity the producer did not record.

Units: energy in eV, force in eV/A, length in A, curvature in eV/A^2, time in s.

.. versionadded:: 1.10.0

Module Contents#

Classes#

BandSnapshot

A path of images at one outer iteration.

EvaluatedPoints

Oracle observations in acquisition order.

AcquisitionEvent

One decision to call the oracle.

BandHistory

Two-ended search: path snapshots, observations and decisions.

SearchHistory

Per-outer (or per-call) series of a search.

SingleEndedHistory

Dimer-type search against oracle calls.

CellRecord

One reaction of a campaign.

CampaignTable

One row per reaction, plus calls of comparison methods.

ScalingTable

Time against worker count for several series.

SurrogateSearch

All records of one search, with provenance.

PopTable

Fixed-work efficiency factors of one cell, one row per layout.

ComponentTable

Median seconds per component of the wall, per cell and layout.

Functions#

API#

chemparseplot.parse.surrogate.model._arr(x) → numpy.ndarray[source]#
class chemparseplot.parse.surrogate.model.BandSnapshot[source]#

A path of images at one outer iteration.

coordinate is the path coordinate in A (0 at the reactant); sigma and true_* hold NaN where not recorded or not evaluated.

coordinate: numpy.ndarray#

None

energy: numpy.ndarray#

None

sigma: numpy.ndarray | None#

None

true_energy: numpy.ndarray | None#

None

true_force: numpy.ndarray | None#

None

climbing: int | None#

None

outer: int#

None

oracle_calls: int#

None

positions: numpy.ndarray | None#

None

__post_init__()[source]#
property n_images: int#
property evaluated: numpy.ndarray#
class chemparseplot.parse.surrogate.model.EvaluatedPoints[source]#

Oracle observations in acquisition order.

energy: numpy.ndarray#

None

max_force: numpy.ndarray | None#

None

positions: numpy.ndarray | None#

None

coordinate: numpy.ndarray | None#

None

distance: numpy.ndarray | None#

None

gradients: numpy.ndarray | None#

None

n_calls: int | None#

None

__post_init__()[source]#
__len__() → int[source]#
class chemparseplot.parse.surrogate.model.AcquisitionEvent[source]#

One decision to call the oracle.

oracle_calls: int#

None

kind: str#

None

outer: int#

None

image: int#

None

detail: str = <Multiline-String>#
class chemparseplot.parse.surrogate.model.BandHistory[source]#

Two-ended search: path snapshots, observations and decisions.

final: chemparseplot.parse.surrogate.model.BandSnapshot#

None

snapshots: list[chemparseplot.parse.surrogate.model.BandSnapshot]#

‘field(…)’

points: chemparseplot.parse.surrogate.model.EvaluatedPoints | None#

None

reference: chemparseplot.parse.surrogate.model.BandSnapshot | None#

None

events: list[chemparseplot.parse.surrogate.model.AcquisitionEvent]#

‘field(…)’

saddle: numpy.ndarray | None#

None

saddle_certified: bool | None#

None

numbers: numpy.ndarray | None#

None

numbers_source: str = <Multiline-String>#
numbers_looked_for: list[str]#

‘field(…)’

class chemparseplot.parse.surrogate.model.SearchHistory[source]#

Per-outer (or per-call) series of a search.

series keys use the standard names oracle_calls, outer, true_force, surrogate_force, surrogate_force_sigma, energy, n_train, magnitude_sigma2, noise_sigma2, length_scale_min, length_scale_max, time_refit, time_predict, time_inner, rss_mb. Missing quantities are absent, never zero-filled.

series: dict[str, numpy.ndarray]#

None

force_tolerance: float | None#

None

converged: bool | None#

None

events: list[chemparseplot.parse.surrogate.model.AcquisitionEvent]#

‘field(…)’

retained_cap: int | None#

None

meta: dict#

‘field(…)’

__post_init__()[source]#
__getitem__(key: str) → numpy.ndarray[source]#
get(key: str) → numpy.ndarray | None[source]#
property oracle_calls: numpy.ndarray#
to_frame(method: str = 'search')[source]#

Long-form polars frame (columns oracle_calls, max_fatom, kind, method), one row per oracle call and force kind.

class chemparseplot.parse.surrogate.model.SingleEndedHistory[source]#

Dimer-type search against oracle calls.

oracle_calls: numpy.ndarray#

None

force: numpy.ndarray#

None

curvature: numpy.ndarray#

None

curvature_measured: numpy.ndarray | None#

None

curvature_surrogate: numpy.ndarray | None#

None

rotation_angle: numpy.ndarray | None#

None

escape: list[chemparseplot.parse.surrogate.model.AcquisitionEvent]#

‘field(…)’

force_tolerance: float | None#

None

converged: bool | None#

None

__post_init__()[source]#
class chemparseplot.parse.surrogate.model.CellRecord[source]#

One reaction of a campaign.

label: str#

None

set: str = <Multiline-String>#
method: str = <Multiline-String>#
status: str = <Multiline-String>#
converged: bool | None#

None

passed: bool | None#

None

index: int | None#

None

search_calls: int | None#

None

validation_calls: int | None#

None

total_calls: int | None#

None

wall: dict[str, float]#

‘field(…)’

energy_delta: float | None#

None

ledger: dict[str, int]#

‘field(…)’

extras: dict#

‘field(…)’

class chemparseplot.parse.surrogate.model.CampaignTable[source]#

One row per reaction, plus calls of comparison methods.

name: str#

None

cells: list[chemparseplot.parse.surrogate.model.CellRecord]#

None

baselines: dict[str, dict[str, float]]#

‘field(…)’

tolerance: float | None#

None

by_label() → dict[str, chemparseplot.parse.surrogate.model.CellRecord][source]#
to_frame()[source]#

One polars row per cell; the wall times become wall_<stage>.

class chemparseplot.parse.surrogate.model.ScalingTable[source]#

Time against worker count for several series.

reference names the series whose first point defines speedup 1 for all series; without it each series is measured against its own first point.

series: dict[str, tuple[numpy.ndarray, numpy.ndarray]]#

None

reference: str | None#

None

time_min: dict[str, numpy.ndarray]#

‘field(…)’

time_max: dict[str, numpy.ndarray]#

‘field(…)’

calls: dict[str, numpy.ndarray]#

‘field(…)’

capped: dict[str, numpy.ndarray]#

‘field(…)’

layouts: dict[str, list[str]]#

‘field(…)’

speedup(name: str) → tuple[numpy.ndarray, numpy.ndarray][source]#

Speedup of name against its own first point.

With reference set, every series is measured against the first point of that series instead, so series that split one total (search and validation of a pipeline) share a baseline.

speedup_range(name: str) → tuple[numpy.ndarray, numpy.ndarray] | None[source]#

(low, high) speedup from the slowest and fastest repetition.

class chemparseplot.parse.surrogate.model.SurrogateSearch[source]#

All records of one search, with provenance.

label: str#

None

producer: str#

None

band: chemparseplot.parse.surrogate.model.BandHistory | None#

None

search: chemparseplot.parse.surrogate.model.SearchHistory | None#

None

single_ended: chemparseplot.parse.surrogate.model.SingleEndedHistory | None#

None

cell: chemparseplot.parse.surrogate.model.CellRecord | None#

None

provenance: dict#

‘field(…)’

class chemparseplot.parse.surrogate.model.PopTable[source]#

Fixed-work efficiency factors of one cell, one row per layout.

layouts are ranks x threads labels sorted by cores then threads, cores the matching core counts, time the wall of each layout and metrics one array per factor name, every value a fraction in [0, 1]. Speedup and fixed-work (global) efficiency follow from time against the layout with the fewest cores.

layouts: list[str]#

None

cores: numpy.ndarray#

None

time: numpy.ndarray#

None

metrics: dict[str, numpy.ndarray]#

None

cell: str | None#

None

quantity: str#

‘process wall’

speedup() → numpy.ndarray[source]#

T(reference) / T(layout), the reference being the fewest cores.

efficiency() → numpy.ndarray[source]#

Speedup per core ratio against the reference layout.

class chemparseplot.parse.surrogate.model.ComponentTable[source]#

Median seconds per component of the wall, per cell and layout.

components keeps the order of the file; parts[(cell, layout)] maps each component to its median seconds over repetitions and total[(cell, layout)] holds the whole wall. The part of the total no component accounts for is unattributed.

components: list[str]#

None

cells: list[str]#

None

layouts: dict[str, list[str]]#

None

parts: dict[tuple[str, str], dict[str, float]]#

None

total: dict[tuple[str, str], float]#

None

unattributed(cell: str, layout: str) → float[source]#
fractions(cell: str, layout: str) → dict[str, float][source]#

Share of the total per component, plus unattributed.

amdahl_bounds(cell: str, layout: str) → dict[str, float][source]#

Largest whole-run speedup if one component alone took no time.

With the component’s share f of the wall, the rest of the run bounds the speedup at 1 / (1 - f).