Skip to main content

dispatch_key

Function dispatch_key 

Source
pub fn dispatch_key(spec_kind: &str) -> Result<TorchSmoothEntry, String>
Expand description

Map a Python Smooth subclass name to the matching torch entry kind.

Returns Ok(entry) for every Smooth subclass that gamfit.torch re-exports. Each recognised entry has a matching fit.py branch that builds a concrete design/penalty tensor pair; the NotImplementedError fallback there is now only a defensive guard for a future Rust variant added without a torch branch. Truly unknown class names produce a TypeError-shaped message preserving the previous Python cascade’s surface error.