Files
ruvnet--RuView/v2/crates/wifi-densepose-occworld-candle/src/error.rs
T
ruv 9ad550d95f feat(worldmodel): Candle Rust port + GCP GPU scripts (ADR-147 Phase 4+6)
Candle native port — wifi-densepose-occworld-candle v0.3.0:
- config.rs: OccWorldConfig (14 params matching occworld.py)
- vqvae.rs: ClassEmbedding(18→64), VQCodebook(512×512, squared-L2),
  QuantConv/PostQuantConv(1×1 Conv2d), fold_3d_to_2d helpers
  ResNet encoder/decoder are documented stubs (Phase 5 checkpoint pending)
- transformer.rs: full Candle MHA transformer (2 layers, temporal+spatial
  cross-attention, FFN, pre-norm residuals)
- inference.rs: OccWorldCandle::dummy() + ::load() + predict()
  InferenceOutput: sem_pred(1,15,200,200,16) + trajectory_priors
- 14/14 tests pass (12 lib + 2 doctests)

GCP GPU scripts — scripts/gcp/:
- provision_training.sh: a2-highgpu-8g (8×A100 40GB) for Phase 5 retraining
- run_training.sh: rsync + torchrun 8-GPU train + checkpoint download
- provision_cosmos.sh: a2-ultragpu-1g (A100 80GB) for Cosmos evaluation
- cosmos_eval.sh: run Cosmos-Transfer2.5 inference, download results
- teardown.sh: safe checkpoint download + instance delete

Co-Authored-By: claude-flow <ruv@ruv.net>
2026-05-29 20:52:51 -04:00

30 lines
923 B
Rust

//! Error types for `wifi-densepose-occworld-candle`.
/// All errors that can occur during OccWorld inference.
#[derive(Debug, thiserror::Error)]
pub enum OccWorldError {
/// A Candle operation failed.
#[error("candle error: {0}")]
Candle(#[from] candle_core::Error),
/// Input or output tensor has an unexpected shape.
#[error("shape mismatch: {0}")]
ShapeMismatch(String),
/// The checkpoint file could not be found or opened.
#[error("checkpoint not found: {0}")]
CheckpointNotFound(String),
/// The checkpoint file exists but could not be parsed.
#[error("checkpoint parse error: {0}")]
CheckpointParse(String),
/// A required tensor key is missing from the checkpoint.
#[error("missing weight key '{0}' in checkpoint")]
MissingKey(String),
/// I/O error reading the checkpoint file.
#[error("I/O error: {0}")]
Io(#[from] std::io::Error),
}