hpcflow.sdk.persistence.base.StoreEAR#
- class hpcflow.sdk.persistence.base.StoreEAR(id_, is_pending, elem_iter_ID, action_idx, commands_idx, data_idx, submission_idx=None, skip=False, success=None, start_time=None, end_time=None, snapshot_start=None, snapshot_end=None, exit_code=None, metadata=None, run_hostname=None)#
Bases:
Generic
[SerFormT
,ContextT
]Represents an element action run in a persistent store.
- Parameters:
id (int) – The ID of this element action run.
is_pending (bool) – Whether the element action run has changes not yet persisted.
elem_iter_ID (int) – What element iteration owns this EAR.
action_idx (int) – The task schema action associated with this EAR.
commands_idx (list[int]) – The indices of the commands in the EAR.
data_idx (DataIndex) – Maps parameter names within this EAR to parameter data indices.
submission_idx (int | None) – Which submission contained this EAR, if known.
skip (bool) – Whether to skip this EAR.
success (bool | None) – Whether this EAR was successful, if known.
start_time (datetime | None) – When this EAR started, if known.
end_time (datetime | None) – When this EAR finished, if known.
snapshot_start (dict[str, Any] | None) – Snapshot of files at EAR start, if recorded.
snapshot_end (dict[str, Any] | None) – Snapshot of files at EAR end, if recorded.
exit_code (int | None) – The exit code of the underlying executable, if known.
metadata (Metadata | None) – Metadata concerning e.g. the state of the EAR.
run_hostname (str | None) – Where this EAR was submitted to run, if known.
id_ (int) –
Methods
Initialise a StoreEAR from persistent store EAR data
Prepare store EAR data for the persistent store.
Prepare data for the user-facing ElementActionRun object.
Return a shallow copy, with specified data updated.
Attributes
When this EAR finished, if known.
The exit code of the underlying executable, if known.
Metadata concerning e.g.
Where this EAR was submitted to run, if known.
Whether to skip this EAR.
Snapshot of files at EAR end, if recorded.
Snapshot of files at EAR start, if recorded.
When this EAR started, if known.
Which submission contained this EAR, if known.
Whether this EAR was successful, if known.
The ID of this element action run.
Whether the element action run has changes not yet persisted.
What element iteration owns this EAR.
The task schema action associated with this EAR.
The indices of the commands in the EAR.
Maps parameter names within this EAR to parameter data indices.
- data_idx: DataIndex#
Maps parameter names within this EAR to parameter data indices.
- abstract classmethod decode(EAR_dat, ts_fmt, context)#
Initialise a StoreEAR from persistent store EAR data
- Parameters:
EAR_dat (SerFormT) –
ts_fmt (str) –
context (ContextT) –
- Return type:
Self
- abstract encode(ts_fmt, context)#
Prepare store EAR data for the persistent store.
- Parameters:
ts_fmt (str) –
context (ContextT) –
- Return type:
SerFormT
- update(submission_idx=None, skip=None, success=None, start_time=None, end_time=None, snapshot_start=None, snapshot_end=None, exit_code=None, run_hostname=None)#
Return a shallow copy, with specified data updated.