TrainingTemplate

Struct TrainingTemplate 

Source
pub struct TrainingTemplate {
    pub name: String,
    pub agent_type: AgentType,
    pub sona_config: SonaConfig,
    pub training_method: TrainingMethod,
    pub vertical: Option<VerticalConfig>,
    pub expected_data_size: DataSizeHint,
    pub memory_budget_mb: usize,
    pub target_latency_us: u64,
    pub continuous_learning: bool,
    pub auto_export: bool,
    pub tags: Vec<String>,
}
Expand description

Training template with full configuration

Fields§

§name: String

Template name

§agent_type: AgentType

Agent type

§sona_config: SonaConfig

SONA configuration

§training_method: TrainingMethod

Training method

§vertical: Option<VerticalConfig>

Vertical configuration

§expected_data_size: DataSizeHint

Expected training data size

§memory_budget_mb: usize

Memory budget in MB

§target_latency_us: u64

Target latency in microseconds

§continuous_learning: bool

Enable continuous learning

§auto_export: bool

Auto-export trained adapters

§tags: Vec<String>

Tags for organization

Implementations§

Source§

impl TrainingTemplate

Source

pub fn new(name: impl Into<String>, agent_type: AgentType) -> Self

Create a new training template

Source

pub fn from_preset(preset: TemplatePreset, agent_type: AgentType) -> Self

Create from preset

Source

pub fn code_agent() -> Self

Code agent template - optimized for code generation

Best for: Code completion, bug fixes, refactoring Config: baseLoraRank=16, clusters=200, capacity=10000 Training data: Code completions, fixes, reviews

Source

pub fn chat_agent() -> Self

Chat agent template - optimized for conversational AI

Best for: Customer support, general chat, assistants Config: baseLoraRank=8, clusters=50, fast response Training data: Conversation histories, feedback

Source

pub fn rag_agent() -> Self

RAG agent template - optimized for retrieval-augmented generation

Best for: Document Q&A, knowledge bases, search Config: clusters=200, capacity=10000, high pattern storage Training data: Document chunks, Q&A pairs

Source

pub fn task_planner() -> Self

Task planner template - optimized for task decomposition

Best for: Project planning, task breakdown, scheduling Config: baseLoraRank=16, ewcLambda=2000, multi-task Training data: Task decompositions, planning examples

Source

pub fn domain_expert(domain: TaskDomain) -> Self

Domain expert template - optimized for specialized knowledge

Best for: Legal, medical, financial expertise Config: qualityThreshold=0.1, high capacity, compliance Training data: Domain-specific Q&A, expert responses

Source

pub fn codebase_helper() -> Self

Codebase helper template - learns your specific codebase

Best for: Repository-specific assistance, code navigation Config: clusters=200, capacity=10000, high pattern storage Training data: Your repo’s code, documentation

Source

pub fn data_analyst() -> Self

Data analyst template - optimized for data insights

Best for: Data analysis, visualization, statistics Config: baseLoraRank=8, clusters=100, reasoning focus

Source

pub fn creative_writer() -> Self

Creative writer template - optimized for content generation

Best for: Marketing copy, blog posts, creative writing Config: High diversity, quality focus

Source

pub fn reasoning_agent() -> Self

Reasoning agent template - optimized for logical reasoning

Best for: Math, logic, chain-of-thought reasoning Config: High rank, strong EWC, accuracy focus

Source

pub fn with_sona_config(self, config: SonaConfig) -> Self

Set SONA configuration

Source

pub fn with_training_method(self, method: TrainingMethod) -> Self

Set training method

Source

pub fn with_vertical(self, vertical: VerticalConfig) -> Self

Set vertical configuration

Source

pub fn with_memory_budget(self, mb: usize) -> Self

Set memory budget

Source

pub fn with_target_latency(self, us: u64) -> Self

Set target latency

Source

pub fn with_continuous_learning(self, enabled: bool) -> Self

Enable continuous learning

Source

pub fn with_auto_export(self, enabled: bool) -> Self

Enable auto-export

Source

pub fn with_tags(self, tags: Vec<String>) -> Self

Add tags

Source

pub fn with_hidden_dim(self, dim: usize) -> Self

Set hidden dimension

Source

pub fn with_lora_ranks(self, micro: usize, base: usize) -> Self

Set LoRA ranks

Source

pub fn validate(&self) -> Result<(), String>

Validate template configuration

Source

pub fn estimated_memory_mb(&self) -> usize

Get estimated memory usage in MB

Trait Implementations§

Source§

impl Clone for TrainingTemplate

Source§

fn clone(&self) -> TrainingTemplate

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for TrainingTemplate

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for TrainingTemplate

Source§

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 Serialize for TrainingTemplate

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,