Skip to content

Fix XGB/Eventdisplay-ML integration issues (issue #352 E-section)#149

Merged
GernotMaier merged 3 commits into
mainfrom
v492-dev19-xgb-fixes
May 31, 2026
Merged

Fix XGB/Eventdisplay-ML integration issues (issue #352 E-section)#149
GernotMaier merged 3 commits into
mainfrom
v492-dev19-xgb-fixes

Conversation

@GernotMaier
Copy link
Copy Markdown
Member

@GernotMaier GernotMaier commented May 31, 2026

Summary

Fixes XGB/Eventdisplay-ML integration issues identified in VERITAS-Observatory/EventDisplay_v4#352 (section E).

Changes

E2 (HIGH) — Stale XGB CLI flags and wrong effective-area parameter key

File: scripts/helper_scripts/IRF.mscw_energy_MC_sub.sh

  • run_xgb(): updated CLI flags to current underscore-style API:
    • --input-file--input_file
    • --model-dir--model_prefix
    • --output-file--output_file
    • --image-selection--image_selection
  • Effective-area parameter file: XGBFILESUFFIXXGBSTEREOFILESUFFIX (matches current C++ parser)

E8 (MEDIUM) — Hardcoded conda environment name ignores EVNDISP_MLSYS

Files: all XGB sub-scripts

  • env_name="eventdisplay_ml"env_name="${EVNDISP_ML_ENV:-eventdisplay_ml}"
  • Added EVNDISP_ML_ENV to README environment-variables table
  • Users can now override the conda environment name without modifying scripts

E11 (MEDIUM) — Inconsistent XGB command names

  • IRF.generalproduction.sh: TRAINXGBANGRESBINNEDTRAINXGBANGRES (matches IRF.production.sh)
  • docs/changes/124.feature.md: corrected stale script name IRF.trainXGBforAngularReconstruction.shIRF.trainXGBforAngularReconstructionBinned.sh

E1 (HIGH) — XGB anasum cuts with no prerequisite enforcement

  • ANALYSIS.anasum_parallel_from_runlist.sh: added warning when XGB cuts are selected, directing users to run ANALYSIS.dispXGB.sh first

Related issue

Closes relevant items from VERITAS-Observatory/EventDisplay_v4#352 (E1, E2, E8, E10, E11).

GernotMaier and others added 2 commits May 31, 2026 13:43
E2: update stale CLI flags in run_xgb() (--input-file -> --input_file,
    --model-dir -> --model_prefix, --output-file -> --output_file,
    --image-selection -> --image_selection); fix effective-area parameter
    key from XGBFILESUFFIX to XGBSTEREOFILESUFFIX
E8: replace hardcoded env_name='eventdisplay_ml' with
    EVNDISP_ML_ENV (default: eventdisplay_ml) in all XGB sub-scripts;
    document EVNDISP_ML_ENV in README
E10: add --random_state 42 to XGB training CLI calls for reproducibility
E11: align TRAINXGBANGRES command name in IRF.generalproduction.sh with
    IRF.production.sh; fix stale script name in docs/changes/124.feature.md
E1: add prerequisite warning when XGB cuts are selected in
    ANALYSIS.anasum_parallel_from_runlist.sh

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Addresses several XGB / Eventdisplay-ML integration issues from EventDisplay_v4 issue #352 (section E), bringing helper scripts in line with the current Eventdisplay-ML CLI, allowing the conda environment to be overridden, fixing an effective-area parameter key, and unifying XGB command names.

Changes:

  • IRF.mscw_energy_MC_sub.sh: migrate run_xgb to the underscore-style Eventdisplay-ML CLI and emit XGBSTEREOFILESUFFIX (matching the current C++ parser and IRF.effective_area_parallel_sub.sh).
  • All XGB sub-scripts: make the conda env configurable via ${EVNDISP_ML_ENV:-eventdisplay_ml}, quote $env_name uses, and document EVNDISP_ML_ENV in the README.
  • Rename TRAINXGBANGRESBINNEDTRAINXGBANGRES in IRF.generalproduction.sh, fix stale script name in 124.feature.md, and warn users when XGB cuts are selected in ANALYSIS.anasum_parallel_from_runlist.sh.

Reviewed changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
scripts/helper_scripts/IRF.mscw_energy_MC_sub.sh Underscore-style CLI flags, configurable env name, XGBSTEREOFILESUFFIX key.
scripts/helper_scripts/ANALYSIS.dispXGB_sub.sh Configurable env name and quoted $env_name.
scripts/helper_scripts/IRF.dispXGB_sub.sh Configurable env name and quoted $env_name.
scripts/helper_scripts/IRF.trainXGBforAngularReconstruction_sub.sh Configurable env name and quoted $env_name.
scripts/helper_scripts/IRF.trainXGBforGammaHadronSeparation_sub.sh Configurable env name and quoted $env_name.
scripts/IRF.generalproduction.sh Rename TRAINXGBANGRESBINNEDTRAINXGBANGRES.
scripts/ANALYSIS.anasum_parallel_from_runlist.sh Per-branch warning for XGB cuts.
README.md Document EVNDISP_ML_ENV env var.
docs/changes/124.feature.md Correct stale training script name.
docs/changes/149.maintenance.md New changelog summarising the fixes.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread docs/changes/149.maintenance.md Outdated
Comment thread scripts/ANALYSIS.anasum_parallel_from_runlist.sh
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@GernotMaier GernotMaier merged commit 7620211 into main May 31, 2026
1 check passed
@GernotMaier GernotMaier deleted the v492-dev19-xgb-fixes branch May 31, 2026 18:46
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.

2 participants