cursus.steps.configs.config_tsa_training_step¶
TSA Training Step Configuration with Self-Contained Derivation Logic
This module implements the configuration class for SageMaker TSA (Temporal Self-Attention) Training steps 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 TSATrainingConfig(*, 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, training_entry_point, training_instance_type='ml.p4d.24xlarge', training_instance_count=1, training_volume_size=50, ca_repository_arn='arn:aws:codeartifact:us-west-2:149122183214:repository/amazon/secure-pypi', output_kms_key=None, volume_kms_key=None, skip_hyperparameters_s3_uri=True, use_amp=True, enable_tf32=True, enable_fp8=False, gradient_accumulation_steps=1, max_grad_norm=1.0, checkpoint_freq=20, job_type=None, hyperparameters=None, **extra_data)[source]¶
Bases:
BasePipelineConfigConfiguration specific to the SageMaker TSA Training Step. This version is streamlined to work with specification-driven architecture. Input/output paths are now provided via step specifications and dependencies.
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)
- hyperparameters: ModelHyperparameters | None¶
- 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_public_init_fields()[source]¶
Override get_public_init_fields to include TSA training-specific fields. Gets a dictionary of public fields suitable for initializing a child config. Includes both base fields (from parent) and TSA training-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.