Description
PR #156 generalised the framework beyond jets, but one jet-flavour term was intentionally left as-is (see this comment): the flavour_label field written to the output h5 files, and the corresponding class_var: flavour_label convention in the reweighting config. It was kept because it is a data-format contract read by downstream training (e.g. salt), and #156 was already large.
To finish the generalisation, flavour_label should get an object-agnostic name (e.g. class_label), aligning with the class_config / class_category / classes / class_var / class_target naming introduced in #156.
Affected places:
upp/stages/merging.py / upp/stages/rw_merge.py — write the field and the label-name attribute
upp/stages/split_containers.py — hardcodes the field when splitting containers
upp/stages/normalisation.py / upp/stages/plot.py — read the field back
upp/stages/reweight.py — special-cases class_var == "flavour_label"
- Docs and example configs
Since this changes the output data format, downstream consumers need a coordinated update (or a transition period writing both names / a config option for the field name), analogous to the deprecation handling for the config keys in #156.
Description
PR #156 generalised the framework beyond jets, but one jet-flavour term was intentionally left as-is (see this comment): the
flavour_labelfield written to the output h5 files, and the correspondingclass_var: flavour_labelconvention in the reweighting config. It was kept because it is a data-format contract read by downstream training (e.g. salt), and #156 was already large.To finish the generalisation,
flavour_labelshould get an object-agnostic name (e.g.class_label), aligning with theclass_config/class_category/classes/class_var/class_targetnaming introduced in #156.Affected places:
upp/stages/merging.py/upp/stages/rw_merge.py— write the field and the label-name attributeupp/stages/split_containers.py— hardcodes the field when splitting containersupp/stages/normalisation.py/upp/stages/plot.py— read the field backupp/stages/reweight.py— special-casesclass_var == "flavour_label"Since this changes the output data format, downstream consumers need a coordinated update (or a transition period writing both names / a config option for the field name), analogous to the deprecation handling for the config keys in #156.