From e76e3a58a56633c43e2e64e7729896308b52fd27 Mon Sep 17 00:00:00 2001 From: ljcornel Date: Tue, 27 Aug 2024 09:32:40 +0200 Subject: [PATCH 1/2] Remove mention of Anaconda from README --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 51638891..ca8e6875 100644 --- a/README.md +++ b/README.md @@ -42,7 +42,7 @@ feeling for use cases for the package. ## Installation Using an environment manager such as -[Anaconda](https://www.anaconda.com/products/individual) or +[miniforge](https://github.com/conda-forge/miniforge) or [venv](https://docs.python.org/3/library/venv.html) to create a new Python environment before installing the Intel® Geti™ SDK and its requirements is highly recommended. From fb2f2ff209e3f3232372d47be52bc8bacc5df917 Mon Sep 17 00:00:00 2001 From: Igor-Davidyuk Date: Tue, 27 Aug 2024 13:25:54 +0200 Subject: [PATCH 2/2] fix annotation reader Signed-off-by: Igor-Davidyuk --- .../annotation_clients/base_annotation_client.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/geti_sdk/rest_clients/annotation_clients/base_annotation_client.py b/geti_sdk/rest_clients/annotation_clients/base_annotation_client.py index 5c7c0111..9f42b9b6 100644 --- a/geti_sdk/rest_clients/annotation_clients/base_annotation_client.py +++ b/geti_sdk/rest_clients/annotation_clients/base_annotation_client.py @@ -158,9 +158,13 @@ def __get_label_mapping(self, project: Project) -> Dict[str, str]: label_name = label.name project_label_name_to_label[label_name] = label - source_label_names = self.annotation_reader.get_all_label_names() + source_label_names = set(self.annotation_reader.get_all_label_names()) source_label_name_to_project_label_id: Dict[str, str] = {} - for source_label_name in source_label_names: + # We include the project label names in the mapping, as we want to ensure that + # we can match the labels from the source to the project labels. + for source_label_name in source_label_names.union( + project_label_name_to_label.keys() + ): if source_label_name in project_label_name_to_label: label_id = project_label_name_to_label[source_label_name].id elif (