diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b1bbc6c..8de7ca5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -57,5 +57,5 @@ jobs: with: stack-name: ${{ matrix.stack-name }} python-version: ${{ matrix.python-version }} - ref-zenml: ${{ inputs.ref-zenml || 'feature/PRD-566-dependency-cleanup' }} + ref-zenml: ${{ inputs.ref-zenml || 'bugfix/PRD-653-fix-models-linkage' }} ref-template: ${{ inputs.ref-template || github.ref }} diff --git a/template/steps/promotion/{% if metric_compare_promotion %}compute_performance_metrics_on_current_data.py{% endif %} b/template/steps/promotion/{% if metric_compare_promotion %}compute_performance_metrics_on_current_data.py{% endif %} index 4aa164d..146ea8c 100644 --- a/template/steps/promotion/{% if metric_compare_promotion %}compute_performance_metrics_on_current_data.py{% endif %} +++ b/template/steps/promotion/{% if metric_compare_promotion %}compute_performance_metrics_on_current_data.py{% endif %} @@ -46,7 +46,10 @@ def compute_performance_metrics_on_current_data( current_version = Model(name=latest_version.name, version=target_env) latest_version_number = latest_version.number - current_version_number = current_version.number + try: + current_version_number = current_version.number + except KeyError: + current_version_number = None if current_version_number is None: current_version_number = -1 diff --git a/template/steps/promotion/{% if metric_compare_promotion %}promote_with_metric_compare.py{% endif %} b/template/steps/promotion/{% if metric_compare_promotion %}promote_with_metric_compare.py{% endif %} index 89eb886..ffd8d5d 100644 --- a/template/steps/promotion/{% if metric_compare_promotion %}promote_with_metric_compare.py{% endif %} +++ b/template/steps/promotion/{% if metric_compare_promotion %}promote_with_metric_compare.py{% endif %} @@ -47,7 +47,10 @@ def promote_with_metric_compare( latest_version = get_step_context().model current_version = Model(name=latest_version.name, version=target_env) - current_version_number = current_version.number + try: + current_version_number = current_version.number + except KeyError: + current_version_number = None if current_version_number is None: logger.info("No current model version found - promoting latest")