This playbook describes how to migrate historical EngiOpt checkpoints from Weights & Biases (W&B) to the Hugging Face Hub (HF) without breaking backward compatibility.
This is guidance only for phase 1 of the HF checkpoint backend rollout.
What this phase does not do:
- delete historical W&B artifacts
- mutate historical W&B artifacts in place
- assume every historical run should be migrated
- Stop creating new long-lived checkpoint pressure in W&B by making HF the default backend for new saved models.
- Keep historical W&B checkpoints loadable while HF-backed packages roll out.
- Create a safe path to reclaim W&B storage later, after validation.
Start with the official or release subset of checkpoints first, not the full historical backlog.
Good early candidates:
- checkpoints referenced in papers, benchmarks, or public notebooks
- checkpoints linked from README examples
- checkpoints used by downstream evaluation scripts or case studies
Each migrated HF checkpoint package should be self-contained and include:
- the original model weight file or files
run_config.jsonmetadata.json
metadata.json should record at least:
problem_idalgoseed- original W&B project, run id, and artifact names
- HF repo id and package path
- primary file list
-
Inventory the target artifacts. Create a manifest with artifact name, aliases, run id, problem, algorithm, seed, expected files, and whether the artifact is part of the official/release subset.
-
Freeze the migration manifest before uploads. Use the manifest as the source of truth so the migration is reproducible and reviewable.
-
Download the original W&B artifacts. For each target artifact, download the stored files and extract the associated W&B run config needed to rebuild the model outside W&B.
-
Build the HF package. Upload the weights together with
run_config.jsonandmetadata.jsoninto the per-model-family HF repo under the deterministic package path:problem_id[/extra_parts]/seed_<seed> -
Record the mapping. For every migrated checkpoint, store a durable mapping from the W&B artifact alias to the HF repo id, revision, and package path.
-
Validate restores before cleanup. Test a representative sample end-to-end with EngiOpt’s evaluation or surrogate-model loading path and confirm the HF package reproduces the expected model restore behavior.
-
Add pointers back into W&B metadata. Once validated, update run metadata, summaries, or notes so the WandB run points to the canonical HF checkpoint location.
-
Keep an overlap period. Retain both HF and W&B copies long enough to verify that downstream users and scripts are not relying on the old blob storage path.
-
Only then define deletion policy. Deletion or retention changes should happen in a separate maintenance pass, using the manifest as the authoritative record.
Before any cleanup is considered for a migrated checkpoint:
- The HF package contains all required weight files.
run_config.jsonis present and sufficient to rebuild the model.metadata.jsonis present and points back to the original W&B lineage.- A real EngiOpt load path has succeeded against the HF package.
- The corresponding W&B run contains the HF pointer or mapping information.
When the project is ready to reclaim W&B storage:
- Start with official checkpoints only.
- Delete in small batches, not all at once.
- Confirm the manifest entry is complete before each deletion.
- Re-run a small restore audit after each batch.
- Keep at least one validated overlap window where both copies coexist.
- W&B remains part of the lineage story even after HF becomes the canonical checkpoint host.
- HF should be treated as the long-lived storage backend for public or durable checkpoints.
- Backward compatibility matters more than immediate cleanup.