config.yaml                                                                                         kalfa 0.2.5
  layers      config.yaml, /alias/kalfa/base, /alias/kalfa/vision
  params
    epochs       20       backbone_lr  1e-05    seed         7
    lr           0.001    unfreeze_at  5
  seed        7
  device      cuda
  rng         derived (no rng key)
  record      runs/pets_$datetime$

── DATA ───────────────────────────────────────────────────────────────────────────────────────────────────────
  source      image_folder  data/pets                     144 rows · 2 columns
  split       random  0.9 / 0.1 / 0  seed=7               train 130  ·  valid 14  ·  test 0
  batch       64                                          feed  table

  field  columns  preprocessors                                             role
  ─────────────────────────────────────────────────────────────────────────────────
  image  image    resize ─→ augment (train only) ─→ to_tensor ─→ normalize  feature
  label  label    —                                                         target

  data/pets ─→ split random
    ├─ train      130  ─→ fit resize, to_tensor, augment, normalize ─→ table
    ├─ valid       14  ─→ apply                                     ─→ table
    └─ test         0  ─→ apply                                     ─→ table

── MODEL ──────────────────────────────────────────────────────────────────────────────────────────────────────
  backbone   frozen (eval mode)  ·  optimizer main
    image ─→ timm_backbone name=resnet50 pretrained=true pooled=true ─→ feature

  head   trained  ·  optimizer main
    feature ─→ linear 37 ─→ logits

  the parameter counts need --measure

  classifier   composite
    inputs image   outputs logits
    image    ─→  backbone  ─→  feature
    feature  ─→  head      ─→  logits

── TRAINING ───────────────────────────────────────────────────────────────────────────────────────────────────
  turn        alternating         20 epochs       predicts classifier

  optimizer  lego                                                          trains             loss  schedule
  ─────────────────────────────────────────────────────────────────────────────────────────────────────────────
  main       adamw lr=0.001 groups=[{'match': 'backbone.*', 'lr': 1e-05}]  ─→ backbone, head  ce    no schedule

  loss  lego           reported on
  ─────────────────────────────────────────────────────────
  ce    cross_entropy  train, valid, test  active at turn 1

  metric    lego      reported on
  ────────────────────────────────────────
  accuracy  accuracy  train, valid, test

  checkpoint  best monitor=val/accuracy mode=max          report best
  stop        val/accuracy plateau 4

  rules (evaluated at the end of a turn, effective in the next)
    turn ≥ 5  ─→  unfreeze  backbone.trainable := True

── AFTER ──────────────────────────────────────────────────────────────────────────────────────────────────────
  report      best        predict classifier ─→ predictions.parquet
  plots       loss_curve, confusion (confusion_matrix)  ─→ plots/
  record      runs/pets_$datetime$

── COLUMNS ────────────────────────────────────────────────────────────────────────────────────────────────────
  column  dtype  field  preprocessors                                role     tensor
  ──────────────────────────────────────────────────────────────────────────────────
  image   image  image  resize ─→ augment ─→ to_tensor ─→ normalize  feature  x
  label   int64  label  —                                            target   label
  the produced widths and the tensor slots need --measure
