cursus.validation.alignment.config¶
Validation Alignment Configuration Module
This module provides centralized configuration for the validation alignment system, controlling which validation levels are applied to different SageMaker step types.
- 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 UniversalMethodCategory(*values)[source]¶
Bases:
EnumCategories of universal methods that all builders must implement.
- REQUIRED_ABSTRACT = 'required_abstract'¶
- REQUIRED_OVERRIDE = 'required_override'¶
- INHERITED_OPTIONAL = 'inherited_optional'¶
- INHERITED_FINAL = 'inherited_final'¶
- 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.
- get_enabled_validation_levels_for_step_name(step_name, workspace_id=None)[source]¶
Get all enabled validation levels for a step name using registry integration.
- is_step_name_excluded(step_name, workspace_id=None)[source]¶
Check if a step name is excluded from validation using registry integration.
- validate_universal_compliance(builder_class)[source]¶
Validate that a builder class complies with universal rules.
- get_validation_rules_for_step_type(step_type)[source]¶
Get validation rules for a specific step type.
- get_required_methods_for_step_type(step_type)[source]¶
Get required methods for a specific step type.
- get_optional_methods_for_step_type(step_type)[source]¶
Get optional methods for a specific step type.
- get_all_methods_for_step_type(step_type)[source]¶
Get all methods (required + optional) for a specific step type.
- get_step_types_by_category_specific(category)¶
Get all step types in a specific category.
- Parameters:
category (StepTypeCategory) – The step type category
- Returns:
List of step type names in the category
- Return type:
- is_step_type_excluded_specific(step_type)¶
Check if a step type is excluded from validation.
- get_step_type_category_specific(step_type)¶
Get the category for a step type.
- Parameters:
step_type (str) – The SageMaker step type
- Returns:
StepTypeCategory enum value, or None if step type not found
- Return type:
StepTypeCategory | None
- validate_step_type_compliance(builder_class, step_type)[source]¶
Validate that a builder class complies with step-type-specific rules.
- get_validation_summary()[source]¶
Get a summary of all step types and their validation requirements.
Modules
Step-Type-Specific Builder Validation Rules |
|
Universal Builder Validation Rules |
|
Unified Alignment Tester - Validation Ruleset Configuration |