Whole-workspace rustfmt pass picked up while iterating on Mamba GPU backward work. Verified formatting-only via diff sampling; no logic changed. Co-Authored-By: Claude Sonnet 5 <[email protected]>
Batch 29a — GpuViTEncoder cudarc round-trip + 6 new tests (18 total): - GpuWeightBuffers: CudaSlice<f32> for patch_embed/proj_w/per-block qkv+ffn - cuda() constructor: CudaContext::new() + stream.clone_htod() weight upload - encode(): GPU htod→dtoh round-trip when context+weights present; CPU fallback - warmup(): touches proj_w buffer via dtoh; has_gpu_weights(), gpu_buffer_count() - JepaTrainerV2 encoder field visibility: ViTBlock+CpuViTEncoder pub(crate) - JepaEncoder trait: as_any()/as_any_mut() for downcasting; impl on all encoders Batch 29b — Binary weight serialization (jepa_checkpoint.rs, 18 tests): - Format: b"JEPA" magic + version u32 + fields + step u64 + checksum u32 - serialize/deserialize_checkpoint(): pure binary, no deps - save/load_checkpoint(): file I/O wrappers with CheckpointError enum - encoder_to_fields() / apply_fields_to_encoder(): CpuViTEncoder ↔ WeightField - JepaTrainerV2::context_encoder_as_cpu[_mut]() via Any downcast - JepaCheckpoint::save_with_trainer(): writes JSON summary + .jepa binary - run_jepa_training(): auto-resume from config.resume_from checkpoint path Batch 29c — Training metrics logger (jepa_metrics.rs, 20 tests + 3 runner): - StepMetrics, WindowMetrics, TrainingSummaryReport types - JepaMetricsLogger: EMA loss (α=0.02), loss_trend() linear regression, eta_seconds(), progress_line() with [====>.....] bar and ETA - to_csv() / save_csv() export; training_summary() → TrainingSummaryReport - run_jepa_training() wired: delegates all logging to metrics_logger.progress_line() - JepaRunConfig: +metrics_csv_path (saved at end if set) Co-Authored-By: Claude Sonnet 4.6 <[email protected]>