Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature Req.] Ability to choose which 21cmFAST errors to abort with. #52

Open
steven-murray opened this issue Mar 23, 2021 · 0 comments
Assignees
Labels
API Breaking A change that breaks backwards compatibility context: error-handling Changes predominantly affect error-handling context: mcmc type: feature: code New ability in the code (user-side)
Milestone

Comments

@steven-murray
Copy link
Member

Is your feature request related to a problem? Please describe.

At the moment, if a ParameterError occurs during running 21cmFAST, it will be ignored and the chain will continue, setting that set of parameters to have likelihood of -inf. As @BradGreig has pointed out, this can be dangerous because these parameters might affect the final chains.

Describe the solution you'd like
We should make it option whether to exit on these errors. The default should be to exit.

Two extra features that go along with this that we might consider:

  1. We could count the number of times one of these errors occurs, and exit after a certain threshold number. Thus we could ignore a few bad parameter choices on the edge of the distribution, but if it keeps happening, assume something is really going wrong.
  2. We could be a little more granular in the way we catch the errors, and let the user decide exactly which exception classes are ignored. At the moment, anything that is a subclass of ParameterError is let through. However, we could let the user specify subclasses of ParameterError (see More informative errors 21cmFAST#219) that would trigger exits/ignoring.
@steven-murray steven-murray self-assigned this Mar 23, 2021
@steven-murray steven-murray added API Breaking A change that breaks backwards compatibility context: error-handling Changes predominantly affect error-handling context: mcmc type: feature: code New ability in the code (user-side) labels Mar 23, 2021
@steven-murray steven-murray added this to the v1 milestone Mar 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
API Breaking A change that breaks backwards compatibility context: error-handling Changes predominantly affect error-handling context: mcmc type: feature: code New ability in the code (user-side)
Projects
None yet
Development

No branches or pull requests

1 participant