geno_lewm.deploy.export¶
export
¶
Export a trained checkpoint to deployable safetensors weights (RFC-0018 §3.3).
Phase 1 converts the training-produced predictor_checkpoint.pt into the
predictor.safetensors + action_encoder.safetensors artifacts that the
deploy runtime (:mod:geno_lewm.deploy.runtime) loads with strict=True,
plus an export_report.json recording artifact identities. The ONNX / Core
ML / GGUF targets and int8/int4 quantization land later (#67–#70); this is the
minimal serialize step that unblocks packaging, scoring, eval, and the demo.
export_checkpoint
¶
export_checkpoint(checkpoint_path: Path, output_dir: Path, *, overwrite: bool = False) -> dict[str, Any]
Convert a training checkpoint into deploy-ready safetensors artifacts.
Reads the torch.save checkpoint at checkpoint_path, writes the
predictor and action-encoder state_dict tensors as safetensors files
under output_dir, and emits export_report.json. Returns the report.