Skip to content

Rename period to era - #27

Merged
kandrosov merged 5 commits into
cms-flaf:mainfrom
kandrosov:era-rename
Oct 18, 2026
Merged

kandrosov merged 5 commits into
cms-flaf:mainfrom
kandrosov:era-rename

Conversation

@kandrosov

@kandrosov kandrosov commented Oct 18, 2026 •

Copy link
Copy Markdown

Summary

The StatInference part of the multi-era change set. With cms-flaf/FLAF#347, FLAF tasks take --era (a one-era tuple for now) and refuse period in every form, so the tasks here move to the new parameter:

  • the requirements on FLAF tasks pass era=(e,);
  • get_sub_periods becomes get_sub_eras;
  • Setup(…, self.era[0], …);
  • the HistPlotter call passes --era.

The meta-era logic (meta_era, the card eras) is unchanged. Converting the card stages to several eras per task is a later step.

Changes

  • law/StatInferenceTask.py, CreateDatacardsTask.py, PreprocessShapesTask.py, ResonantLimitsTask.py, ResonantLimitsAndHistPlotTask.py, MergedHists.py: the rename.
  • .github/copilot-instructions.md: the era facts.

The rename-check job (the other A PRs had it too) is not part of this PR. Its script reaches FLAF main only with cms-flaf/FLAF#347, and a follow-up PR adds the job then. Run locally at e1392d7: python3 FLAF/run_tools/check_era_rename.py --repo StatInference gives rc 0.

Merge after cms-flaf/FLAF#347 and before the analyses, which then point their StatInference gitlinks at the merged SHA. StatInference has no docs site; the change is described in .github/copilot-instructions.md.

Testing

  • This code first runs in the integration pipelines' HH_bbWW multi-era job (ResonantLimitsAndHistPlotTask, CI card config over Run3_2022–2023BPix) with every companion. The task turns HistPlotter and Setup errors into warnings, so that job's logs are searched for WARNING: shape plotting failed, Warning: no var_list and Traceback, and its datacards, limits and plots are checked to be present: on both backends (GitLab job 84465115 in https://gitlab.cern.ch/cms-flaf/flaf_integration/-/pipelines/16078964, GitHub Actions job 117581533118 in https://github.com/cms-flaf/FLAF/actions/runs/39089883382), the job ran ResonantLimitsAndHistPlotTask --version CI --era Run3_2022 --test 1000, and the card built datacards for Run3_2022, Run3_2022EE, Run3_2023 and Run3_2023BPix.
    • Result: 53 tasks scheduled, 40 ran successfully (5 CombineDatacards, 8 CreateDatacardsTask, 10 CreateWorkspace, 5 MergeResonantLimits, 10 ResonantLimits), no failed tasks.
    • The datacards and workspaces exist, and five expected-limit medians are printed.
    • None of the swallowed-warning signatures appears.
    • The shape-plot step writes no PDF (no shapes to plot for TwoStageDNN_M300_binary, 4 times), exactly as on main (GitHub Actions run 39033435835, before this change). That is pre-existing and not changed here.
  • black 26.10.0 passes on the changed files.
  • Gate: REVIEWER OK (flaf-reviewer, e1392d7). run_ci_test.sh does not run StatInference; the integration pipelines above stand in for the tester verdict.

@kandrosov

Copy link
Copy Markdown
Author

tested with cms-flaf/FLAF#347

@kandrosov
kandrosov merged commit 1efded7 into cms-flaf:main Oct 18, 2026
3 checks passed
@kandrosov
kandrosov deleted the era-rename branch October 18, 2026 04:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant