Skip to content

Commit

Permalink
Undo changes to the Task too
Browse files Browse the repository at this point in the history
  • Loading branch information
gabrieltseng committed Nov 8, 2023
1 parent 2dce11c commit fbc503b
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions cropharvest/datasets.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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:
Expand Down

0 comments on commit fbc503b

Please sign in to comment.