Improvement of custom density interface passed to Inference classes using Protocols
Addresses the issues #1531 .
Given the rich support of _neural_net as an instance of NFlowsFlow, it is best for an user to provide a callable which conforms to the present convention of taking parameters and simulations and then return a NFlowsFlow object. Its best to have the custom density builder to be of this form.
@ARna06 would you have time to work on the proposed changes? Not a problem if not, but please let us know - thanks! 🙏
Note, we will take over this PR internally to finish it. I changed the base of this PR to a intermediate feature branch named fix/protocol-for-estimator-builder with the same state of main as of April 7.
@abelaba will take over from there, finishing this PR and syncing it with the most recent main.
Thanks to @ARna06 for the additions so far, your contributions will be kept visible as commits of this PR. 🙏