Learners pick a relaxation parameter ω each round. Feedback is SOR iteration count on a Poisson (5-point Laplacian) system, or a precomputed full-info loss tensor.
conda activate banditos-clean # or: pip install -e .
pip install -e .
python -m pytestConfigs are Python files. A config builds already-parameterized learners (the
graph lives on the spectral algo) and a data source, then calls
run(algos, data). Sweeps are ordinary loops in the config.
python scripts/run.py configs/live_sor.py
python scripts/run.py configs/replay_pitzdaily.py
python scripts/run.py configs/sweep_alpha.py
python scripts/run.py configs/sweep_k.pyOptional Weights & Biases: install wandb yourself and set WANDB_PROJECT, or
pass wandb_project=... into run(). It is not a package dependency.
Regret vs timestep (live SOR):
python scripts/run.py configs/live_sor.pySame plot from archived losses (data/fullinfo/pitzDaily.npy):
python scripts/run.py configs/replay_pitzdaily.pyEach run() writes plots/runs/<stamp>_<name>/:
metrics.csv— per-timestep mean cost / cumulative losssummary.csv— final totalsrun.txt— names, HPs, graph, data, seed, T, K, trialsarrays.npz— cost and action-probability arrays
CSV losses work the same way (load_losses("losses.csv", similarity_kind="chain"),
T×K, one trial). Then pass the bundle into run() like the replay config.
Arm probabilities vs time are written next to the regret plot.
Replot from a saved .npz:
python scripts/plot_regret_t.py plots/runs/<run>/arrays.npz
python scripts/plot_arm_probs.py plots/runs/<run>/arrays.npzRegret vs number of configs (K):
python scripts/run.py configs/sweep_k.py
python scripts/plot_regret_k.py plots/sweeps/<stamp>_k/results.csvpython scripts/run.py configs/sweep_alpha.pysrc/ltr/learners/ Tsallis-INF, Exp3-Spectral, Tsallis-Spectral
src/ltr/solvers/ SOR
src/ltr/data/ load .npy / .npz / .csv losses
src/ltr/graphs/ chain / ring / double_chain + load K×K
src/ltr/plot/ the three figures
src/ltr/experiment.py run(algos, data)
configs/ Python configs (live, replay, sweeps)
scripts/run.py python scripts/run.py configs/foo.py
Old experiment dumps (pitzDailyLarge, sweeps, etc.) are in
../learning-to-relax-archive/, not in this tree.