poprox_recommender.lkpipeline.config#
Pydantic models for pipeline configuration and serialization support.
Functions
|
Compute the hash of a configuration model. |
Classes
|
|
|
Root type for serialized pipeline configuration. |
|
|
|
Literal nodes represented in the pipeline. |
|
Pipeline metadata. |
- class poprox_recommender.lkpipeline.config.PipelineConfig(*, meta, inputs=None, defaults=None, components=None, aliases=None, literals=None)#
Bases:
BaseModel
Root type for serialized pipeline configuration. A pipeline config contains the full configuration, components, and wiring for the pipeline, but does not contain the
- Parameters:
meta (PipelineMeta)
inputs (list[PipelineInput])
components (OrderedDict[str, PipelineComponent])
literals (dict[str, PipelineLiteral])
- meta: PipelineMeta#
Pipeline metadata.
- inputs: list[PipelineInput]#
Pipeline inputs.
- components: OrderedDict[str, PipelineComponent]#
Pipeline components, with their configurations and wiring.
- literals: dict[str, PipelineLiteral]#
Literals
- model_computed_fields: ClassVar[dict[str, ComputedFieldInfo]] = {}#
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[dict[str, FieldInfo]] = {'aliases': FieldInfo(annotation=dict[str, str], required=False, default_factory=dict), 'components': FieldInfo(annotation=OrderedDict[str, PipelineComponent], required=False, default_factory=OrderedDict), 'defaults': FieldInfo(annotation=dict[str, str], required=False, default_factory=dict), 'inputs': FieldInfo(annotation=list[PipelineInput], required=False, default_factory=list), 'literals': FieldInfo(annotation=dict[str, PipelineLiteral], required=False, default_factory=dict), 'meta': FieldInfo(annotation=PipelineMeta, required=True)}#
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].
This replaces Model.__fields__ from Pydantic V1.
- class poprox_recommender.lkpipeline.config.PipelineMeta(*, name=None, version=None, hash=None)#
Bases:
BaseModel
Pipeline metadata.
- hash: str | None#
The pipeline configuration hash. This is optional, particularly when hand-crafting pipeline configuration files.
- model_computed_fields: ClassVar[dict[str, ComputedFieldInfo]] = {}#
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[dict[str, FieldInfo]] = {'hash': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'name': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'version': FieldInfo(annotation=Union[str, NoneType], required=False, default=None)}#
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].
This replaces Model.__fields__ from Pydantic V1.
- class poprox_recommender.lkpipeline.config.PipelineInput(*, name, types)#
Bases:
BaseModel
- model_computed_fields: ClassVar[dict[str, ComputedFieldInfo]] = {}#
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[dict[str, FieldInfo]] = {'name': FieldInfo(annotation=str, required=True), 'types': FieldInfo(annotation=Union[set[str], NoneType], required=True)}#
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].
This replaces Model.__fields__ from Pydantic V1.
- class poprox_recommender.lkpipeline.config.PipelineComponent(*, code, config=None, inputs=None)#
Bases:
BaseModel
- model_computed_fields: ClassVar[dict[str, ComputedFieldInfo]] = {}#
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[dict[str, FieldInfo]] = {'code': FieldInfo(annotation=str, required=True), 'config': FieldInfo(annotation=Union[dict[str, object], NoneType], required=False, default=None), 'inputs': FieldInfo(annotation=Union[dict[str, str], list[str]], required=False, default_factory=dict)}#
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].
This replaces Model.__fields__ from Pydantic V1.
- code: str#
The path to the component’s implementation, either a class or a function. This is a Python qualified path of the form
module:name
.
- class poprox_recommender.lkpipeline.config.PipelineLiteral(*, encoding, value)#
Bases:
BaseModel
Literal nodes represented in the pipeline.
- Parameters:
encoding (Literal['json', 'base85'])
value (JsonValue)
- model_computed_fields: ClassVar[dict[str, ComputedFieldInfo]] = {}#
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[dict[str, FieldInfo]] = {'encoding': FieldInfo(annotation=Literal['json', 'base85'], required=True), 'value': FieldInfo(annotation=JsonValue, required=True)}#
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].
This replaces Model.__fields__ from Pydantic V1.