cursus.validation.alignment.config.validation_ruleset¶
Unified Alignment Tester - Validation Ruleset Configuration
This module defines validation rules for different SageMaker step types, controlling which validation levels are applied and how they behave.
- class ValidationLevel(*values)[source]¶
Bases:
EnumThe 3 validation BOUNDARIES — what construction can’t self-check (FZ 31e1d3h / Phase D5).
The unified
.step.yamlmade Contract<->Spec alignment a construction-time Pydantic invariant (StepInterface._sync_and_align), so the former Level-2 (CONTRACT_SPEC=2) validated a tautology and has been removed. The three surviving levels are renamed in SEMANTICS to the 3 boundaries — SCRIPT_CONTRACT is the Script<->Interface fidelity boundary (B1), SPEC_DEPENDENCY is the cross-step DAG-resolvability boundary (B2, which now also owns the SageMaker property-path check folded in from the old L2), and BUILDER_CONFIG is the registry<->handler<->config binding boundary (B3). The member NAMES + integer VALUES are kept (1/3/4, non-contiguous) soValidationLevel(1/3/4)coercion and every existing reference keep working; onlyCONTRACT_SPEC(value 2) is gone.- SCRIPT_CONTRACT = 1¶
- SPEC_DEPENDENCY = 3¶
- BUILDER_CONFIG = 4¶
- class StepTypeCategory(*values)[source]¶
Bases:
EnumCategories of step types based on validation requirements.
- SCRIPT_BASED = 'script_based'¶
- CONTRACT_BASED = 'contract_based'¶
- NON_SCRIPT = 'non_script'¶
- CONFIG_ONLY = 'config_only'¶
- EXCLUDED = 'excluded'¶
- class ValidationRuleset(step_type, category, enabled_levels, level_4_validator_class=None, skip_reason=None, examples=None)[source]¶
Bases:
objectValidation ruleset for a specific step type.
- category: StepTypeCategory¶
- enabled_levels: Set[ValidationLevel]¶
- get_validation_ruleset(sagemaker_step_type)[source]¶
Get validation ruleset for a SageMaker step type.
- is_validation_level_enabled(sagemaker_step_type, level)[source]¶
Check if a validation level is enabled for a step type.
- get_enabled_validation_levels(sagemaker_step_type)[source]¶
Get all enabled validation levels for a step type.
- get_level_4_validator_class(sagemaker_step_type)[source]¶
Get the Level 4 validator class for a step type.
- is_step_type_excluded(sagemaker_step_type)[source]¶
Check if a step type is excluded from validation.
- get_validation_ruleset_for_step_name(step_name, workspace_id=None)[source]¶
Get validation ruleset for a step name using registry integration.
- is_validation_level_enabled_for_step_name(step_name, level, workspace_id=None)[source]¶
Check if a validation level is enabled for a step name using registry integration.