Initialize optimizer research workspace with official baselines and history-free coverage

Vendor pinned MeZO, AGZO, LOZO and LoREN sources with independent environments. Add direct in-place fix/adjust/node training, derived history-free basis gradients, development-best checkpoints and experiment tooling. Keep models, datasets, caches and credentials outside Git.

Validation: 93 project tests passed; 521 vendored author files verified.
This commit is contained in:
gloamxun committed 2026-11-12 23:32:33 +08:00
commit e0feabec8f
596 files changed
+87356

No files matched your search

+28
View File
@@ -0,0 +1,28 @@
"""Compare selected compatible run curves without seed-range shading."""
import argparse
import json
from pathlib import Path
import sys
ROOT=Path(__file__).resolve().parents[1]
sys.path.insert(0,str(ROOT/'src'))
from experiments_codebase.paths import paths
import matplotlib
matplotlib.use('Agg')
import matplotlib.pyplot as plt
def main():
p=argparse.ArgumentParser(description=__doc__);p.add_argument('--config',type=Path,required=True);p.add_argument('--out',type=Path,required=True);a=p.parse_args()
if not a.out.resolve().is_relative_to(paths()['results'].resolve()):raise ValueError('Plots belong under shared results')
a.out.mkdir(parents=True,exist_ok=True);cfg=json.loads(a.config.read_text())
for metric in ('loss','accuracy'):
fig,ax=plt.subplots(figsize=(9,4));any_curve=False
for item in cfg['runs']:
if not item.get('enabled',True):continue
folder=Path(item['directory']);curve=json.loads((folder/'curve.json').read_text());split=cfg.get('split','development')
points=[v for v in curve if metric in v[split]]
if points:ax.plot([v['main_forwards'] for v in points],[v[split][metric] for v in points],label=item['label']);any_curve=True
if any_curve:
ax.set(xlabel='Cumulative main forwards',ylabel=metric,title=cfg.get('title',''));ax.legend();ax.grid(alpha=.2);fig.tight_layout();fig.savefig(a.out/f'{metric}_curve.png',dpi=180)
plt.close(fig)
(a.out/'plot_config.json').write_text(json.dumps(cfg,indent=2))
if __name__=='__main__':main()