LIRRA  1.0.0
Loading...
Searching...
No Matches
rl_stl.utils.provenance Namespace Reference

Functions

dict[str, Any] git_revision (Path repo_root=REPO_ROOT)
 
dict[str, str|None] package_versions (tuple[str,...] packages=TRACKED_PACKAGES)
 
dict[str, Any] hardware_info ()
 
dict[str, Any] run_metadata (int|Mapping[str, int]|None seed=None, **Any extra)
 
Path create_run_dir (str experiment, Any config, int|Mapping[str, int]|None seed=None, str|Path|None root=None, str|None tag=None, **Any extra)
 
None write_summary (str|Path run_dir, Mapping[str, Any] summary)
 

Variables

 REPO_ROOT = Path(__file__).resolve().parents[3]
 
tuple TRACKED_PACKAGES
 

Detailed Description

Run directories with provenance: resolved config, seeds, git revision, versions, hardware.

Every experiment script should call :func:`create_run_dir` before doing work and
:func:`write_summary` at the end. Nothing here imports JAX, so it is safe to use
before :func:`rl_stl.utils.device.configure_jax_device`.

Function Documentation

◆ create_run_dir()

Path rl_stl.utils.provenance.create_run_dir ( str  experiment,
Any  config,
int | Mapping[str, int] | None   seed = None,
str | Path | None   root = None,
str | None   tag = None,
**Any  extra 
)
Create ``runs/<experiment>/<timestamp>[_tag]/`` with config.yaml and metadata.json.

◆ git_revision()

dict[str, Any] rl_stl.utils.provenance.git_revision ( Path   repo_root = REPO_ROOT)

◆ hardware_info()

dict[str, Any] rl_stl.utils.provenance.hardware_info ( )

◆ package_versions()

dict[str, str | None] rl_stl.utils.provenance.package_versions ( tuple[str, ...]   packages = TRACKED_PACKAGES)

◆ run_metadata()

dict[str, Any] rl_stl.utils.provenance.run_metadata ( int | Mapping[str, int] | None   seed = None,
**Any  extra 
)

◆ write_summary()

None rl_stl.utils.provenance.write_summary ( str | Path  run_dir,
Mapping[str, Any]  summary 
)

Variable Documentation

◆ REPO_ROOT

rl_stl.utils.provenance.REPO_ROOT = Path(__file__).resolve().parents[3]

◆ TRACKED_PACKAGES

tuple rl_stl.utils.provenance.TRACKED_PACKAGES
Initial value:
1= (
2 "mujoco",
3 "mujoco-mjx",
4 "playground",
5 "brax",
6 "jax",
7 "jax-cuda12-plugin",
8 "flax",
9 "optax",
10 "stlpy",
11 "gurobipy",
12 "numpy",
13 "scipy",
14)