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: StringTemplate name
agent_type: AgentTypeAgent type
sona_config: SonaConfigSONA configuration
training_method: TrainingMethodTraining method
vertical: Option<VerticalConfig>Vertical configuration
expected_data_size: DataSizeHintExpected training data size
memory_budget_mb: usizeMemory budget in MB
target_latency_us: u64Target latency in microseconds
continuous_learning: boolEnable continuous learning
auto_export: boolAuto-export trained adapters
Tags for organization
Implementations§
Source§impl TrainingTemplate
impl TrainingTemplate
Sourcepub fn new(name: impl Into<String>, agent_type: AgentType) -> Self
pub fn new(name: impl Into<String>, agent_type: AgentType) -> Self
Create a new training template
Sourcepub fn from_preset(preset: TemplatePreset, agent_type: AgentType) -> Self
pub fn from_preset(preset: TemplatePreset, agent_type: AgentType) -> Self
Create from preset
Sourcepub fn code_agent() -> Self
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
Sourcepub fn chat_agent() -> Self
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
Sourcepub fn rag_agent() -> Self
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
Sourcepub fn task_planner() -> Self
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
Sourcepub fn domain_expert(domain: TaskDomain) -> Self
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
Sourcepub fn codebase_helper() -> Self
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
Sourcepub fn data_analyst() -> Self
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
Sourcepub fn creative_writer() -> Self
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
Sourcepub fn reasoning_agent() -> Self
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
Sourcepub fn with_sona_config(self, config: SonaConfig) -> Self
pub fn with_sona_config(self, config: SonaConfig) -> Self
Set SONA configuration
Sourcepub fn with_training_method(self, method: TrainingMethod) -> Self
pub fn with_training_method(self, method: TrainingMethod) -> Self
Set training method
Sourcepub fn with_vertical(self, vertical: VerticalConfig) -> Self
pub fn with_vertical(self, vertical: VerticalConfig) -> Self
Set vertical configuration
Sourcepub fn with_memory_budget(self, mb: usize) -> Self
pub fn with_memory_budget(self, mb: usize) -> Self
Set memory budget
Sourcepub fn with_target_latency(self, us: u64) -> Self
pub fn with_target_latency(self, us: u64) -> Self
Set target latency
Sourcepub fn with_continuous_learning(self, enabled: bool) -> Self
pub fn with_continuous_learning(self, enabled: bool) -> Self
Enable continuous learning
Sourcepub fn with_auto_export(self, enabled: bool) -> Self
pub fn with_auto_export(self, enabled: bool) -> Self
Enable auto-export
Add tags
Set hidden dimension
Sourcepub fn with_lora_ranks(self, micro: usize, base: usize) -> Self
pub fn with_lora_ranks(self, micro: usize, base: usize) -> Self
Set LoRA ranks
Sourcepub fn estimated_memory_mb(&self) -> usize
pub fn estimated_memory_mb(&self) -> usize
Get estimated memory usage in MB
Trait Implementations§
Source§impl Clone for TrainingTemplate
impl Clone for TrainingTemplate
Source§fn clone(&self) -> TrainingTemplate
fn clone(&self) -> TrainingTemplate
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more