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

Switch from Cython to Pybind11, use latest ROOT patches #502

Merged
merged 71 commits into from
Nov 7, 2020
Merged

Conversation

HDembinski
Copy link
Member

@HDembinski HDembinski commented Nov 6, 2020

A major rewrite that replaces Cython as the tool to generate C++ bindings with pybind11.

  • This greatly simplifies the implementation and fixes object life-time issues and memory corruption issues that were present in the old code.
  • Exceptions raised in Python during the computation of the objective function are now transparently passed through a layer of C++ code back to Python. This replaces the previous ugly workaround to catch these exceptions and raise them again.

Simultaneously, the code makes use of ROOT patches which have been submitted as PRs and are about to be accepted.

  • ROOT's Minuit2 now has a rewritten logging system, which allows us to turn on comprehensive debug output at runtime (before it was a compile-time option)
  • The new logging system allows us to finally fix issue MINUIT output not shown in Jupyter notebook #295 by passing the logging to Python's print. This means it will show up in Jupyter notebooks instead of the command-line.

Minor fixes:

  • A bug in the new "Parameter at limit" warning was found and fixed, the warning was wrongly triggered also when a parameter was close to zero.

@HDembinski HDembinski merged commit 0e65bc5 into develop Nov 7, 2020
@HDembinski HDembinski deleted the pybind11 branch November 7, 2020 13:49
HDembinski added a commit that referenced this pull request Nov 19, 2020
HDembinski added a commit that referenced this pull request Nov 22, 2020
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.

None yet

1 participant