simulo.save_output
Register metadata for a file produced while this job is running.
This validates the name, path, and kind, then records them in the running
job. Returning successfully makes eligible registrations available to the
worker for upload; a file becomes available through simulo outputs
only after the upload is persisted. A cancelled, timed-out, crashed, or
otherwise failed run does not reach the successful registry drain, and a
refused or unsuccessful upload can also leave a registration undelivered.
Use a named simulo.Volume instead when another job needs shared
durable files.
Args:
name— The registration’s logical filename. It must be one safe filename, never a path: separators, control characters, dots-only tokens, empty values, and over-length names are rejected withValueError.path— Filesystem path of the produced file.str,bytes, or anyos.PathLike(apathlib.Pathworks); bytes-ish values areos.fsdecode-d, so a real non-UTF-8 filename registers fine. Validated for usability: type, length, non-empty, and no NUL.kind— What the output is — anOutputKindor its wire string (e.g."report","dataset"). Defaults toFILE, the kind for a general produced file.
Returns:
True when the registration was kept; False when it was dropped because the run already registered 1000 files. Register final output, not a new scratch file on every simulation step.
Raises:
ValueError—nameis not a safe single filename,pathis not usable as a path, orkindis not a known output kind — all surfaced at the call site before anything is registered.ModuleNotFoundError— The job runtime is missing a required dependency.RuntimeError— Called outside a supported job execution context.
simulo.save_output( name: str, path: Union[str, bytes, 'os.PathLike[str]', 'os.PathLike[bytes]'], kind: Union[OutputKind, str] = OutputKind.FILE,) -> bool