cursus.step_catalog.adapters.config_resolver

Config resolver adapters for backward compatibility.

This module provides adapters that maintain existing config resolver APIs during the migration from legacy discovery systems to the unified StepCatalog system.

exception ResolutionError(message, failed_nodes=None, suggestions=None)[source]

Bases: Exception

Fallback when the compiler exceptions module is unavailable.

class StepConfigResolverAdapter(workspace_root=None, confidence_threshold=0.7)[source]

Bases: object

Enhanced adapter maintaining backward compatibility with StepConfigResolver.

Replaces: src/cursus/core/compiler/config_resolver.py

This enhanced version includes essential legacy methods needed for production while leveraging the unified step catalog for superior discovery capabilities.

JOB_TYPE_KEYWORDS = {'calibration': ['calibration', 'calib'], 'evaluation': ['evaluation', 'eval', 'test'], 'inference': ['inference', 'infer', 'predict'], 'training': ['training', 'train']}
STEP_TYPE_PATTERNS = {'.*calibrat.*': ['ModelCalibration'], '.*currency.*': ['CurrencyConversion'], '.*data_load.*': ['CradleDataLoading'], '.*eval.*': ['XGBoostModelEval'], '.*hyperparam.*': ['HyperparameterPrep'], '.*model.*': ['XGBoostModel', 'PyTorchModel'], '.*packag.*': ['MIMSPackaging'], '.*payload.*': ['MIMSPayload'], '.*preprocess.*': ['TabularPreprocessing'], '.*regist.*': ['ModelRegistration'], '.*risk.*': ['RiskTableMapping'], '.*train.*': ['XGBoostTraining', 'PyTorchTraining', 'DummyTraining'], '.*transform.*': ['BatchTransform']}
resolve_config_map(dag_nodes, available_configs, metadata=None)[source]

Resolve every DAG node to a config, or RAISE listing every node that cannot be resolved.

This is the compile-path entry point. It delegates each node to _resolve_single_node() — the same safe matcher resolve_config_for_step / preview_resolution use — which raises ResolutionError on a no-match and warns below the confidence threshold. Previously this method had its own weaker 3-tier loop whose tier-3 “first available config” silently bound any unmatched node to next(iter(available_configs.values())) — compiling a structurally WRONG pipeline from an incomplete config (deep dive 2026-07-03). The fix unifies the two entry points on _resolve_single_node and turns “can’t resolve” into a loud failure that names EVERY unsatisfiable node, never a plausible-but-wrong binding.

resolve_config_for_step(step_name, configs)[source]

Resolve configuration for a single step (used by generator.py).

Parameters:
  • step_name (str) – Name of the step

  • configs (Dict[str, Any]) – Available configurations

Returns:

Resolved configuration or None

Return type:

Any | None

preview_resolution(dag_nodes, available_configs, metadata=None)[source]

Enhanced preview resolution with metadata support.