A Coding Implementation on Microsoft SkillOpt for Instrumented Immediate Optimization, Talent Evolution Evaluation, and Baseline Comparability

A Coding Implementation on Microsoft SkillOpt for Instrumented Immediate Optimization, Talent Evolution Evaluation, and Baseline Comparability


okay = RUN_KNOBS
train_out = run_cli(["python","scripts/train.py","--config",CFG,"--split_dir",SPLIT,
   "--optimizer_model",OPTIMIZER_MODEL,"--target_model",TARGET_MODEL,"--out_root",RUN,
   *COMMON,
   "train.train_size=0",
   f"train.num_epochs={k['num_epochs']}", f"prepare.batch_size={okay['batch_size']}",
   f"gradient.minibatch_size={okay['minibatch']}", f"gradient.merge_batch_size={okay['merge_batch']}",
   f"gradient.analyst_workers={okay['workers']}",
   f"optimizer.learning_rate={okay['lr']}", f"optimizer.lr_scheduler={okay['lr_sched']}",
   "optimizer.use_slow_update=true", "optimizer.use_meta_skill=true",
   f"env.employees={okay['workers']}", f"env.restrict={okay['limit']}"],
   "TRAIN (rollout->reflect->aggregate->select->update->gate; slow-update + meta-skill)")
import pandas as pd, matplotlib.pyplot as plt
hist = json.hundreds(pathlib.Path(f"{RUN}/historical past.json").read_text())
df = pd.json_normalize(hist)
print("nhistory.json columns:", listing(df.columns))
def col(*cands):
   for c in cands:
       for precise in df.columns:
           if c in precise.decrease(): return precise
   return None
c_step = col("step")
x = df[c_step] if c_step else vary(len(df))
c_tr, c_va = col("train_acc","train_hard","prepare"), col("val_acc","val_hard","legitimate","val")
c_lr, c_tok = col("edit_budget","lr","learning_rate","funds"), col("token","price")
fig, ax = plt.subplots(1, 3, figsize=(16,4))
if c_tr: ax[0].plot(x, df[c_tr], "o-", label="prepare acc")
if c_va: ax[0].plot(x, df[c_va], "s-", label="val acc (gate)")
if base and base["hard"] shouldn't be None: ax[0].axhline(base["hard"], ls="--", c="gray", label="baseline (seed)")
ax[0].set_title("Talent accuracy over steps"); ax[0].set_xlabel("step"); ax[0].legend(); ax[0].grid(alpha=.3)
if c_lr: ax[1].plot(x, df[c_lr], "d-", c="purple")
ax[1].set_title("Edit-budget / LR schedule (cosine)"); ax[1].set_xlabel("step"); ax[1].grid(alpha=.3)
if c_tok: ax[2].plot(x, pd.to_numeric(df[c_tok],errors="coerce").cumsum(), c="darkorange")
ax[2].set_title("Cumulative token utilization"); ax[2].set_xlabel("step"); ax[2].grid(alpha=.3)
plt.tight_layout(); plt.savefig(f"{RUN}/training_dashboard.png", dpi=120); plt.present()



Source link

Leave a Reply

Your email address will not be published. Required fields are marked *