Skip to content

simulo.Volume

A named writable folder on one GPU machine, 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})

Jobs in your organization share the folder on that machine. It is scratch space, not durable storage: machines are replaced over time. Call simulo.save_output for files you need to keep.

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 organization.
  • create_if_missing — Create the volume on first use instead of failing.

Raises:

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

Mount a named volume on the app, then read and write files under its path from the job body. path exists only while the job runs, so use it inside the job function:

data = simulo.Volume.from_name("cartpole-data", create_if_missing=True)
app = simulo.App("cartpole", mounts={"data": data})
# in the job body:
with open(f"{data.path}/notes.txt", "w") as handle:
handle.write("run finished\n")

Training jobs don’t need a volume for checkpoints. They save best and latest automatically, and simulo policy get downloads them.

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.