pub struct Chronos2Config {
pub d_model: u32,
pub d_kv: u32,
pub d_ff: u32,
pub num_layers: u32,
pub num_heads: u32,
pub layer_norm_epsilon: f64,
pub rope_theta: f64,
pub feed_forward_proj: String,
pub chronos_config: ChronosInnerConfig,
}Expand description
Top-level Chronos-2 config.json.
The chronos_config key holds a nested dict with forecasting-specific settings.
Fields§
§d_model: u32§d_kv: u32§d_ff: u32§num_layers: u32§num_heads: u32§layer_norm_epsilon: f64§rope_theta: f64§feed_forward_proj: String§chronos_config: ChronosInnerConfigImplementations§
Source§impl Chronos2Config
impl Chronos2Config
pub fn from_json(s: &str) -> Result<Self>
Sourcepub fn time_encoding_scale(&self) -> u32
pub fn time_encoding_scale(&self) -> u32
Effective time_encoding_scale: falls back to context_length if not set.
Sourcepub fn dense_act_fn(&self) -> &str
pub fn dense_act_fn(&self) -> &str
Dense activation function name (e.g. “relu”).
Trait Implementations§
Source§impl Debug for Chronos2Config
impl Debug for Chronos2Config
Source§impl<'de> Deserialize<'de> for Chronos2Config
impl<'de> Deserialize<'de> for Chronos2Config
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl From<&Chronos2Config> for InferConfig
Chronos2Config already resolved every default (via serde) or failed to parse if a
genuinely required field was missing, so this mapping is infallible and needs no further
defaulting of its own.
impl From<&Chronos2Config> for InferConfig
Chronos2Config already resolved every default (via serde) or failed to parse if a
genuinely required field was missing, so this mapping is infallible and needs no further
defaulting of its own.
Source§fn from(c2: &Chronos2Config) -> Self
fn from(c2: &Chronos2Config) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for Chronos2Config
impl RefUnwindSafe for Chronos2Config
impl Send for Chronos2Config
impl Sync for Chronos2Config
impl Unpin for Chronos2Config
impl UnsafeUnpin for Chronos2Config
impl UnwindSafe for Chronos2Config
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
impl<T> ErasedDestructor for Twhere
T: 'static,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more