From fbc503b80c7e04cddf817ae2ab5f812aa4343aef Mon Sep 17 00:00:00 2001 From: Gabriel Tseng Date: Wed, 8 Nov 2023 16:13:24 -0500 Subject: [PATCH] Undo changes to the Task too --- cropharvest/datasets.py | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/cropharvest/datasets.py b/cropharvest/datasets.py index b3ad6dd..ca34dea 100644 --- a/cropharvest/datasets.py +++ b/cropharvest/datasets.py @@ -31,7 +31,7 @@ @dataclass class Task: - bounding_box: Optional[Union[BBox, List[BBox]]] = None + bounding_box: Optional[BBox] = None target_label: Optional[str] = None balance_negative_crops: bool = False test_identifier: Optional[str] = None @@ -47,12 +47,9 @@ def __post_init__(self): ) if self.bounding_box is None: - self.bounding_box = [ - BBox(min_lat=-90, max_lat=90, min_lon=-180, max_lon=180, name="global") - ] - else: - if isinstance(self.bounding_box, BBox): - self.bounding_box = [self.bounding_box] + self.bounding_box = BBox( + min_lat=-90, max_lat=90, min_lon=-180, max_lon=180, name="global" + ) @property def id(self) -> str: