RadCluster
Graph-based cluster dynamics for irradiated materials
Loading...
Searching...
No Matches
Functions | Variables
rescore Namespace Reference

Functions

 find_runs ()
 
 rescore (rid, run_dir, entry)
 
 main (argv=None)
 

Variables

 HERE = Path(__file__).resolve().parent
 
 DT = HERE.parent
 
 MOD = DT.parent
 
 REPO = MOD.parent
 

Detailed Description

rescore.py — re-apply the observation operator to runs already computed.

    python rescore.py --dry-run     # show what would change
    python rescore.py               # rewrite and publish the corrected records

WHY.  The dose ladder scored the wrong dose and said it had not (b5e9a51): the
end point rounded past the final grid point, and a requested dose that was not
itself a grid point silently took the last point BELOW it, however far below.
On the exact arm `T4_D_4k` the "0.2 dpa" column carried 0.0665 dpa numbers -- 3x
low -- while `reached_all_scoring_doses` reported True.  Every run computed
before that fix carries columns labelled with doses they were not taken at.

The trajectories are sound; only the extraction was wrong.  So this re-reads
each run's saved solution and re-runs `run_ensemble.observe` under the current
code, rather than recomputing 17 hours of solver time.

SCOPE.  A run can only be re-scored on the machine that produced it: the
trajectory lives in `output/<stamp>_<run_id>_.../plots/plot_data.pkl`, and
`output/` is gitignored (a 38 MB pickle per run, and one of live objects that
will not survive a class refactor -- see .gitignore).  What crossed the wire is
the compact record, which is the thing being corrected.  Run this on EVERY
machine that computed rows; each fixes its own and pushes.

Function Documentation

◆ find_runs()

rescore.find_runs ( )
Map run_id -> newest output directory produced on this machine.

Definition at line 47 of file rescore.py.

◆ main()

rescore.main (   argv = None)

Definition at line 92 of file rescore.py.

◆ rescore()

rescore.rescore (   rid,
  run_dir,
  entry 
)
Recompute the observables for one run from its saved solution.

Definition at line 64 of file rescore.py.

Variable Documentation

◆ DT

rescore.DT = HERE.parent

Definition at line 36 of file rescore.py.

◆ HERE

rescore.HERE = Path(__file__).resolve().parent

Definition at line 35 of file rescore.py.

◆ MOD

rescore.MOD = DT.parent

Definition at line 37 of file rescore.py.

◆ REPO

rescore.REPO = MOD.parent

Definition at line 38 of file rescore.py.