Skip to content

Environment variables

pairbench’s own environment variables start with PAIRBENCH_, and a variable that other software defines keeps the name that software gives it. This page lists every variable pairbench reads or sets, what it does with it and which software defines it, then the variables its showcases and its test suite read.

Each variable has its own heading, so a link can point at it, for example environment.md#pairbench_config. A name written with a trailing * stands for every variable whose name starts that way.

The names you put in a launch.env table or a side’s env table are yours: pairbench sets them in the launch as written, and the config written to the capture hides the value of a name that looks like a credential (see config).

A variable named in launch.env_pass is also yours, for example a model hub token that a server reads. pairbench hands it to the launch by name and never writes its value anywhere: the capture and the results hold only the name. On an image or serving side the value travels in the environment of the engine’s command (--env NAME), so it does not show on a command line another user of the machine can list. A command or Python-environment side gets it in its environment.

pairbench reads no secret of its own. The naming rule covers secrets as well: a token that pairbench itself reads is named with the same prefix, such as PAIRBENCH_TOKEN.

Defined by pairbench. The config file to load, as --config FILE does. No config file is loaded without one of the two, because a config launches commands.

Defined by pairbench. The run folder, as run.out sets it. When PAIRBENCH__RUN__OUT is also set, both must name the same folder, or the run stops with E_CONFIG (exit 2).

Defined by pairbench. PAIRBENCH__SECTION__KEY sets the config key section.key, with double underscores between the parts of the path: PAIRBENCH__RUN__ROUNDS=24 sets run.rounds. The parts are lower-cased, and the value is read as a TOML value when it parses as one and as text otherwise. A variable that names no key stops the run with E_CONFIG (exit 2). The command line wins over the environment, and the environment over the config file. See config.

Defined by pairbench. Sets launch.engine, as every PAIRBENCH__ variable sets its key. When launch.engine is auto and both Docker and Podman are found, the engine it names is the one used.

Defined by pairbench. Set to 2 in the positive control’s launch when controls.positive_via = "factor". The workload reads it and does its work that many times; every showcase workload does. See positive control.

Defined by pairbench. Set in every launch of a round when run.vary_env_size = true: a run of the letter x whose length changes from round to round, so the size of the environment does not stay the same for the whole run.

Defined by pairbench. Every name with this prefix belongs to pairbench. A command or Python-environment side does not inherit these variables from the environment pairbench runs in; name one in launch.env_pass to hand it on.

Defined by automated pipelines (GitHub Actions, GitLab CI/CD). A true value (anything but an empty value, 0, false, no or off) marks the run as one made in an automated pipeline: the machine record says so, and the quiet-machine wait records its check without waiting unless asked. See shared machines.

Defined by POSIX. Where pairbench looks for docker, podman, conda, perf, nvidia-smi and the program of a command or Python-environment side. A virtual-environment or conda side puts its environment’s bin folder first.

Defined by Docker. When it points Docker’s command at anything but a local socket (unix://...), pairbench takes the containers to run elsewhere, so it does not look for their processes on this machine and does not hand back the files they wrote. It is also one of the DOCKER_* names the engine’s command reads.

Defined by Podman. The same for Podman: when it points Podman’s command at anything but a local socket, the containers are taken to run elsewhere.

Defined by container managers (systemd container interface). A value that is not empty says that pairbench itself runs inside a container. The machine record says so, and the machine checks work as the table in shared machines shows for a run inside a container.

Defined by Kubernetes. A value that is not empty says that pairbench runs inside a Kubernetes pod, and so inside a container, with the same effect as container.

Defined by conda. The conda program that looks up a conda side given by name. Without it, conda is looked for on PATH.

Variables the container engine’s command reads

Section titled “Variables the container engine’s command reads”

Docker’s and Podman’s own commands read the variables below. On an image or serving side, pairbench keeps the caller’s value of each for the engine’s command: a side’s env entry of one of these names is passed to the container on the engine’s command line (--env NAME=VALUE) instead of through the command’s environment, and env_pass refuses such a name with E_ENGINE_UNSUPPORTED (exit 3), since its value would then show on a command line. A name matches in any case: http_proxy counts as HTTP_PROXY.

Defined by POSIX. Read by the engine’s own command.

Defined by POSIX. Read by the engine’s own command.

Defined by login (util-linux). Read by the engine’s own command.

Defined by Go (net/http). Read by the engine’s own command.

Defined by Go (net/http). Read by the engine’s own command.

Defined by Go (net/http). Read by the engine’s own command.

Defined by curl. Read by the engine’s own command.

Defined by Go (crypto/x509). Read by the engine’s own command.

Defined by Go (crypto/x509). Read by the engine’s own command.

Defined by Go (runtime). Read by the engine’s own command.

Defined by Go (runtime). Read by the engine’s own command.

Defined by Go (runtime). Read by the engine’s own command.

Defined by Go (runtime). Read by the engine’s own command.

Defined by Go (runtime). Read by the engine’s own command.

Defined by Docker. Read by the engine’s own command.

Defined by Podman. Read by the engine’s own command.

Defined by Podman. Read by the engine’s own command.

Defined by Podman. Read by the engine’s own command.

Defined by Podman. Read by the engine’s own command.

Defined by XDG Base Directory Specification. Read by the engine’s own command.

Defined by the dynamic linker (ld.so). Read by the engine’s own command.

Defined by the dynamic linker of macOS (dyld). Read by the engine’s own command.

Defined by CUDA. Set to the GPUs of launch.gpus in a command or Python-environment side’s launch, so the launched program sees only those GPUs; gpus = "all" removes it, so every GPU is visible. Setting it in an env table as well as gpus is refused with E_USAGE (exit 2).

Defined by CUDA. Set to PCI_BUS_ID beside CUDA_VISIBLE_DEVICES, so CUDA numbers the visible GPUs in the order of their PCI bus ids.

Defined by Python. Set to 1 in the explain step’s sampled-stacks launch, so a Python 3.12 or newer interpreter reports its function names to perf. See diagnostics.

Defined by Python (venv). Set to the environment’s folder for a virtual-environment side; removed for a plain interpreter or a conda side.

Defined by conda. Set to the environment’s folder for a conda side; removed for a plain interpreter or a virtual-environment side.

Defined by conda. Set to the environment’s name for a conda side; removed for a plain interpreter or a virtual-environment side. The environment’s activation scripts are not run.

Defined by Python. Removed from every Python-environment side’s launch, so the interpreter uses its own standard library. A side’s env table can set it again.

Defined by Python. Removed from every Python-environment side’s launch, so the interpreter sees its own packages. A side’s env table can set it again.

Variables of the showcases and the test suite

Section titled “Variables of the showcases and the test suite”

The pairbench command reads none of these. The run.sh scripts of the showcases and the repository’s test suite do.

Defined by pairbench. The container engine command a showcase’s run.sh calls for its own preparation, such as an install into a folder the sides mount. docker when unset.

Defined by pairbench. A folder inside the showcase, without ..: the showcase’s run.sh then makes a run whose results may be published. It refuses unless the checkout is reached at /work, runs pairbench run with HOME=/home/user into a new private folder under pairbench-runs/, and publishes results.json, results.md and report.html into the named folder, and hash_inputs.json with them only when the shared files show every value the sidecar holds; otherwise the sidecar stays owner-only in the private folder and run.sh exits with the run’s own code. A normal run when unset. Each of these values is refused with exit 2 and its own line on standard error, before anything runs: an empty value; one that names the showcase folder itself, such as . or ./.; an absolute path or one with ..; one with a part made only of blanks or only of dots, or a part that starts with -; and pairbench-runs or a folder under it, which holds the private run folders. A value that reaches, through a link, the showcase folder, a folder that holds it, or pairbench-runs or a folder under it is refused the same way, as is one with a part that is a link leading to no folder.

Defined by pairbench. How many busy loops the neighbour container of the noisy neighbour showcase runs. 1 when unset.

Defined by pairbench. Set to 1 to let the test suite run its GPU tests. Without it they skip, so a machine that has a GPU does not start GPU work by running the tests.

Defined by pairbench. Set to docker or podman to turn a test’s skip for want of that container engine into a failure.

Defined by pairbench. Set to 1 to turn a test’s skip for want of the plot extra into a failure.

Defined by pairbench. Set to 1 to turn the skip of the tests that build and install the wheel, when they cannot, into a failure.

Each “Defined by” above names the software whose own documentation or source defines the variable:

pairbench is made by Eugo