rgpycrumbs.uma._env¶
Probe the export interpreter once, then remember the answer.
The key needs the torch and fairchem versions and the device target of
the interpreter that runs the exporter. Asking costs a torch import
(seconds), which would dominate a cache hit, so the answer is stored
under <cache>/.env/. For the running interpreter the memo is keyed
by its installed distributions; for another interpreter by its path,
and reused while its site-packages directory is unchanged (installing
or removing a distribution changes its mtime).
Attributes¶
Functions¶
|
|
|
Installed distributions of this interpreter, from directory names alone. |
|
|
|
|
|
|
|
Return the |
Module Contents¶
- rgpycrumbs.uma._env.normalize_device(device: str) str[source]¶
cpu,cudaorcuda:N; anything else is refused.
- rgpycrumbs.uma._env._local_fingerprint() str[source]¶
Installed distributions of this interpreter, from directory names alone.
uv run --scriptcan give one set of packages a new environment path on every run, so for the running interpreter the identity is what is installed (<name>-<version>.dist-infoentries onsys.path), not where.
- rgpycrumbs.uma._env._memo_path(cache_dir: pathlib.Path, python: str, device: str) pathlib.Path[source]¶
- rgpycrumbs.uma._env.probe_env(cache_dir: pathlib.Path, *, python: str | None = None, device: str = 'cpu') rgpycrumbs.uma._key.ExportEnv[source]¶
Return the
ExportEnvofpython(default: this interpreter).