Operator and interface models¶
Profile models for spec documents.
Operator
¶
Bases: StrictModel
A computation with declared feature inputs, outputs, and optional merge.
interface
class-attribute
instance-attribute
¶
bindings
property
¶
Return compute and optional merge bindings in declaration order.
execution_form
property
¶
Return whether this operator has a compute binding alone or with merge.
binding_roles
property
¶
Return the execution roles declared by this operator.
input_features
property
¶
Return identifiers of declared feature dependencies.
output_features
property
¶
Return identifiers of declared logical feature outputs.
arguments
property
¶
Return this operator's bound argument objects.
profile_references
cached
property
¶
Return normalized profile IDs in reference order, retaining duplicates.
feature_selectors
cached
property
¶
Return normalized compute feature IDs in reference order, retaining duplicates.
dimension_reference_paths
property
¶
Return normalized dimension IDs and relative compute argument paths.
dimensions_references
cached
property
¶
Return normalized binding dimension IDs in order, retaining duplicates.
resolve_args
¶
resolve_args(function_id: str, profile_id: str, identifiers_by_profile: Mapping[str, Sequence[str]], resources: BindingResources, *, role: Value = OperatorBindingRole.COMPUTE, feature_id: str | None = None) -> dict[str, object]
Resolve arguments from the binding selected by its execution role.
execution_contract
¶
execution_contract(*, returns: str, target_profile: ProfileKey, dataframe_sources: Sequence[ProfileKey], grain_relationships: Mapping[ProfileKey, Value]) -> OperatorExecutionContract
Derive validation policies from this declaration and its dataframe sources.
source_details
¶
source_details(spec: Spec, key: OperatorKey) -> tuple[tuple[ProfileKey, ...], OperatorSourceStatus.Value]
Resolve this operator's feature and dataframe sources without hiding ambiguity.
grain_relationships
¶
grain_relationships(spec: Spec, key: OperatorKey) -> dict[ProfileKey | None, GrainRelationship.Value]
Return this operator's source-to-target grain relationships.
profile_resolutions
¶
profile_resolutions(spec: Spec, profile_key: ProfileKey) -> tuple[dimension_module.Resolution, ...] | None
Resolve the selected dimension models for a source or target profile.
produces_target_features
¶
Return whether this operator computes dataframe outputs from its target dataset.