specsrbench.paths¶
Where the inputs and outputs live, and how they are found.
Three layers, in the order they are consulted:
Environment variables.
SPECSRBENCH_CACHE,SPECSRBENCH_SETSandSPECSRBENCH_FIGURESoverride everything. An installed wheel has no repo around it, so this is the only mechanism apip installuser has.A repo root walked up from the caller. A directory is the root if it holds
cache_logR_tuned/. Note what is not in that test: anything to do with the manuscript. The figures used to require the paper source to sit beside the cache, which made every one of them unbuildable anywhere except inside one particular checkout.The current directory. So that
specsrbench figures allin a fresh clone does the obvious thing.
Directories are not created on import. A module that only reads should fail with “no such directory” rather than silently make an empty one and then report a missing file inside it – the failure mode that sends people looking for a corrupted cache when the real problem is that they are in the wrong directory.
Functions
The tuned cache every figure reads. |
|
|
One line per resolved path, for printing at the top of a run. |
Where figure PDFs are written. |
|
|
Directory holding |
|
The paired evaluation/calibration/tuning sets the cache is built from. |
- specsrbench.paths.repo_root(start=None)[source]¶
Directory holding
cache_logR_tuned/, or the current directory.
- specsrbench.paths.sets_dir()[source]¶
The paired evaluation/calibration/tuning sets the cache is built from.
Separate from
cache_dir()because the two have different lifetimes: the sets come out ofspecsrand the JADES tree and change only when the models or the split do, while the cache is rebuilt every time a classical parameter moves.- Return type: