Skip to content

Rename the flavour_label output field to an object-agnostic name #161

Description

@afroch

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.

Metadata

Metadata

Assignees

Labels

No backward compatibilityThis PR will introduce changes that are not backward compatibleenhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions