cursus.steps.configs.config_processing_step_base¶
Processing Step Base Configuration with Self-Contained Derivation Logic
This module implements the base configuration class for SageMaker Processing steps using a self-contained design where derived fields are private with read-only properties.
- class ProcessingStepConfigBase(*, 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=None, processing_script_arguments=None, processing_framework_version='1.2-1', **extra_data)[source]¶
Bases:
BasePipelineConfigBase configuration for SageMaker Processing Steps with self-contained derivation logic.
- 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].
- property effective_source_dir: str | None¶
Get effective source directory with hybrid resolution.
Resolution Priority: 1. Hybrid resolution of processing_source_dir 2. Hybrid resolution of source_dir 3. Legacy values (processing_source_dir, source_dir)
- property effective_instance_type: str¶
Get the appropriate instance type based on the use_large_processing_instance flag.
- property script_path: str | None¶
Get script path with hybrid resolution.
Uses modernized effective_source_dir which already includes hybrid resolution.
- property resolved_processing_source_dir: str | None¶
Get resolved processing source directory using hybrid resolution.
- get_resolved_script_path()[source]¶
Get resolved script path for step builders using hybrid resolution.
- classmethod validate_processing_source_dir(v)[source]¶
Validate processing source directory format (S3 paths only).
- classmethod validate_entry_point_is_relative(v)[source]¶
Validate entry point is a relative path if provided.
- validate_entry_point_paths()[source]¶
Validate entry point configuration requirements (without file existence checks).
- get_instance_type(size=None)[source]¶
Get the appropriate instance type based on size parameter or configuration.
- get_script_path(default_path=None)[source]¶
Get script path with hybrid resolution and comprehensive fallbacks.
Resolution Priority: 1. Modernized script_path property (includes hybrid resolution) 2. Direct hybrid resolution of entry_point 3. Legacy get_resolved_script_path() method 4. Default path fallback
- get_public_init_fields()[source]¶
Override get_public_init_fields to include processing-specific fields. Gets a dictionary of public fields suitable for initializing a child config. Includes both base fields (from parent) and processing-specific fields.
- Returns:
Dictionary of field names to values for child initialization
- Return type:
Dict[str, Any]
- 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.