Spaces:
Sleeping
Sleeping
Commit History
-
fix: remap bare Sequential keys to net.* when loading ddg_da.ptβ
Checkpoint was saved when DriftPredictorMLP used a bare nn.Sequential, producing keys like '0.weight'. Current class wraps it as self.net, expecting 'net.0.weight'. Remap on load so old .pt files load correctly.ef2e4d9 -
fix: patch torchmetrics._apply using CPU probe tensor instead of self.deviceβ
The root cause of 'Torch not compiled with CUDA enabled' is that torchmetrics.Metric._apply does fn(torch.zeros(1, device=self.device)) where self.device='cuda:0' from the checkpoint β even after map_location moves all tensors to CPU, because _device is an attribute not a tensor. Fix: replace the CUDA probe with fn(torch.zeros(1, device='cpu')) so the destination device is inferred safely without touching CUDA hardware. Patch is applied before pytorch_forecasting is imported so it is in place when Lightning restores metric state during load_from_checkpoint.ec4688a -
fix: use callable map_location to skip Lightning model.to() β avoids torchmetrics CUDA assertion
49e908a -
fix: patch raw checkpoint to replace all CUDA refs before load
ae54b1b -
fix: patch torchmetrics._apply for CPU-only load of GPU-trained checkpoint
c2a87a5 -
fix: track app/models/ package, ignore only top-level /models/
7af21f9