hertzforge.core.run_record¶
run_record
¶
The control service's own record of one run, held in a project.
A run that the control service records leaves a run folder: a manifest,
the channel table it armed with, the setup as accepted and as resolved,
the law it ran, its log, its streams and results, and how it ended
(hertzforge.io.run_folder). Converting the folder
(hertzforge.io.run_convert) turns the streams and results into the
analysis objects they are, time histories, PSDs, FRFs and the rest, and
keeps everything else here, in one RunRecord per run: what the run
was, what it was set to, what happened during it, and the results no
analysis class holds, as named arrays with their description. Nothing
in the folder is lost by the conversion.
A record is saved in the project file as the run_record kind
(docs/hforge-format.md), so it survives saving, reopening and
importing into another project like any other object, and the run's
objects are linked to it through one object group.
Classes:
| Name | Description |
|---|---|
RunRecord |
What the control service recorded of one run, beyond its data. |
Classes¶
RunRecord
¶
RunRecord(manifest: Mapping[str, Any], table: Mapping[str, Any], setup: Mapping[str, Any], log: Sequence[Mapping[str, Any]] = (), end: Mapping[str, Any] | None = None, law: Mapping[str, Any] | None = None, law_file: tuple[str, bytes] | None = None, streams: Mapping[str, Mapping[str, Any]] | None = None, results: Mapping[str, Mapping[str, Any]] | None = None, arrays: Mapping[str, Mapping[str, ndarray]] | None = None, missing: Sequence[str] = ())
What the control service recorded of one run, beyond its data.
The members are kept as the folder had them, parsed from JSON, so a member this build knows nothing of is carried, not dropped.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
manifest
|
mapping
|
The run's manifest ( |
required |
table
|
mapping
|
The channel table as armed ( |
required |
setup
|
mapping
|
The setup ( |
required |
log
|
sequence of mapping
|
The run's log entries, in order. |
()
|
end
|
mapping
|
How the run ended ( |
None
|
law
|
mapping
|
The law's identity ( |
None
|
law_file
|
tuple of (str, bytes)
|
The law file's name and bytes, when the law is a file. |
None
|
streams
|
mapping of str to mapping
|
Each stream's description ( |
None
|
results
|
mapping of str to mapping
|
Each result's description by name, with the records of a
repeating one under |
None
|
arrays
|
mapping of str to mapping of str to numpy.ndarray
|
The arrays of each result no analysis class holds, by result and array name; a repeating result's arrays have the record first. |
None
|
missing
|
sequence of str
|
What the folder lacked when it was converted, in words (a run that did not end, a stream cut short). |
()
|
Attributes:
| Name | Type | Description |
|---|---|---|
source |
str or None
|
'SIM' or 'HARDWARE', from the manifest. |
Methods:
| Name | Description |
|---|---|
describe |
A few words on the run: its test, its outcome and its log. |
Attributes¶
complete
property
¶
Whether the run ended cleanly: its manifest says so and it has an end.
outcome
property
¶
How the run ended ('completed', 'aborted', 'operator_stop'), '' for a run that did not end cleanly.
resolved
property
¶
What the service resolved the setup to: profile, limits, schedule, control settings.
table_revision
property
¶
The revision of the channel table the run used, as run.json
names it (channel_table.revision); None when the folder does not
say. It is never read from anywhere else.
table_sha256
property
¶
The SHA-256 of the rows of the channel table the run used, as
run.json names it (channel_table.sha256): equal for two runs on
one table. None when the folder does not say.
Methods:¶
describe
¶
A few words on the run: its test, its outcome and its log.
Returns:
| Type | Description |
|---|---|
str
|
Such as 'random run, completed, 14 log entries'. |