From 692798eb36428a14951ce8ca9c0fab26cf386704 Mon Sep 17 00:00:00 2001 From: Safoine El khabich Date: Wed, 27 Nov 2024 11:50:31 +0100 Subject: [PATCH] Enhance error handling for current model version retrieval --- .../promotion/compute_performance_metrics_on_current_data.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/train_and_deploy/steps/promotion/compute_performance_metrics_on_current_data.py b/train_and_deploy/steps/promotion/compute_performance_metrics_on_current_data.py index 7b4ae723..561d3c27 100644 --- a/train_and_deploy/steps/promotion/compute_performance_metrics_on_current_data.py +++ b/train_and_deploy/steps/promotion/compute_performance_metrics_on_current_data.py @@ -66,7 +66,7 @@ def compute_performance_metrics_on_current_data( try: current_version = Model(name=latest_version.name, version=target_env) current_version_number = current_version.number - except KeyError: + except (RuntimeError, KeyError): current_version_number = None if current_version_number is None: