nat.data_models.dataset_handler#
Attributes#
Classes#
Subclass of Pydantic BaseModel that allows for specifying the object type. Use in Pydantic discriminated unions. |
|
Subclass of Pydantic BaseModel that allows for specifying the object type. Use in Pydantic discriminated unions. |
|
Subclass of Pydantic BaseModel that allows for specifying the object type. Use in Pydantic discriminated unions. |
|
Subclass of Pydantic BaseModel that allows for specifying the object type. Use in Pydantic discriminated unions. |
|
Subclass of Pydantic BaseModel that allows for specifying the object type. Use in Pydantic discriminated unions. |
|
Subclass of Pydantic BaseModel that allows for specifying the object type. Use in Pydantic discriminated unions. |
|
Configuration for custom dataset type that allows users to specify |
Functions#
|
Module Contents#
- class EvalS3Config(/, **data: Any)#
Bases:
pydantic.BaseModel
- class EvalFilterEntryConfig(/, **data: Any)#
Bases:
pydantic.BaseModel
- class EvalFilterConfig(/, **data: Any)#
Bases:
pydantic.BaseModel- allowlist: EvalFilterEntryConfig | None = None#
- denylist: EvalFilterEntryConfig | None = None#
- class EvalDatasetStructureConfig(/, **data: Any)#
Bases:
pydantic.BaseModel
- class EvalDatasetBaseConfig(/, **data: Any)#
Bases:
nat.data_models.common.TypedBaseModel,nat.data_models.common.BaseModelRegistryTagSubclass of Pydantic BaseModel that allows for specifying the object type. Use in Pydantic discriminated unions.
Create a new model by parsing and validating input data from keyword arguments.
Raises [
ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.selfis explicitly positional-only to allowselfas a field name.- structure: EvalDatasetStructureConfig#
- filter: EvalFilterConfig | None#
- s3: EvalS3Config | None = None#
- file_path: pathlib.Path | str#
- class EvalDatasetJsonConfig(/, **data: Any)#
Bases:
EvalDatasetBaseConfigSubclass of Pydantic BaseModel that allows for specifying the object type. Use in Pydantic discriminated unions.
Create a new model by parsing and validating input data from keyword arguments.
Raises [
ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.selfis explicitly positional-only to allowselfas a field name.- static parser() tuple[collections.abc.Callable, dict]#
- read_jsonl(file_path: pydantic.FilePath)#
- class EvalDatasetJsonlConfig(/, **data: Any)#
Bases:
EvalDatasetBaseConfigSubclass of Pydantic BaseModel that allows for specifying the object type. Use in Pydantic discriminated unions.
Create a new model by parsing and validating input data from keyword arguments.
Raises [
ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.selfis explicitly positional-only to allowselfas a field name.- static parser() tuple[collections.abc.Callable, dict]#
- class EvalDatasetCsvConfig(/, **data: Any)#
Bases:
EvalDatasetBaseConfigSubclass of Pydantic BaseModel that allows for specifying the object type. Use in Pydantic discriminated unions.
Create a new model by parsing and validating input data from keyword arguments.
Raises [
ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.selfis explicitly positional-only to allowselfas a field name.- static parser() tuple[collections.abc.Callable, dict]#
- class EvalDatasetParquetConfig(/, **data: Any)#
Bases:
EvalDatasetBaseConfigSubclass of Pydantic BaseModel that allows for specifying the object type. Use in Pydantic discriminated unions.
Create a new model by parsing and validating input data from keyword arguments.
Raises [
ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.selfis explicitly positional-only to allowselfas a field name.- static parser() tuple[collections.abc.Callable, dict]#
- class EvalDatasetXlsConfig(/, **data: Any)#
Bases:
EvalDatasetBaseConfigSubclass of Pydantic BaseModel that allows for specifying the object type. Use in Pydantic discriminated unions.
Create a new model by parsing and validating input data from keyword arguments.
Raises [
ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.selfis explicitly positional-only to allowselfas a field name.- static parser() tuple[collections.abc.Callable, dict]#
- class EvalDatasetCustomConfig(/, **data: Any)#
Bases:
EvalDatasetBaseConfigConfiguration for custom dataset type that allows users to specify a custom Python function to transform their dataset into EvalInput format.
Create a new model by parsing and validating input data from keyword arguments.
Raises [
ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.selfis explicitly positional-only to allowselfas a field name.- parser() tuple[collections.abc.Callable, dict]#
Load and return the custom function for dataset transformation.
- Returns:
Tuple of (custom_function, kwargs) where custom_function transforms a dataset file into an EvalInput object.
- _load_custom_function() collections.abc.Callable#
Import and return the custom function using standard Python import path.
- EvalDatasetConfig#