cursus.steps.configs.config_tabular_lookup_model_building_step¶
Configuration for the TabularLookupModelBuilding step.
TabularLookupModelBuilding is a non-parametric model-building step: it reads a
tabular dataset from an upstream data-loading step and turns the dataset itself
into the model — either a key -> [values] lookup map (model_kind="lookup")
or a de-duplicated key set (model_kind="set_membership") — then packages it
into model.tar.gz for downstream MIMS Package + Payload. There is no
training and there are no learned parameters (“the dataset IS the model”).
The per-project inference handler is bundled separately by the Package step
(via its inference_scripts_input channel); this step does NOT generate an
inference handler at runtime.
This configuration follows the Three-Tier Config Design pattern:
Tier 1 (Essential Fields): required user inputs (
model_kind,key_columns).Tier 2 (System Fields): fields with sensible defaults (
value_columns,dedup,shard_count,processing_entry_point).Tier 3 (Derived Fields): inherited from
ProcessingStepConfigBase(effective_source_dir,effective_instance_type,script_path).
- class TabularLookupModelBuildingConfig(*, author, bucket, role, region, service_name, pipeline_version, model_class='xgboost', current_date=<factory>, framework_version='2.1.0', py_version='py310', image_uri=None, subnets=None, security_group_ids=None, enable_network_isolation=None, source_dir=None, enable_caching=False, use_secure_pypi=False, max_runtime_seconds=172800, project_root_folder, processing_instance_count=1, processing_volume_size=500, processing_instance_type_large='ml.m5.4xlarge', processing_instance_type_small='ml.m5.2xlarge', use_large_processing_instance=False, skip_volume_kms=None, processing_source_dir=None, processing_entry_point='tabular_lookup_model_building.py', processing_script_arguments=None, processing_framework_version='1.2-1', model_kind, key_columns, value_columns=<factory>, dedup=True, shard_count=1, inference_fields=<factory>, **extra_data)[source]¶
Bases:
ProcessingStepConfigBaseConfiguration for the TabularLookupModelBuilding step (three-tier design).
Inherits region/author/bucket/role/pipeline + processing_* fields from
ProcessingStepConfigBase->BasePipelineConfig.- model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True, 'extra': 'allow', 'protected_namespaces': (), 'validate_assignment': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- get_environment_variables(declared_env_vars=None)[source]¶
Source the container environment for the model-building script.
The universal builder detects a config-owned
get_environment_variablesand calls it to build the container env, then merges interface defaults for any declared-optional var not produced here.declared_env_varsis accepted for signature compatibility with the base resolver and intentionally ignored.
- classmethod validate_model_kind(v)[source]¶
Ensure model_kind is one of the allowed values (case-insensitive).
- classmethod validate_entry_point_relative(v)[source]¶
Ensure processing_entry_point is a non-empty relative path.
- validate_config()[source]¶
Validate the INTERNAL-node configuration.
lookup mode needs value_columns to have something to collect;
entry point present + script contract loadable;
the contract must declare the required ‘model_output’ output path.
- get_public_init_fields()[source]¶
Include TabularLookupModelBuilding-specific fields for child initialization.
- model_post_init(context, /)¶
This function is meant to behave like a BaseModel method to initialize private attributes.
It takes context as an argument since that’s what pydantic-core passes when calling it.
- Parameters:
self (BaseModel) – The BaseModel instance.
context (Any) – The context.