Skip to content

nodus.runtime

View Markdown

In-container helpers that speak nodusd’s sockets (resources.md §8); each is a no-op outside Nodus.

Telemetry goes to /run/nodus/events.sock as JSON lines. Without the socket, inside a Nodus container, events are printed as nodus.event {json} lines, which nodusd also parses; outside Nodus nothing is emitted.

emit(event: dict[str, Any]) -> None

Send one telemetry event; ids are unique per process so the node’s per-attempt dedup keeps every event.

in_nodus() -> bool
progress(completed: int | float, total: int | float | None = None) -> None

Report progress; it appears in status.progress and the console, and drives Restartable cursors.

restored() -> bool

True when this attempt started from a restored checkpoint.

self() -> dict[str, Any]

{kind, name, project, attempt, epoch, index} of the object this container runs for, from api.sock.

state_dir() -> Path

The checkpointed directory: write model, optimizer and progress files here.