pub struct DatasetExporter<'a> { /* private fields */ }Expand description
Dataset exporter for patterns and preferences
Implementations§
Source§impl<'a> DatasetExporter<'a>
impl<'a> DatasetExporter<'a>
Sourcepub fn new(config: &'a ExportConfig) -> Self
pub fn new(config: &'a ExportConfig) -> Self
Create new dataset exporter
Sourcepub fn export_patterns<P: AsRef<Path>>(
&self,
engine: &SonaEngine,
output_path: P,
) -> Result<ExportResult, ExportError>
pub fn export_patterns<P: AsRef<Path>>( &self, engine: &SonaEngine, output_path: P, ) -> Result<ExportResult, ExportError>
Export learned patterns as JSONL dataset
Sourcepub fn export_preferences<P: AsRef<Path>>(
&self,
engine: &SonaEngine,
output_path: P,
) -> Result<ExportResult, ExportError>
pub fn export_preferences<P: AsRef<Path>>( &self, engine: &SonaEngine, output_path: P, ) -> Result<ExportResult, ExportError>
Export preference pairs for DPO/RLHF training
Sourcepub fn export_distillation_targets<P: AsRef<Path>>(
&self,
engine: &SonaEngine,
output_path: P,
) -> Result<ExportResult, ExportError>
pub fn export_distillation_targets<P: AsRef<Path>>( &self, engine: &SonaEngine, output_path: P, ) -> Result<ExportResult, ExportError>
Export distillation targets for knowledge distillation
Auto Trait Implementations§
impl<'a> Freeze for DatasetExporter<'a>
impl<'a> RefUnwindSafe for DatasetExporter<'a>
impl<'a> Send for DatasetExporter<'a>
impl<'a> Sync for DatasetExporter<'a>
impl<'a> Unpin for DatasetExporter<'a>
impl<'a> UnwindSafe for DatasetExporter<'a>
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