dataset
genlm.eval.core.dataset
Instance
Dataset
Bases: Generic[T]
, ABC
Base class for datasets that yield instances conforming to a Pydantic schema.
Source code in genlm/eval/core/dataset.py
__iter__()
abstractmethod
Iterate over dataset instances.
Returns:
Type | Description |
---|---|
Iterator[T]
|
Iterator[T]: An iterator over instances conforming to schema T. |
schema
abstractmethod
property
Get the Pydantic schema class for this dataset.
Returns:
Type | Description |
---|---|
type[T]
|
type[T]: The Pydantic model class defining the schema. |