cursus.steps.configs.config_pseudo_label_merge_step

Pseudo Label Merge Step Configuration

This module implements the configuration class for the Pseudo Label Merge step using a self-contained design where derived fields are private with read-only properties. Fields are organized into three tiers: 1. Tier 1: Essential User Inputs - fields that users must explicitly provide 2. Tier 2: System Inputs with Defaults - fields with reasonable defaults that can be overridden 3. Tier 3: Derived Fields - fields calculated from other fields (private with properties)

class PseudoLabelMergeConfig(*, 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='pseudo_label_merge.py', processing_script_arguments=None, processing_framework_version='1.2-1', label_field, id_field, pseudo_label_column, add_provenance=True, output_format='csv', use_auto_split_ratios=True, train_ratio=None, test_val_ratio=None, preserve_confidence=True, stratify=True, random_seed=42, job_type='training', **extra_data)[source]

Bases: ProcessingStepConfigBase

Configuration for Pseudo Label Merge step.

Intelligently merges labeled base data with pseudo-labeled or augmented samples for Semi-Supervised Learning (SSL) and Active Learning workflows.

Three-Tier Configuration: - Tier 1: Essential User Inputs (label_field) - Tier 2: System Fields with Defaults (merge parameters, split ratios, etc.) - Tier 3: Derived Fields (inherited from ProcessingStepConfigBase)

label_field: str
id_field: str
pseudo_label_column: str
add_provenance: bool
output_format: Literal['csv', 'tsv', 'parquet']
use_auto_split_ratios: bool
train_ratio: float | None
test_val_ratio: float | None
preserve_confidence: bool
stratify: bool
random_seed: int
processing_entry_point: str
processing_framework_version: str
job_type: str
use_large_processing_instance: bool
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].

classmethod validate_output_format(v)[source]

Validate output format (case-insensitive).

Matching is case-insensitive and the stored value is normalized to the canonical-cased allowed value.

classmethod validate_job_type(v)[source]

Validate job type is one of the allowed values.

classmethod validate_field_names(v)[source]

Validate field names are non-empty and don’t contain special characters.

validate_manual_ratios()[source]

Validate manual split ratios when auto-inference is disabled.

Ensures train_ratio and test_val_ratio are provided when needed.

initialize_derived_fields()[source]

Initialize all derived fields once after validation.

get_environment_variables()[source]

Get environment variables for the processing job.

Returns:

Dictionary of environment variables matching script contract

Return type:

Dict[str, str]

get_public_init_fields()[source]

Override get_public_init_fields to include merge-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_job_arguments()[source]

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

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.