From 52b846b15a3924e211762f03ab4b5c03ef0cb29e Mon Sep 17 00:00:00 2001 From: "Yi, Jihyeon" Date: Tue, 24 Oct 2023 16:12:01 +0900 Subject: [PATCH 1/2] load CocoPageMapper once per process --- src/datumaro/plugins/data_formats/coco/page_mapper.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/datumaro/plugins/data_formats/coco/page_mapper.py b/src/datumaro/plugins/data_formats/coco/page_mapper.py index e8910d74ad..11948b6ef8 100644 --- a/src/datumaro/plugins/data_formats/coco/page_mapper.py +++ b/src/datumaro/plugins/data_formats/coco/page_mapper.py @@ -5,7 +5,10 @@ import logging as log from typing import Any, Dict, Iterator, List, Optional, Tuple -from datumaro.rust_api import CocoPageMapper as CocoPageMapperImpl +try: + from datumaro.rust_api import CocoPageMapper as CocoPageMapperImpl +except ImportError: + pass __all__ = ["COCOPageMapper"] From 303aaef0e44ba185b33d04fdc505f967f1dd961e Mon Sep 17 00:00:00 2001 From: "Yi, Jihyeon" Date: Tue, 24 Oct 2023 16:21:57 +0900 Subject: [PATCH 2/2] update CHANGELOG --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index f2b7b81a08..334b7e7909 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 () ### Bug fixes +- Import CocoPageMapper only once per process + () - Modify the draw function in the visualizer not to raise an error for unsupported annotation types. () - Correct explore path in the related document.