Skip to content

feat: Sanitizer for adaption and flipping#909

Open
KSkwarczynski wants to merge 2 commits into
developfrom
kskwarczynski/feat/santizerAdapt
Open

feat: Sanitizer for adaption and flipping#909
KSkwarczynski wants to merge 2 commits into
developfrom
kskwarczynski/feat/santizerAdapt

Conversation

@KSkwarczynski
Copy link
Copy Markdown
Member

Pull request description

We do know adaption doesn't work very well with flipping.
So let's add sanitizer.

If this is too harsh, can change error to warning.

Changes or fixes

  • Change xsec_cov into ParamHandler in Sample Handler

Examples

image

@github-actions
Copy link
Copy Markdown

Hi @KSkwarczynski, thank you for contributing to MaCh3! Please wait for MaCh3 developers to review your PR. If no one answers within a week, please message people from this list: https://github.com/orgs/mach3-software/teams/mach3admin . While waiting, please enjoy this

meme

Use this action on your projects. Use jokes on issues instead.

@github-actions github-actions Bot added Parameters ⚙️ Related with neutrino interactions or oscillations Samples 🗃️ labels May 18, 2026
@github-actions
Copy link
Copy Markdown

Hi, I am MaCh3-Telemetry bot

Memory and CPU Usage Summary

### Memory and CPU Usage Summary

| Metric  |     Mean    |      Max    |
|---------|-------------|-------------|
| **RAM** |   158.62 MB |   230.68 MB |
| **CPU** |     4.25 %  |     8.50 %  |

Memory Usage Plot

You can view the memory usage plot directly in the job summary from the link above.

Copy link
Copy Markdown
Contributor

@henry-wallace-phys henry-wallace-phys left a comment

Choose a reason for hiding this comment

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

I think the current sanitiser needs an override for "wacky" behaviours but otherwise looks great

MACH3LOG_ERROR("You enabled adaption for parameter which has enabled flipping ({})", _fFancyNames[index]);
MACH3LOG_ERROR("Right now flipping and adapting doesn't work very well");
MACH3LOG_ERROR("Please skip adaption for param {}, using ParametersToSkip option in config", _fFancyNames[index]);
throw MaCh3Exception(__FILE__, __LINE__);
Copy link
Copy Markdown
Contributor

@henry-wallace-phys henry-wallace-phys May 19, 2026

Choose a reason for hiding this comment

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

So I think throwing an exception here is maybe a bit harsh, is it possible to pass it an override flag at setup?

Something like this in the YAML:

SanitizeAdaption: <True/False>

that has default behaviour of True. The default (True) will run ParamaterHandlerBase::SanitizeAdaption as is whilst False does something like

MACH3LOG_CRITICAL("You've turned of sanity checking adaption! Be incredibly careful, this will not check for correlated parameter adaptions and will allow flipped parameters to adapt without issue") ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Parameters ⚙️ Related with neutrino interactions or oscillations Samples 🗃️

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants