pub struct DatasetRegistry { /* private fields */ }Expand description
Registry of all datasets that zeph-bench knows about.
The registry is pre-populated with six built-in datasets on construction and
provides case-insensitive lookup by name. It is the authoritative source for
the bench list CLI subcommand.
§Built-in Datasets
| Name | Format | Source |
|---|---|---|
longmemeval | JSONL | HuggingFace xiaowu0162/longmemeval |
locomo | JSON | HuggingFace lmlab/locomo |
frames | JSONL | HuggingFace google/frames-benchmark |
tau2-bench-retail | JSON | GitHub sierra-research/tau2-bench |
tau2-bench-airline | JSON | GitHub sierra-research/tau2-bench |
gaia | JSONL | HuggingFace gaia-benchmark/GAIA |
§Examples
use zeph_bench::DatasetRegistry;
let registry = DatasetRegistry::new();
// List all datasets.
assert_eq!(registry.list().len(), 6);
// Lookup is case-insensitive.
assert!(registry.get("GAIA").is_some());
assert!(registry.get("unknown").is_none());Implementations§
Source§impl DatasetRegistry
impl DatasetRegistry
Sourcepub fn new() -> Self
pub fn new() -> Self
Create a registry pre-populated with all built-in datasets.
§Examples
use zeph_bench::DatasetRegistry;
let registry = DatasetRegistry::new();
assert!(!registry.list().is_empty());Sourcepub fn list(&self) -> &[DatasetMeta]
pub fn list(&self) -> &[DatasetMeta]
Return a slice of all registered datasets.
§Examples
use zeph_bench::DatasetRegistry;
let registry = DatasetRegistry::new();
for meta in registry.list() {
println!("{}: {}", meta.name, meta.url);
}Sourcepub fn get(&self, name: &str) -> Option<&DatasetMeta>
pub fn get(&self, name: &str) -> Option<&DatasetMeta>
Look up a dataset by name using case-insensitive ASCII comparison.
Returns None when no dataset with the given name is registered.
§Examples
use zeph_bench::DatasetRegistry;
let registry = DatasetRegistry::new();
let meta = registry.get("locomo").expect("locomo is built-in");
assert_eq!(meta.name, "locomo");
// Case-insensitive.
assert!(registry.get("LOCOMO").is_some());
// Unknown dataset.
assert!(registry.get("does-not-exist").is_none());Trait Implementations§
Auto Trait Implementations§
impl Freeze for DatasetRegistry
impl RefUnwindSafe for DatasetRegistry
impl Send for DatasetRegistry
impl Sync for DatasetRegistry
impl Unpin for DatasetRegistry
impl UnsafeUnpin for DatasetRegistry
impl UnwindSafe for DatasetRegistry
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 moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request