From e162c76a13bdaedd9fdd9cc908231896c9857fb3 Mon Sep 17 00:00:00 2001 From: Mathieu Beligon <mathieu@feedly.com> Date: Tue, 31 Mar 2020 21:18:49 -0400 Subject: [PATCH] [common] (image pipeline evaluation) Fix NaN in dataset report --- .../image_pipeline_evaluation_reporter.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/research_common/image_pipeline_evaluation/image_pipeline_evaluation_reporter.py b/common/research_common/image_pipeline_evaluation/image_pipeline_evaluation_reporter.py index 0e7e0ec..c8e3e0d 100644 --- a/common/research_common/image_pipeline_evaluation/image_pipeline_evaluation_reporter.py +++ b/common/research_common/image_pipeline_evaluation/image_pipeline_evaluation_reporter.py @@ -63,7 +63,7 @@ class ImagePipelineEvaluationReporter: dataset.dataset_name: Counter(labels[start:end]) for dataset, start, end in zip(roco_datasets, np.cumsum([0] + dataset_sizes), np.cumsum(dataset_sizes)) } - ) + ).fillna(0) df["Total"] = sum([df[d.dataset_name] for d in roco_datasets]) df["Repartition"] = (df["Total"] / total).map("{:.1%}".format) mf.table(df) -- GitLab