pub struct LayaSpec {
pub id: String,
pub encoder: EncoderConfig,
pub agent: AgentConfig,
}Expand description
Both configs of a compat checkpoint.
Fields§
§id: StringThe name kime serves it under, laya, laya-multilingual or laya-typed-decisions for
the published ones.
encoder: EncoderConfigThe encoder.
agent: AgentConfigThe decision head.
Implementations§
Source§impl LayaSpec
impl LayaSpec
Sourcepub fn from_json(agent_json: &Value, encoder: &Value) -> Result<Self, Error>
pub fn from_json(agent_json: &Value, encoder: &Value) -> Result<Self, Error>
Builds the spec from the two config files. The id follows the encoder: the published
checkpoints get their Laya names and anything else is laya-custom. The typed-decisions
checkpoint shares the English encoder and is told apart by its model_name.
§Errors
Error::Format from either config.
Trait Implementations§
impl StructuralPartialEq for LayaSpec
Auto Trait Implementations§
impl Freeze for LayaSpec
impl RefUnwindSafe for LayaSpec
impl Send for LayaSpec
impl Sync for LayaSpec
impl Unpin for LayaSpec
impl UnsafeUnpin for LayaSpec
impl UnwindSafe for LayaSpec
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