hpcflow.sdk.persistence.zarr.ZarrStoreEAR#
- class hpcflow.sdk.persistence.zarr.ZarrStoreEAR(id_, is_pending, elem_iter_ID, action_idx, commands_idx, data_idx, submission_idx=None, commands_file_ID=None, run_file_ID=None, run_file_idx=None, skip=0, success=None, start_time=None, end_time=None, snapshot_start=None, snapshot_end=None, exit_code=None, metadata=None, run_hostname=None, port_number=None, task_ID=None, element_idx=None, iteration_idx=None)#
Bases:
StoreEAR[list[Any],dict[str, Any]]Represents an element action run in a Zarr persistent store.
Methods
Initialise a ZarrStoreEAR from persistent EAR data
Prepare store EAR data for the persistent store.
Run metadata that is generated when the run is created.
Run metadata that is generated at sumbit-time.
Prepare data for the user-facing ElementActionRun object.
Return a shallow copy, with specified data updated.
Attributes
Run ID whose commands can be used for this run (may be this run's ID).
Element index of the run, only stored to assist with encoding, not available from decode:
When this EAR finished, if known.
The exit code of the underlying executable, if known.
Element iteration index of the run, only stored to assist with encoding, not available from decode:
Metadata concerning e.g. the state of the EAR.
ID of the file to which execution-time run metadata should be written.
Index of data within the run file containing the execution-time run metadata.
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.
Task of the run, only stored to assist with encoding, not available from decode:
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.
- Parameters:
id_ (int)
is_pending (bool)
elem_iter_ID (int)
action_idx (int)
data_idx (DataIndex)
submission_idx (int | None)
commands_file_ID (int | None)
run_file_ID (int | None)
run_file_idx (int | None)
skip (int)
success (bool | None)
start_time (datetime | None)
end_time (datetime | None)
exit_code (int | None)
metadata (Metadata | None)
run_hostname (str | None)
port_number (int | None)
task_ID (int | None)
element_idx (int | None)
iteration_idx (int | None)
- EXEC_TIME_ATTRIBUTES = ['skip', 'success', 'start_time', 'end_time', 'snapshot_start', 'snapshot_end', 'exit_code', 'run_hostname', 'port_number']#
- EXEC_TIME_DEFAULTS = {'skip': 0}#
- commands_file_ID: int | None = None#
Run ID whose commands can be used for this run (may be this run’s ID).
- data_idx: DataIndex#
Maps parameter names within this EAR to parameter data indices.
- classmethod decode(EAR_dat, sub_dat, run_time_dat, ts_fmt, attrs)#
Initialise a ZarrStoreEAR from persistent EAR data
- Parameters:
EAR_dat (ListAny)
sub_dat (Sequence[Any])
run_time_dat (ListAny | None)
ts_fmt (str)
attrs (ZarrAttrs)
- Return type:
Self
- element_idx: int | None = None#
Element index of the run, only stored to assist with encoding, not available from decode:
- encode(ts_fmt, attrs)#
Prepare store EAR data for the persistent store.
This method mutates attrs.
- encode_creation_metadata(attrs)#
Run metadata that is generated when the run is created.
This method mutates attrs.
- classmethod encode_run_time_metadata(data, ts_fmt)#
- encode_submit_time_metadata()#
Run metadata that is generated at sumbit-time.
- iteration_idx: int | None = None#
Element iteration index of the run, only stored to assist with encoding, not available from decode:
- run_file_ID: int | None = None#
ID of the file to which execution-time run metadata should be written.
- run_file_idx: int | None = None#
Index of data within the run file containing the execution-time run metadata.
- task_ID: int | None = None#
Task of the run, only stored to assist with encoding, not available from decode:
- update(submission_idx=None, commands_file_ID=None, run_file_ID=None, run_file_idx=None, skip=None, success=None, start_time=None, end_time=None, snapshot_start=None, snapshot_end=None, exit_code=None, run_hostname=None, port_number=None, data_idx=None)#
Return a shallow copy, with specified data updated.
- Parameters:
submission_idx (int | None)
commands_file_ID (int | None)
run_file_ID (int | None)
run_file_idx (int | None)
skip (int | None)
success (bool | None)
start_time (datetime | None)
end_time (datetime | None)
exit_code (int | None)
run_hostname (str | None)
port_number (int | None)
data_idx (DataIndex | None)
- Return type:
Self