Artifacts¶
Last changes: Documentation changelog
Contract¶
Artifacts are the persisted run outputs: the output directory, saved magnetization states, tables, and field snapshots written by the runtime.
Governing equations¶
No physical equation is owned here.
Symbols and SI units¶
Magnetization state is stored with its own unit metadata; table quantities carry the units defined by the corresponding observables.
Assumptions and validity¶
State formats are validated against the supported set (json, zarr, h5); format is inferred
from the path extension when "auto" is requested.
Python API¶
Python |
Type |
Default |
SI unit |
Validation |
Meaning |
Backend support |
ProblemIR |
|---|---|---|---|---|---|---|---|
— |
— |
— |
\(1\) |
— |
— |
FEM/FDM CPU/GPU; planner and runtime capability checks remain authoritative |
— |
|
|
|
\(1\) |
Directory path |
Directory for run artifacts |
FEM/FDM CPU/GPU; planner and runtime capability checks remain authoritative |
output dir |
|
method |
|
\(1\) |
Requires |
Persist final state |
FEM/FDM CPU/GPU; planner and runtime capability checks remain authoritative |
n/a (runtime output) |
|
function |
|
\(1\) |
|
Low-level state writer |
FEM/FDM CPU/GPU; planner and runtime capability checks remain authoritative |
n/a |
Complete stage-first context¶
# %% Stage-first study whose executed result can persist final state
import fullmag as fm
nm = 1.0e-9
study = fm.study("artifacts_api_example")
study.engine("fdm")
study.device("cpu", precision="double")
study.mode("strict")
study.objects.mesh.defaults(cell_size=(2 * nm, 2 * nm, 5 * nm))
film = study.geometry(fm.Box(100 * nm, 20 * nm, 5 * nm), name="film")
film.Ms = 800.0e3
film.Aex = 13.0e-12
film.alpha = 0.02
film.m = fm.init.UniformMagnetization((1.0, 0.0, 0.0))
study.exchange()
study.stages.add_run(stage_id="run", until=1.0e-12)
# After execution with a final magnetization, the result persists state:
# result.save_state("relaxed_m.zarr", format="zarr")
ProblemIR¶
Artifacts are runtime outputs; they are not authoring inputs and have no lowering destination.
Round-trip and failure semantics¶
Requested intent is the value authored by Python and preserved in ProblemIR; resolved execution is the planner or realization result. Validation errors identify the violated domain rule, and unsupported combinations are rejected explicitly rather than silently substituted.
Saving without final_magnetization raises immediately. Unsupported formats raise rather than
writing a best-effort file.
Discrete realization¶
State serialization lives in fullmag/init/state_io.py and supports JSON, Zarr, and HDF5.
Implementation mapping¶
Anchors: packages/fullmag-py/src/fullmag/runtime/simulation.py (Result.save_state) and
packages/fullmag-py/src/fullmag/init/state_io.py (save_magnetization).
Validation¶
State round-trip is covered by read/write tests; ownership tests validate the source map.
Limitations¶
Artifact format support does not guarantee interchange with other tools; readers must honor the stored unit and dataset metadata.
Scientific bibliography¶
No physical model is introduced.
Control Room crosswalk¶
Status: Runtime and provenance data are inspection-only; they are not standalone authoring controls.
Python/API surface |
Control Room path |
Status |
Transaction |
|---|---|---|---|
Parameters documented on this page |
|
|
No runtime-authoring transaction |
Parameters without a named UI field |
|
|
Python-only until implemented |
not implemented: frontend support for runtime-selection and artifact-publication parameters.
See Control Room capability register for the support matrix and not implemented policy.
Frontend source owner: apps/control-room/src/modules/inspector/panels/RuntimeExplorerInspectorPanels.tsx (RuntimeExplorerInspectorPanels).
Source-code index¶
Claim |
Path |
Stable symbol |
Responsibility |
Evidence |
|---|---|---|---|---|
State persistence |
|
|
Public save entrypoint |
Ownership test |
Serialization formats |
|
|
JSON/Zarr/HDF5 round-trip |
Read/write tests |
Source-map coverage¶
Claim |
Path |
Stable symbol |
Responsibility |
Evidence |
|---|---|---|---|---|
Runtime artifact access and state persistence entrypoint. |
|
|
Runtime artifact access and state persistence entrypoint. |
Source-map validator and focused API tests |
Magnetization artifact serialization. |
|
|
Magnetization artifact serialization. |
Source-map validator and focused API tests |