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

Improve Exception Handling for User-Provided Batch Functions #354

Open
wilsonbb opened this issue Jan 20, 2024 · 0 comments
Open

Improve Exception Handling for User-Provided Batch Functions #354

wilsonbb opened this issue Jan 20, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@wilsonbb
Copy link
Collaborator

When using Ensemble.batch to run a custom user-provided function, it's possible that the function will throw an exception causing the batch operation to stop before delivering a final result.

One way in which this can be particularly annoying is only some data yields an exception. For instance, a user can run batch on a very large dataset but have exceptions that generated only by a few unusual lightcurves cause the whole operation to fail.

To alleviate the pain of this we could have wrap the user's function in another function which performs some basic exception handling, and then we can have some threshold for how many exceptions would trigger a batch failure.

There is some uncertainty in:

  • When handling the exception how can we infer what default values to provide for that light curve? Can we infer this from the meta and should we use None, NaNs, Inf, etc.
  • Would printing out the exceptions provide too much noise for the user, especially if there is an excessively long stack trace? Would it be best to write the errors out to a file and print a warning that this has occurred?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant