pub struct HuggingFaceExporter<'a> { /* private fields */ }Expand description
Main HuggingFace exporter
Implementations§
Source§impl<'a> HuggingFaceExporter<'a>
impl<'a> HuggingFaceExporter<'a>
Sourcepub fn new(engine: &'a SonaEngine) -> Self
pub fn new(engine: &'a SonaEngine) -> Self
Create new exporter
Sourcepub fn with_config(engine: &'a SonaEngine, config: ExportConfig) -> Self
pub fn with_config(engine: &'a SonaEngine, config: ExportConfig) -> Self
Create with custom config
Sourcepub fn export_lora_safetensors<P: AsRef<Path>>(
&self,
output_dir: P,
) -> Result<ExportResult, ExportError>
pub fn export_lora_safetensors<P: AsRef<Path>>( &self, output_dir: P, ) -> Result<ExportResult, ExportError>
Export LoRA weights in SafeTensors format (PEFT-compatible)
Sourcepub fn export_patterns_jsonl<P: AsRef<Path>>(
&self,
output_path: P,
) -> Result<ExportResult, ExportError>
pub fn export_patterns_jsonl<P: AsRef<Path>>( &self, output_path: P, ) -> Result<ExportResult, ExportError>
Export patterns as JSONL dataset
Sourcepub fn export_preference_pairs<P: AsRef<Path>>(
&self,
output_path: P,
) -> Result<ExportResult, ExportError>
pub fn export_preference_pairs<P: AsRef<Path>>( &self, output_path: P, ) -> Result<ExportResult, ExportError>
Export preference pairs for DPO/RLHF training
Sourcepub fn push_to_hub(
&self,
repo_id: &str,
token: Option<&str>,
) -> Result<ExportResult, ExportError>
pub fn push_to_hub( &self, repo_id: &str, token: Option<&str>, ) -> Result<ExportResult, ExportError>
Export all to HuggingFace Hub
Sourcepub fn export_all<P: AsRef<Path>>(
&self,
output_dir: P,
) -> Result<Vec<ExportResult>, ExportError>
pub fn export_all<P: AsRef<Path>>( &self, output_dir: P, ) -> Result<Vec<ExportResult>, ExportError>
Export complete package (LoRA + patterns + config)
Auto Trait Implementations§
impl<'a> Freeze for HuggingFaceExporter<'a>
impl<'a> !RefUnwindSafe for HuggingFaceExporter<'a>
impl<'a> Send for HuggingFaceExporter<'a>
impl<'a> Sync for HuggingFaceExporter<'a>
impl<'a> Unpin for HuggingFaceExporter<'a>
impl<'a> !UnwindSafe for HuggingFaceExporter<'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