From 7d247d81ed9703bd9677109a002520bc8973f739 Mon Sep 17 00:00:00 2001 From: shekhar-rudder Date: Tue, 12 Nov 2024 13:35:46 +0530 Subject: [PATCH] fix: default id stitchers not showing up in audit model --- .../profiles_mlcorelib/py_native/id_stitcher/audit.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/predictions/profiles_mlcorelib/py_native/id_stitcher/audit.py b/src/predictions/profiles_mlcorelib/py_native/id_stitcher/audit.py index 03c91ade..46728df8 100644 --- a/src/predictions/profiles_mlcorelib/py_native/id_stitcher/audit.py +++ b/src/predictions/profiles_mlcorelib/py_native/id_stitcher/audit.py @@ -57,11 +57,15 @@ def _set_id_stitcher_model(self, this: WhtMaterial): if self.id_stitcher_model is not None: return id_stitcher_models = {} - models = this.base_wht_project.models(model_types=["id_stitcher"]) - if len(models) == 0: - raise ValueError("No id_stitcher model found in the project") + # FIXME: Remove "identity" from the list once the ListModels bug is fixed in wht code + models = this.base_wht_project.models(model_types=["identity", "id_stitcher"]) for model in models: + # FIXME: Remove "id_collator" check once "identity" model type filter is removed + if model.model_type() == "id_collator": + continue id_stitcher_models[model.name()] = model + if len(id_stitcher_models) == 0: + raise ValueError("No id_stitcher model found in the project") if len(id_stitcher_models) > 1: max_retries = 5 retry_count = 0