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

Enhancement on compatibility to the iminuit >= 2.0 #42

Merged
merged 22 commits into from Aug 7, 2023

Conversation

YtihalX
Copy link
Contributor

@YtihalX YtihalX commented Aug 5, 2023

main changes

Cause the iminuit no longer supports passing arguments like error_ limit_, most of the changes are focused on converting the old way of calling iminuit to the compatible way.

  • fully compatible with the previous style(can this be called as a "change" LOL)
  • added preprocess function to parse the improper arguments
  • added copy_state! function to copy the initial states
  • partially fixed the doc build, doctest now must be disabled, cause this process somehow doesn't evaluate the LazyHelp struct thus resulting in error, and the @autodocs no longer works with the LazyHelp either

some problems

problem about parallel function

I decided to implement a parallel function based on the script I previously wrote, but due to the intrinsic properties of python and julia this is barely possible, here are the reasons:

  1. Python itself doesn't provide multi threading due to the GIL, so I have to use multi process in Julia to run multiple python interpreters
  2. Julia doesn't provide proper function serialization between processes, which means that I can't pass the function around to initialize a Minuit object
    so basically there is no way to encapsulate the script into a function

problem about the cost function class

The iminuit provides a class called cost function with lots of built-in functions and a better integration with the minuit class, but unfortunately, the cost functions inside it seems to use the broadcast which directly calls the function over a vector. Here the function is the probability density function used to calculate chisq, so it needs to be called inside python and it needs a dot to broadcast, that's where incompatibility comes from.

@fkguo fkguo merged commit 0730e31 into fkguo:master Aug 7, 2023
20 checks passed
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

2 participants