pub struct DatasetManager { /* private fields */ }Expand description
Dataset manager for coordinating multiple loaders
Implementations§
Source§impl DatasetManager
impl DatasetManager
pub fn new() -> Self
pub fn register_loader(&mut self, name: String, loader: Box<dyn DatasetLoader>)
pub fn register_file_loader<P: AsRef<Path>>( &mut self, name: String, data_dir: P, )
pub fn set_default_loader(&mut self, name: String)
pub fn load_dataset( &self, dataset_name: &str, split: &str, loader_name: Option<&str>, ) -> Result<EvaluationDataset>
pub fn list_datasets(&self, loader_name: Option<&str>) -> Vec<String>
pub fn list_splits( &self, dataset_name: &str, loader_name: Option<&str>, ) -> Vec<String>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for DatasetManager
impl !RefUnwindSafe for DatasetManager
impl !Send for DatasetManager
impl !Sync for DatasetManager
impl Unpin for DatasetManager
impl UnsafeUnpin for DatasetManager
impl !UnwindSafe for DatasetManager
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more