From 3ffceb1a58a015d71d08d31f3e8c291453f43add Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Laurent?= <francois.laurent@posteo.net> Date: Fri, 22 Sep 2023 15:49:00 +0200 Subject: [PATCH] support for label regex --- src/LarvaDatasets.jl | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/LarvaDatasets.jl b/src/LarvaDatasets.jl index 528f877..c63d4a0 100644 --- a/src/LarvaDatasets.jl +++ b/src/LarvaDatasets.jl @@ -705,6 +705,9 @@ function new_write_larva_dataset_hdf5(output_dir, input_data; else # ensure labels are ordered as provided in input; # see https://gitlab.pasteur.fr/nyx/TaggingBackends/-/issues/24 + if labels isa AbstractDict + labels = collect(keys(labels)) + end h5["labels"] = labels h5["label_counts"] = [get(classcounts, Symbol(label), 0) for label in labels] end -- GitLab