Fix XGB/Eventdisplay-ML integration issues (issue #352 E-section)#149
Merged
Conversation
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>
67 tasks
Contributor
There was a problem hiding this comment.
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: migraterun_xgbto the underscore-style Eventdisplay-ML CLI and emitXGBSTEREOFILESUFFIX(matching the current C++ parser andIRF.effective_area_parallel_sub.sh).- All XGB sub-scripts: make the conda env configurable via
${EVNDISP_ML_ENV:-eventdisplay_ml}, quote$env_nameuses, and documentEVNDISP_ML_ENVin the README. - Rename
TRAINXGBANGRESBINNED→TRAINXGBANGRESinIRF.generalproduction.sh, fix stale script name in124.feature.md, and warn users when XGB cuts are selected inANALYSIS.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 TRAINXGBANGRESBINNED → TRAINXGBANGRES. |
| 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.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
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
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.shrun_xgb(): updated CLI flags to current underscore-style API:--input-file→--input_file--model-dir→--model_prefix--output-file→--output_file--image-selection→--image_selectionXGBFILESUFFIX→XGBSTEREOFILESUFFIX(matches current C++ parser)E8 (MEDIUM) — Hardcoded conda environment name ignores
EVNDISP_MLSYSFiles: all XGB sub-scripts
env_name="eventdisplay_ml"→env_name="${EVNDISP_ML_ENV:-eventdisplay_ml}"EVNDISP_ML_ENVto README environment-variables tableE11 (MEDIUM) — Inconsistent XGB command names
IRF.generalproduction.sh:TRAINXGBANGRESBINNED→TRAINXGBANGRES(matchesIRF.production.sh)docs/changes/124.feature.md: corrected stale script nameIRF.trainXGBforAngularReconstruction.sh→IRF.trainXGBforAngularReconstructionBinned.shE1 (HIGH) — XGB anasum cuts with no prerequisite enforcement
ANALYSIS.anasum_parallel_from_runlist.sh: added warning when XGB cuts are selected, directing users to runANALYSIS.dispXGB.shfirstRelated issue
Closes relevant items from VERITAS-Observatory/EventDisplay_v4#352 (E1, E2, E8, E10, E11).