cursus.steps.configs.config_label_ruleset_execution_step

Label Ruleset Execution Step Configuration

This module implements the configuration class for the Label Ruleset Execution step using the three-tier design pattern for optimal user experience and maintainability.

class LabelRulesetExecutionConfig(*, author, bucket, role, region, service_name, pipeline_version, model_class='xgboost', current_date=<factory>, framework_version='2.1.0', py_version='py310', 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='label_ruleset_execution.py', processing_script_arguments=None, processing_framework_version='1.2-1', job_type, fail_on_missing_fields=True, enable_rule_match_tracking=True, enable_progress_logging=True, preferred_input_format='', **extra_data)[source]

Bases: ProcessingStepConfigBase

Configuration for Label Ruleset Execution step using three-tier design.

This step applies validated rulesets to processed data to generate classification labels using priority-based rule evaluation with execution-time field validation. Supports stacked preprocessing patterns by using processed_data for both input and output.

Tier 1: Essential user inputs (required) Tier 2: System inputs with defaults (optional) Tier 3: Derived fields (private with property access)

job_type: str
fail_on_missing_fields: bool
enable_rule_match_tracking: bool
enable_progress_logging: bool
preferred_input_format: str
processing_entry_point: str
property execution_environment_variables: Dict[str, str]

Get environment variables for the label ruleset execution step.

property processing_metadata: Dict[str, Any]

Get processing step metadata.

property execution_configuration: Dict[str, Any]

Get execution configuration details.

classmethod validate_job_type(v)[source]

Validate job_type is one of the allowed values.

classmethod validate_preferred_input_format(v)[source]

Validate preferred_input_format is one of the allowed values.

Matching is case-insensitive and the stored value is normalized to the canonical-cased allowed value. The consuming script lowercases PREFERRED_INPUT_FORMAT on read, so canonical case is not load-bearing.

model_dump(**kwargs)[source]

Override model_dump to include derived properties.

initialize_derived_fields()[source]

Initialize all derived fields once after validation.

validate_production_readiness()[source]

Validate configuration for production readiness.

get_script_path(default_path=None)[source]

Get script path for the label ruleset execution step.

Parameters:

default_path (str | None) – Default script path to use if not found via other methods

Returns:

Script path resolved from processing_entry_point and source directories

Return type:

str | None

get_public_init_fields()[source]

Override get_public_init_fields to include execution-specific fields. Gets a dictionary of public fields suitable for initializing a child config.

Returns:

Dictionary of field names to values for child initialization

Return type:

Dict[str, Any]

get_environment_variables()[source]

Get all environment variables for the step builder.

Returns:

Complete environment variables dictionary

Return type:

Dict[str, str]

is_production_ready()[source]

Check if configuration is production-ready.

Returns:

True if configuration has production-ready settings

Return type:

bool

get_execution_info()[source]

Get detailed execution configuration information.

Returns:

Execution details and recommendations

Return type:

Dict[str, Any]

get_job_arguments()[source]

CLI args — config is the single source (FZ 31e1d3h).

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].

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.

processing_instance_count: int
processing_volume_size: int
processing_instance_type_large: str
processing_instance_type_small: str
use_large_processing_instance: bool
skip_volume_kms: bool | None
processing_source_dir: str | None
processing_script_arguments: List[str] | None
processing_framework_version: str
author: str
bucket: str
role: str
region: str
service_name: str
pipeline_version: str
model_class: str
current_date: str
framework_version: str
py_version: str
source_dir: str | None
enable_caching: bool
use_secure_pypi: bool
max_runtime_seconds: int
project_root_folder: str