Skip to content

Add Timm image classification via pluggable training backends#19

Merged
whittenator merged 2 commits into
mainfrom
claude/timm-image-classification-8IU1t
May 31, 2026
Merged

Add Timm image classification via pluggable training backends#19
whittenator merged 2 commits into
mainfrom
claude/timm-image-classification-8IU1t

Conversation

@whittenator

Copy link
Copy Markdown
Owner

Introduce a generalized, registry-based training-backend abstraction so
training libraries are no longer hard-coded into the orchestration code, and
add Timm (PyTorch Image Models) as a first-class image-classification trainer
alongside Ultralytics/YOLO.

Backend

  • New app/services/training package: Trainer ABC + TrainContext/TrainResult,
    a registry (get_trainer/list_frameworks, defaults to ultralytics), shared
    dataset exporters (ImageFolder + YOLO-detect), and two trainers.
  • UltralyticsTrainer: behavior-preserving extraction of the existing YOLO
    training/export/predict logic behind the interface.
  • TimmTrainer: full classification loop with the complete Timm surface —
    any backbone (searchable), pooling head + drop rates, full optimizer/
    scheduler matrix, mixup/cutmix, model EMA, label smoothing, AMP,
    channels-last, and the full augmentation pipeline; self-describing
    checkpoint; ONNX export and predictor.
  • Thin train_task / onnx_export / evaluation / inference now resolve the
    framework via the registry and delegate (no library names in orchestration).
  • framework column on ExperimentRun + ModelArtifact; migration 0008 merges the
    two open migration heads and adds the columns.
  • Capabilities API (/api/training/frameworks + model search) drives the form;
    TrainRequest.framework added and validated against the trainer's tasks.
  • requirements: add timm and matplotlib (propagate to agent images).

Frontend

  • experiments/new.tsx is now schema-driven: a Framework selector, task/model/
    hyperparameter sections rendered from the capabilities API, and a searchable
    Timm backbone picker. Ultralytics form is unchanged.

Tests

  • Registry, shared dataset exporters, capabilities API, framework persistence/
    validation, Timm capability schema, and a gated CPU smoke train.

https://claude.ai/code/session_01CGFLcnxLvPEuF1y6W79nfA

claude added 2 commits May 30, 2026 20:40
Introduce a generalized, registry-based training-backend abstraction so
training libraries are no longer hard-coded into the orchestration code, and
add Timm (PyTorch Image Models) as a first-class image-classification trainer
alongside Ultralytics/YOLO.

Backend
- New app/services/training package: Trainer ABC + TrainContext/TrainResult,
  a registry (get_trainer/list_frameworks, defaults to ultralytics), shared
  dataset exporters (ImageFolder + YOLO-detect), and two trainers.
- UltralyticsTrainer: behavior-preserving extraction of the existing YOLO
  training/export/predict logic behind the interface.
- TimmTrainer: full classification loop with the complete Timm surface —
  any backbone (searchable), pooling head + drop rates, full optimizer/
  scheduler matrix, mixup/cutmix, model EMA, label smoothing, AMP,
  channels-last, and the full augmentation pipeline; self-describing
  checkpoint; ONNX export and predictor.
- Thin train_task / onnx_export / evaluation / inference now resolve the
  framework via the registry and delegate (no library names in orchestration).
- framework column on ExperimentRun + ModelArtifact; migration 0008 merges the
  two open migration heads and adds the columns.
- Capabilities API (/api/training/frameworks + model search) drives the form;
  TrainRequest.framework added and validated against the trainer's tasks.
- requirements: add timm and matplotlib (propagate to agent images).

Frontend
- experiments/new.tsx is now schema-driven: a Framework selector, task/model/
  hyperparameter sections rendered from the capabilities API, and a searchable
  Timm backbone picker. Ultralytics form is unchanged.

Tests
- Registry, shared dataset exporters, capabilities API, framework persistence/
  validation, Timm capability schema, and a gated CPU smoke train.

https://claude.ai/code/session_01CGFLcnxLvPEuF1y6W79nfA
@whittenator whittenator merged commit f64bf63 into main May 31, 2026
3 checks passed
@whittenator whittenator deleted the claude/timm-image-classification-8IU1t branch May 31, 2026 13:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants