-
Notifications
You must be signed in to change notification settings - Fork 8
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
Vegas+ #64
Vegas+ #64
Conversation
Nice! Are there benchmarks for this? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very good! Thanks for this great implementation.
Todo / summary:
- cross-check
d_h
definition. - in order to include this module please edit the
src/vegasflow/__init__.py
. - extend tests and examples.
- profile (performance) and compare to vegas importance sampling
- tests on multiple hardware (CPU, GPU).
Benchmark using StratifiedFlow on my local machine (4 threads)Gauss 4-d, 1e5 samples per iteration, rtol = 1e-3 Gauss 4-d, 1e5 samples per iteration, rtol = 1e-2 Gauss 4-d, 1e6 samples per iteration, rtol = 1e-3 Gauss 4-d, 1e6 samples per iteration, rtol = 1e-2 Gauss 8-d, 1e5 samples per iteration, rtol = 1e-2 Gauss 8-d, 1e5 samples per iteration, rtol = 1e-3 Gauss 8-d, 1e6 samples per iteration, rtol = 1e-2 Gauss 8-d, 1e6 samples per iteration, rtol = 1e-3 |
I tried to fix the retracing problem moving the generation of the random numbers between 0 and 1 from |
@scarlehoff could you please help here? |
My two cents would be to not compile at all Also, I think the retracing is "good" here because you are changing the I'm going to open a branch with suggested changes, you can either merge it if you like it or select only the changes you agree with. btw I would take the generation of the random numbers outside of Edit: got confused about my own edit. |
Sorry I misclick |
Co-authored-by: Juan M. Cruz-Martinez <juacrumar@lairen.eu>
I will be merging this during this week, there are quite a few conflicts so it might be non trivial though... If anyone has commits or changes they haven't pushed yet please let me know. |
I have no commits to push. I won't be able to review the code until saturday since I am currently away from home. |
No worries, there's no urgency at all ^__^ thanks for confirming |
Ok, done. I've done some benchmarks and everything seems ok in terms of speed so I haven't broken anything I believe. I'll play a bit more of course, maybe even add the option to use Vegas+ to the script in https://github.com/N3PDF/madflow TODOs: Some documentation (just saying the algorithm is implemented and maybe linking to Lepage's paper) would be nice. A benchmark against the implementation in Torchquad (https://github.com/esa/torchquad/) would be great to have as well. However, these things might require time we might not have right now (from tomorrow and in the next few weeks I'll be busy) so I'll open separate issues for that (it's "out of scope" for this PR) |
Reading the changelogs for Tensorflow 2.6, it is possible that the problem we were seeing with Anyway, I still think the limit of 13 dimensions is a reasonable one. |
Nice. |
src/vegasflow/vflowplus.py
Outdated
_ = kwargs.setdefault("events_limit", n_events) | ||
super().__init__(n_dim, n_events, train, **kwargs) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right now, vegas+ cannot break the integration, correct?
Maybe it is worth considering for later developments of vegas+.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, and actually we should add a warning for now instead of doing it silently.
It should be indeed a priority.
Should I merge this then? |
Yes, I have no other changes to add. |
This PR implements Vegas+ from paper.