sage.utils.servers
Filename : servers.py Description : Single source of truth for per-server settings.
This module centralises everything that changes when Sage is run on a
different machine: where data is saved, where the conda env lives, and how
batch jobs are launched. A run is wired to a server with one switch – the
SAGE_SERVER environment variable (or hostname auto-detection) – and every
path, both in Python (config.py / dataset.py) and in the shell run
scripts (sage/utils/run_base.sh), is derived from the same entry here.
Add a new machine by adding one Server to SERVERS below.
Shell side
The shell helpers read these same values via:
eval "$(python -m sage.utils.servers env)"
so there is no duplicated path list to keep in sync.
CLI
python -m sage.utils.servers name # resolved server name python -m sage.utils.servers show # human-readable dump python -m sage.utils.servers env # export KEY=VAL lines for the shell
Attributes
Classes
Everything that is specific to one machine. |
Functions
|
Resolve the active server. |
Module Contents
- class Server[source]
Everything that is specific to one machine.
Paths
home : the user’s home directory on that machine. data_root : parent dir under which
data_release/is created. This isthe big-storage mount where downloaded noise lands and from which training reads. Mirrors
save_parent_dirofsage.data.primer.DataReleaseDownloader.work_root : scratch / cache root (model compile caches, torch hub, etc.). repo_root : location of the sage checkout. Defaults to this checkout.
Launch
- pythonabsolute path to the interpreter (conda env) for jobs. If
Nonethe shell falls back to whateverpythonis on PATH.
scheduler : “slurm” or “local”. partition / qos / gres / time / cpus / mem / account / mail :
SLURM
sbatchparameters (ignored when scheduler=”local”).