lenskit.data.schema#
Pydantic models for LensKit data schemas. These models define define the data schema in memory and also define how schemas are serialized to and from configuration files. See Data Model for details.
Note
The schema does not specify data types directly — data types are inferred from the underlying Arrow data structures. This reduces duplication of type information and the opportunity for inconsistency.
Attributes#
Classes#
Stores both whether a feature is allowed and is used in the case of having repeats. |
|
Possible layouts for entity attributes. |
|
Description of the entities and layout of a dataset. |
|
Entity class definitions in the dataset schema. |
|
Relationship class definitions in the dataset schema. |
|
Functions#
|
|
|
|
|
Check if a name is valid. |
Module Contents#
- lenskit.data.schema.CURRENT_VERSION = '2025.3'#
- lenskit.data.schema.OLDEST_VERSION = '2025.1'#
- lenskit.data.schema.LOAD_CONTEXT#
- lenskit.data.schema.NAME_PATTERN#
- type lenskit.data.schema.Name = Annotated[str, StringConstraints(pattern=NAME_PATTERN)]#
- lenskit.data.schema.check_name(name)#
Check if a name is valid.
- Raises:
ValueError – when the name is invalid.
- Parameters:
name (str)
- Return type:
None