Skip to content

Commit

Permalink
Add additional clarification on required conditions
Browse files Browse the repository at this point in the history
  • Loading branch information
matthewfeickert committed Aug 17, 2023
1 parent baecb84 commit 90f9467
Showing 1 changed file with 15 additions and 3 deletions.
18 changes: 15 additions & 3 deletions docs/release-notes/v0.7.3.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,16 @@ Fixes
(PRs :pr:`2277`, :pr:`2278`)

The fixed bug was subtle and only occurred for specific configurations of
settings and arguments.
To determine if you might have been affected by it see if you used a setup
like the following in any part of your code
settings and arguments where ``do_grad=False`` was used (either explicitly
by provided kwarg or implicitly through defaults).
To determine if you might have been affected by it, check your code for
setups like the following.

.. code:: python
# Bug is backend independent. JAX is selected as an example where
# do_grad=False might be selected in response to the backend's value of
# pyhf.tensorlib.default_do_grad being True.
pyhf.set_backend("jax", pyhf.optimize.minuit_optimizer(strategy=0))
...
Expand All @@ -43,6 +47,14 @@ Fixes
)
data = [51, 48] + model.config.auxdata
# passing with strategy kwarg explicitly given
fit_result, opt_result = pyhf.infer.mle.fit(
data, model, return_result_obj=True, do_grad=False, strategy=0
)
minuit_strategy = opt_result.minuit.strategy.strategy
print(f"# Minuit minimization strategy: {minuit_strategy}")
assert minuit_strategy == 0
# strategy kwarg not given
fit_result, opt_result = pyhf.infer.mle.fit(
data, model, return_result_obj=True, do_grad=False
Expand Down

0 comments on commit 90f9467

Please sign in to comment.