Skip to content

simulo.Volume

A named, durable, writable volume mounted into running jobs.

Declare it as an app mount and read/write path from the job body:

checkpoints = simulo.Volume.from_name("checkpoints", create_if_missing=True)
app = simulo.App("train", runtime=runtime, mounts={"checkpoints": checkpoints})

At submit time a volume is only a metadata handle — path resolves exclusively inside a running job, after the platform has mounted it.

Args:

  • name — Non-empty volume name, unique within your workspace.
  • create_if_missing — Create the volume on first use instead of failing.

Raises:

  • ValueError — if name is empty or whitespace-only.

Real usage, from the shipped cartpole training app — a named volume mounted into the job, its execution-mode path used to write the trained checkpoint:

vol = simulo.Volume.from_name("cartpole-checkpoints", create_if_missing=True)
app = simulo.App("cartpole", mounts={"/out": vol})
# later, in the job body (execution mode only):
checkpoint = f"{vol.path}/cartpole_final.pt"
trainer.save(checkpoint)
simulo.Volume(name: str, *, create_if_missing: bool = False)
Volume.from_name(name: str, *, create_if_missing: bool = False) -> Volume

classmethod

Get a handle to the volume called name — the canonical constructor.

Volume.name: str

property

The volume’s name.

Volume.create_if_missing: bool

property

Whether the platform creates the volume on first use instead of failing.

Volume.path: str

property

Local mount path — only meaningful inside a running job (execution).

Reads SIMULO_VOLUME_<name> set by the runner. Raises outside execution mode, or if the runner did not mount this volume.