From 0b09eb69edc0f0d21ee6161b7ac7d35a017febf7 Mon Sep 17 00:00:00 2001 From: Safoine El khabich Date: Wed, 27 Nov 2024 14:37:28 +0100 Subject: [PATCH] Refactor exception handling in performance metrics computation to catch all exceptions --- .../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 a502d086..83f08978 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 @@ -65,7 +65,7 @@ def compute_performance_metrics_on_current_data( current_version_number = None try: current_version = Model(name=latest_version.name, version=ModelStages.STAGING) - except KeyError: + except Exception: pass if current_version_number is None: