Results and errors#
moruna.RunReport#
moruna.run(...) -> RunReport. The runtime constructs it; attributes are read-only. str(report) returns a compact summary; report.to_json() -> str returns the full serialized report. The run report details its nested fields.
Attribute |
Type |
Meaning |
|---|---|---|
|
|
Run id, resume state and latest checkpoint path. |
|
|
|
|
|
Elapsed seconds. |
|
|
Initial host limits, compatibility alias, and limit changes. |
|
|
Peak memory, denominator and fraction. |
|
|
Worker use and CPU throttling. |
|
|
Measured CPU and memory usage. |
|
|
Source and staging rates. |
|
|
Staging volume and whether used. |
|
|
Direct I/O, io_uring, GDS, pinned and RDMA flags. |
|
list of pairs, |
Per-stage GIL state and serialization. |
|
|
Sizer and optional fallback morsel. |
|
lists |
Per-stage statistics, arena drains and bottlenecks. |
|
|
Decisions and trace completeness. |
|
|
Committed snapshot ids, when available. |
|
|
Written trace file, if requested. |
moruna.inspect_host#
moruna.inspect_host() -> dict
Runs host discovery without a job. The dictionary contains limits (memory_ceiling, memory_kill, cpu_quota, page_bytes, source, devices), anon_bytes (memory already held), host_profile (feature guarantees and staging location), host_tier, cgroup_path, and notes. Discovery failures raise a MorunaError subclass.
Exceptions#
Runtime exceptions inherit from moruna.MorunaError, which inherits from Exception. Runtime-created instances expose kind: str, message: str, diagnostic: dict, run_id: str | None, manifest: str | None, and report: RunReport | None. Constructor validation can instead raise ordinary TypeError or ValueError.
Class |
Typical cause |
|---|---|
|
Bad run configuration or unsupported host setting. |
|
Incompatible source, kernel or sink. |
|
Memory budget or guarded allocation exceeded. |
|
Kernel failed and the error policy stopped the run. |
|
Source, sink, object store or staging I/O failed. |
|
Checkpoint cannot be used. |
|
Interrupted run; |
try:
report = moruna.run(source, kernels, sink)
except moruna.MorunaError as error:
print(error.kind, error.message, error.diagnostic)
if error.report is not None:
print(error.report.run_id)