pub struct GenericJSONDataset {
pub data: Vec<Value>,
pub format: DataFormat,
pub schema: Option<Value>,
}
Fields§
§data: Vec<Value>
§format: DataFormat
§schema: Option<Value>
Implementations§
Source§impl GenericJSONDataset
impl GenericJSONDataset
pub fn new( json_paths: &[PathBuf], schema_path: Option<&Path>, data_format: DataFormat, ) -> Result<Self>
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
pub fn get_random_sample(&self) -> Option<&Value>
pub fn stats(&self) -> HashMap<String, Value>
Sourcepub fn detect_training_format(&self) -> Result<TrainingFormat>
pub fn detect_training_format(&self) -> Result<TrainingFormat>
Detect training format from dataset fields
Sourcepub fn to_training_dataset(&self) -> Result<TrainingDataset>
pub fn to_training_dataset(&self) -> Result<TrainingDataset>
Convert to universal TrainingDataset format
Trait Implementations§
Auto Trait Implementations§
impl Freeze for GenericJSONDataset
impl RefUnwindSafe for GenericJSONDataset
impl Send for GenericJSONDataset
impl Sync for GenericJSONDataset
impl Unpin for GenericJSONDataset
impl UnwindSafe for GenericJSONDataset
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