Skip to content

Commit

Permalink
remove of datamoduleconfig
Browse files Browse the repository at this point in the history
  • Loading branch information
wonjuleee committed Jun 28, 2024
1 parent 75e3d0f commit 3e9be78
Showing 1 changed file with 1 addition and 31 deletions.
32 changes: 1 addition & 31 deletions src/otx/core/config/data.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,8 @@

from copy import deepcopy
from dataclasses import dataclass, field
from typing import Any, Optional
from typing import Any

from otx.core.types.device import DeviceType
from otx.core.types.image import ImageColorChannel
from otx.core.types.transformer_libs import TransformLibType


Expand Down Expand Up @@ -109,34 +107,6 @@ class UnlabeledDataConfig(SubsetConfig):
to_tv_image: bool = True


@dataclass
class DataModuleConfig:
"""DTO for data module configuration."""

data_format: str
data_root: str

train_subset: SubsetConfig
val_subset: SubsetConfig
test_subset: SubsetConfig
unlabeled_subset: UnlabeledDataConfig = field(default_factory=lambda: UnlabeledDataConfig())

tile_config: TileConfig = field(default_factory=lambda: TileConfig())
vpm_config: VisualPromptingConfig = field(default_factory=lambda: VisualPromptingConfig())

mem_cache_size: str = "1GB"
mem_cache_img_max_size: Optional[tuple[int, int]] = None
image_color_channel: ImageColorChannel = ImageColorChannel.RGB
stack_images: bool = True

include_polygons: bool = False
ignore_index: int = 255
unannotated_items_ratio: float = 0.0

auto_num_workers: bool = False
device: DeviceType = DeviceType.auto


@dataclass
class SamplerConfig:
"""Configuration class for defining the sampler used in the data loading process.
Expand Down

0 comments on commit 3e9be78

Please sign in to comment.