From 469743a4fc7ec0f77be3989f2b7386cca865fd75 Mon Sep 17 00:00:00 2001 From: jaegukhyun Date: Wed, 29 May 2024 13:14:46 +0900 Subject: [PATCH] Modify unit tests --- src/otx/recipe/_base_/data/mmaction_base.yaml | 2 +- tests/unit/core/data/test_factory.py | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/otx/recipe/_base_/data/mmaction_base.yaml b/src/otx/recipe/_base_/data/mmaction_base.yaml index dc1297bf9c9..480a9e11e49 100644 --- a/src/otx/recipe/_base_/data/mmaction_base.yaml +++ b/src/otx/recipe/_base_/data/mmaction_base.yaml @@ -78,7 +78,7 @@ config: transform_lib_type: MMACTION to_tv_image: False batch_size: 8 - num_workers: 2 + num_workers: 0 transforms: - type: LoadVideoForClassification - type: DecordInit diff --git a/tests/unit/core/data/test_factory.py b/tests/unit/core/data/test_factory.py index 2f80d957464..be0ca43e5c5 100644 --- a/tests/unit/core/data/test_factory.py +++ b/tests/unit/core/data/test_factory.py @@ -25,6 +25,7 @@ from otx.core.data.transform_libs.mmpretrain import MMPretrainTransformLib from otx.core.data.transform_libs.mmseg import MMSegTransformLib from otx.core.data.transform_libs.torchvision import TorchVisionTransformLib +from otx.core.types.image import ImageColorChannel from otx.core.types.task import OTXTaskType from otx.core.types.transformer_libs import TransformLibType @@ -86,6 +87,7 @@ def test_create( cfg_data_module.vpm_config = mocker.MagicMock(spec=VisualPromptingConfig) cfg_data_module.vpm_config.use_bbox = False cfg_data_module.vpm_config.use_point = False + cfg_data_module.image_color_channel = ImageColorChannel.BGR mocker.patch.object(HLabelInfo, "from_dm_label_groups", return_value=fxt_mock_hlabelinfo) assert isinstance( OTXDatasetFactory.create(