Skip to content

Commit 54833cc

Browse files
author
Yi, Jihyeon
committed
add future warning to change output type
1 parent 34f75ad commit 54833cc

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/datumaro/components/operations.py

+6
Original file line numberDiff line numberDiff line change
@@ -226,6 +226,12 @@ def _extractor_stats(subset_name):
226226

227227

228228
def compute_ann_statistics(dataset: IDataset):
229+
warnings.warn(
230+
"We are planning to change the type of stats['annotations']['labels']['distribution'] "
231+
"and stats['annotations']['segments']['pixel distribution'] from `list` to `(named) tuple`. "
232+
"If you are checking the types in your code, please revisit it after upgrading datumaro>=2.0.0.",
233+
FutureWarning,
234+
)
229235
labels: LabelCategories = dataset.categories().get(AnnotationType.label, LabelCategories())
230236

231237
def get_label(ann):

0 commit comments

Comments
 (0)