From ffa02ac4d594ba6a78ca76d558d9cd18fda04aad Mon Sep 17 00:00:00 2001 From: Yunchu Lee Date: Mon, 24 Jun 2024 17:40:01 +0900 Subject: [PATCH 1/2] bump datumaro to 1.7.0 --- .ci/docker/README.md | 10 +++++----- pyproject.toml | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.ci/docker/README.md b/.ci/docker/README.md index 50bbf420dbe..55a672a82a7 100644 --- a/.ci/docker/README.md +++ b/.ci/docker/README.md @@ -5,7 +5,7 @@ ```bash training_extensions/.ci/docker$ ./build.sh --help - USAGE: .ci/docker/build.sh [Options] + USAGE: ./build.sh [Options] Positional args Tag name to be tagged to newly built image Options @@ -18,7 +18,7 @@ Below example builds an image using actions-runner v2.317.0 based on NVIDIA cuda image and tag it as `2.317.0`. ```bash - training_extensions$ .ci/build.sh 2.317.0 -u https://github.com/actions/runner/releases/download/v2.305.0/actions-runner-linux-x64-2.305.0.tar.gz + training_extensions/.ci/docker$ ./build.sh 2.317.0 -u https://github.com/actions/runner/releases/download/v2.305.0/actions-runner-linux-x64-2.305.0.tar.gz ``` > **_Note_**: While building an image, script will use your system's environment variables `http_proxy`, `https_proxy`, and `no_proxy`. If you need to use proxy to access external entity, please check those settings before using this script. @@ -55,7 +55,7 @@ Below example starts a runner named as `-0` with GPU ID 0 (GPU ID will be attached to both container and runner name) ```bash - training_extensions$ .ci/start-runner.sh -g 0 + training_extensions$ .ci/docker/start-runner.sh -g 0 ``` If there exist the container named as same, it will be stopped before starting a new container. @@ -86,14 +86,14 @@ Below example stops a runner named as `otx-ci-container` ```bash - training_extensions$ .ci/stop-runner.sh otx-ci-container + training_extensions$ .ci/docker/stop-runner.sh otx-ci-container ``` > **_Note_**: If there is an action in progress on the actions-runner which you want to stop, this script will be resulted with an error. To perform force stopping the runner, you can stop the docker container using `docker stop` command on the host machine. 1. Monitor the running runner ```bash - training_extensions$ .ci/check-runner.sh --help + training_extensions$ .ci/docker/check-runner.sh --help USAGE: .ci/check-runner.sh [Options] Options -r|--runner Check runner's log instead of Job one diff --git a/pyproject.toml b/pyproject.toml index 792e9e85d0b..dc9536db0e5 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -26,7 +26,7 @@ classifiers = [ "Programming Language :: Python :: 3.11", ] dependencies = [ - "datumaro==1.6.1", + "datumaro==1.7.0", "omegaconf==2.3.0", "rich==13.7.1", "jsonargparse==4.30.0", From 22e7950958b74360c7d5a131e49674f31c1505d8 Mon Sep 17 00:00:00 2001 From: Yunchu Lee Date: Thu, 27 Jun 2024 14:34:34 +0900 Subject: [PATCH 2/2] apply changes on datumaro 1.7.0 --- src/otx/core/data/dataset/segmentation.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/otx/core/data/dataset/segmentation.py b/src/otx/core/data/dataset/segmentation.py index 8d763cb2d5b..b9328509db7 100644 --- a/src/otx/core/data/dataset/segmentation.py +++ b/src/otx/core/data/dataset/segmentation.py @@ -192,10 +192,9 @@ def __init__( @property def has_polygons(self) -> bool: """Check if the dataset has polygons in annotations.""" - for subset in self.dm_subset.subsets().values(): - annot_types = set(subset.get_annotated_type()) - if annot_types & {"polygon", "ellipse"}: - return True + ann_types = {str(ann_type).split(".")[-1] for ann_type in self.dm_subset.ann_types()} + if ann_types & {"polygon", "ellipse"}: + return True return False def _get_item_impl(self, index: int) -> SegDataEntity | None: