Repository navigation
Run the card stages over several eras: one workflow whose branches are the cards - #32
Merged
Merged
Conversation
Author
|
@cms-flaf-bot please test |
|
pipeline#16087295 started |
Author
|
@cms-flaf-bot please test
|
|
GitHub Actions integration workflow dispatched for HH_bbWW, HH_bbtautau, H_mumu |
|
❌ GitHub Actions integration pipeline failed. |
Author
|
@cms-flaf-bot please test
|
|
GitHub Actions integration workflow dispatched for HH_bbWW, HH_bbtautau, H_mumu |
This was referenced Oct 19, 2026
Open
|
✅ GitHub Actions integration pipeline passed. |
This was referenced Oct 19, 2026
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Multi-era change set C: every StatInference task takes several eras (
--era A,B,...).CreateDatacardsTaskandPreprocessShapesTaskbecome one workflow each, with one branch per card of the datacard configuration (eras:, in its order; a group era ofera_groups:is one card). Each branch reads the real eras its card needs.--eramust hold every real era behind the cards; more eras are allowed and are not carded.Outputs (
Datacards/<card>,Hists_preprocessed/<card>) are unchanged. The job state and the logs no longer depend on--era, so a later run over more eras resumes the same jobs.This follows FLAF's multi-era change set B (cms-flaf/FLAF#358): a workflow with
allow_multi_eraand without era branches. That shape is guarded on the FLAF side by cms-flaf/FLAF#359.Changes
StatInferenceTask(allow_multi_era = True):store_parts()andremote_log_dir_target()are keyed on the version and the class.statinference_settings()reads theStatInferenceblock throughcommon(); it must agree between the eras.eras:raises.get_sub_eras(card)andcard_eras()refuse an--erathat lacks an era behind any card, naming the cards and the missing eras.merged_hist_reqs()requiresMergedHists(hist_era=…).check_card_eras:ResonantLimitsTask,ResonantLimitsAndHistPlotTask,PlotResonantLimitsTaskandPlotPullsAndImpactsTaskcheck at construction, solaw runstops before scheduling.MergedHists: ahist_eraparameter, read from that era's ownfs_HistTuple.CreateDatacardsTaskandPreprocessShapesTask:dict(enumerate(card_eras()));meta_erais gone.stage_workflow_requires().--branchesselection reaches the inputs and the preprocessing.--eras,--era,${ERA}); the plots get the card's first sub-era as the era.plot_variablerequires thevar_listto agree over the eras summed in one plot.ResonantLimitsTaskrequires the one card workflow and stages each card from its branch (era_card_outputs()); its store stayscombined.ResonantLimitsAndHistPlotTaskrequires oneHistPlotTaskover--era. It keeps its marker; the docstring says that a finished version is not re-checked (--remove-output 0,a,y).repo-sanity-checks.yaml: FLAF's rename checker is pinned at 4d9602c (B's era-scope rules). The 12 sites it flagged here are gone.test/test_card_eras.py(17 tests), the fixture's extra era, andunit-tests.yaml.test_law_chain.pychanges only its helpers (root_params,card_workflows,cards_of,preprocess_of), as Test what the datacard chain reads, writes and runs per card #30 intended..github/copilot-instructions.md(Eras section, Tests row).What changes for users
--eramust name every real era behind the cards, e.g.--era Run3_2022,Run3_2022EE,Run3_2023,Run3_2023BPixfor HH_bbWW'sRun3_Early. With fewer,law runstops naming the missing eras:--meta-erais gone.--branches kand--branch kselect card k.--version; do not reordereras:while its jobs exist.data/<v>/<Class>/(job files),<fs_default>/<v>/logs/<Class>/andResonantLimitsAndHistPlotTask's marker lose their era directory. An old version reruns that marker task once.Not implemented: the line naming the extra (uncarded) eras of a run (design §3.11). The docs say that extra eras are allowed and not carded.
Testing
unit-tests.yamllist): 38 passed. The environment was Python 3.13 with only pyyaml, numpy, luigi 3.8.1, law 0.1.21 and pytest, FLAF 4d9602c side by side,env -i.law/, each caught. Among them: no superset check, or one at construction for every task; job state or logs keyed on--era; theStatInferenceblock or the merged-histogram store taken from the first era; the preprocess map reordered; a card reading another card's preprocessing; workflows without their inputs; the selection not handed on; the var_list compared only up to the first gap; the limits requiring or staging one card; the HistPlot over one era.ResonantLimitsAndHistPlotTaskwhen the limits existed; a wrong claim about the checker), both fixed;REVIEWER OKfor StatInference e1ae483.StatInferenceTask.check_card_eras).TESTER VERDICT: PASS (V1 re-run, StatInference c855232 vs 31b4c6a; HH_bbWW f0efc2c, FLAF 4d9602c).Hists_mergedof pipeline 16086078, all 7 eras.ResonantLimitsTask,--workflow local. Baseline main--era Run3_2022; candidate over the 4 eras, and over all 7 (round 1).CI_card_SL.yaml: IDENTICAL. Datacards txt=41, root=8 (2656 histograms, exact bin values and errors), limits npz=5 (combined 4.9375, per era 29.0 / 5.125 / 771.0 / 51.375), and identical to the CI's own pre-C outputs.eras: [Run3_2022, Run3_Early],Run3_Early= 4 eras, with the preprocess step): IDENTICAL. txt=25, root=9 (14870 histograms), npz=3, bothbinning.jsonbyte-equal; pathsDatacards/Run3_Early,Hists_preprocessed/Run3_Early.law.cfg(keep_alive: True):ResonantLimitsTask --era Run3_2022: RC 60 after 4 s, the message names the missing eras, no worker.ResonantLimitsAndHistPlotTaskwith the limits present: RC 60, nothing written.CreateDatacardsTasklocal: RC 50. Htcondor: RC 60, nothing submitted.fs_default(test_htcondor EOS area), group card (b), inputs staged on EOS:data/<v>/<Class>/htcondor_jobs_0To2.json. Every job had--erawith all 4 eras. Logs at<fs_default>/<v>/logs/<Class>/, and the outputs matched V1.--branches 1preprocessed every card. Fixed.TESTER VERDICT: PASS (V2 re-check, StatInference c855232).--branches 1submitted exactly one preprocess and one datacard job, for card 1 only, and wrote nothing for the other card. The full run is identical to round 1's.run_ci_test.shdoes not reach StatInference, so the runs above stand in for it.allow_multi_era = Truehere, the multi-era job passes all CI eras (law_era_value).CI_card_SL.yamlcards 4 of them; the other three are plotted.Docs and merge order
.github/copilot-instructions.md.BranchSelectionErrorfor card workflows).docs/stat_inference.md(--eraexamples and warning).