Request for feedback: Unifying on JAX backend for future pyhf development

10 views
Skip to first unread message

pyhf announcements

unread,
Apr 24, 2024, 1:09:09 PMApr 24
to pyhf announcements
Dear pyhf Users,

Following the 2023 pyhf Users and Developers Workshop we have been thinking hard about how to improve the future of pyhf. Given the current landscape of scientific Python open source tools, the community use of the existing pyhf backends, and the choices of other tools in the broader Scikit-HEP, PyHEP, and Scientific Python ecosystems, we are strongly considering unifying on JAX as a computational backend. This would mean that in a future release pyhf would drop support for the NumPy, TensorFlow, PyTorch backends and become a JAX based library moving forward.

The primary motivation for unifying on JAX as a backend is that it would allow for us to refactor the pyhf internals for increased performance and differentiability, allow for more customization of the modifiers, and allow for us to separate out the inference code from the workspace construction. Automatic differentiation would also become a default.

Before we start work on what would be a drastic design change to the internals we want to solicit your feedback as users and contributors. Our goal is for the user experience to improve, with more flexible models, faster fits, and small public API/UX changes. Please respond with your thoughts and input, both positive and negative.

Best,
The pyhf dev team (Matthew, Lukas, and Giordon)

Lorenz Gärtner

unread,
Apr 29, 2024, 3:26:48 AMApr 29
to pyhf announcements
Dear Matthew, Lukas, and Giordon,

Thank you for reaching out and considering our opinions about the future direction of pyhf. I have discussed this topic with Danny and Nikolai (cc) and we have collected our opinions here.

Overall, we believe transitioning to JAX is a positive step. We are supportive of the decision to drop the TensorFlow and PyTorch backends in favour of JAX.

However, we do have reservations about completely dropping support for the NumPy backend. While we understand the rationale behind this proposed change, as it could potentially streamline development and optimize performance, the ability to work with plain NumPy arrays has been one of the appealing aspects of pyhf, particularly for experimenting with the code. Additionally, it's worth noting that transitioning exclusively to a JAX backend may exclude existing codebases built upon pyhf that rely on the NumPy backend and may not be autodiffable.

In conclusion, while we are supportive of the proposed shift towards JAX and the benefits it offers, we advocate for maintaining support for the NumPy backend rather than entirely discontinuing it.

Thank you once again for seeking input from users and contributors.

Best regards,

Danny, Nikolai and Lorenz

Matthew Feickert

unread,
Apr 29, 2024, 3:52:49 AMApr 29
to Lorenz Gärtner, pyhf announcements
Thanks very much for the feedback, Danny, Nikolai, and Lorenz! This is quite valuable to us, and also seems to be aligned with other feedback we've gotten so far.

To try to help aggregate community information, can you also please post this information on the GitHub Discussion that was started for it? https://github.com/scikit-hep/pyhf/discussions/2470

(Apologies for the duplication of information and the request for additional work on your end, but we're trying to make sure we broadcast this information to people who aren't checking the GitHub Discussions on a regular basis too.)

Best,
Matthew

--
Matthew Feickert
University of Wisconsin-Madison

From: pyhf-anno...@googlegroups.com <pyhf-anno...@googlegroups.com> on behalf of Lorenz Gärtner <lorenz....@gmail.com>
Sent: Monday, April 29, 2024 02:26
To: pyhf announcements <pyhf-anno...@googlegroups.com>
Subject: Re: Request for feedback: Unifying on JAX backend for future pyhf development
 
--
You received this message because you are subscribed to the Google Groups "pyhf announcements" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pyhf-announceme...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/pyhf-announcements/bd7d60d1-3d8e-4b17-aa7d-f33a4c1fa670n%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages