nodus.runtime
View MarkdownIn-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]) -> NoneSend one telemetry event; ids are unique per process so the node’s per-attempt dedup keeps every event.
in_nodus
Section titled “in_nodus”in_nodus() -> boolprogress
Section titled “progress”progress(completed: int | float, total: int | float | None = None) -> NoneReport progress; it appears in status.progress and the console, and drives Restartable cursors.
restored
Section titled “restored”restored() -> boolTrue 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
Section titled “state_dir”state_dir() -> PathThe checkpointed directory: write model, optimizer and progress files here.