Release Notes#
v0.7.6#
This is a patch release from v0.7.5 → v0.7.6.
Fixes#
For the JAX backend access
jax.configfrom thejaxtop level API to avoid support issues withjaxandjaxlibv0.4.20+. (PR #2376)Add information in the warnings for
pyhf.infer.test_statistics.qmu()andpyhf.infer.test_statistics.qmu_tilde()that provides users with the higher levelpyhf.inferAPIskwargto set the correct test statistic. (PR #2390)Correct the variable assignment for the one-sigma and two-sigma limit band artists in
pyhf.contrib.viz.brazil.plot_brazil_band()to match the stated return structure. (PR #2411)In the
pyhf.infermodule, correct thefixed_paramstype in the docs to be totupleorlist. (PR #2420)
Contributors#
v0.7.6 benefited from contributions from:
Lorenz Gaertner
v0.7.5#
This is a patch release from v0.7.4 → v0.7.5.
Fixes#
Remove operating system dependent components of schema validation to allow for validation on Windows. (PR #2357)
v0.7.4#
This is a patch release from v0.7.3 → v0.7.4.
Fixes#
Skip callbacks with dead weakrefs while iterating over callbacks in
pyhfevents, likepyhf.set_backend(), to avoid the possibility of accessing dead weakrefs before they could be garbage collected. (PR #2310)The fixed bug was subtle and occurred nondeterministically when the
pyhf.tensorlibwas changed repeatedly causing dead weakrefs to be accessed before Python’s garbage collection could remove them. Most users should be unaffected.
Contributors#
v0.7.4 benefited from contributions from:
Daniel Werner
Jonas Rembser
v0.7.3#
This is a patch release from v0.7.2 → v0.7.3.
Fixes#
Use
numpy.prod()API overnumpy.productasnumpy.productis deprecated as of NumPyv1.25.0. (PR #2242)Guard
pyhf.optimize.opt_minuit.minuit_optimizeroptimizer strategy fromNoneto ensureiminuit.Minuit.strategystrategies are correctly handled. (PRs #2277, #2278)The fixed bug was subtle and only occurred for specific configurations of settings and arguments where
do_grad=Falsewas 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.# 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)) ... fit_result, opt_result = pyhf.infer.mle.fit( data, model, return_result_obj=True, do_grad=False ) assert opt_result.minuit.strategy.strategy == 0 # fails for pyhf v0.7.2
Full example that fails in
pyhfv0.7.2:import pyhf pyhf.set_backend("jax", pyhf.optimize.minuit_optimizer(strategy=0)) model = pyhf.simplemodels.uncorrelated_background( signal=[12.0, 11.0], bkg=[50.0, 52.0], bkg_uncertainty=[3.0, 7.0] ) 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 ) minuit_strategy = opt_result.minuit.strategy.strategy print(f"# Minuit minimization strategy: {minuit_strategy}") assert minuit_strategy == 0 # fails for pyhf v0.7.2
Contributors#
v0.7.3 benefited from contributions from:
Alexander Held
Daniel Werner
v0.7.2#
This is a patch release from v0.7.1 → v0.7.2.
Important Notes#
pyhfbecame a NumFOCUS Affiliated Project on 2022-12-19.v0.7.1is the first release to appear in a NumFOCUS Newsletter andv0.7.2is the first release to appear as part of the Affiliated Projects page. (PR #2179)
Fixes#
If a multiple component parameter of interest is used raise
InvalidModel. This guards against modifiers likeshapefactor,shapesys, andstaterrorfrom being used as POIs. (PR #2197)Use
typing.TYPE_CHECKINGguard to avoid causing aModuleNotFoundErrorwhen the version of NumPy installed is older thanv1.21.0, which is the first NumPy release to includenumpy.typing. (PR #2208)
Contributors#
v0.7.2 benefited from contributions from:
Alexander Held
v0.7.1#
This is a patch release from v0.7.0 → v0.7.1.
Important Notes#
All backends are now fully compatible and tested with Python 3.11. (PR #2145)
The
tensorflowextra ('pyhf[tensorflow]') now automatically installstensorflow-macosfor Apple silicon machines. (PR #2119)
Fixes#
Raise
NotImplementedErrorwhen attempting to convert a XML workspace that contains no data. (PR #2109)
Contributors#
v0.7.1 benefited from contributions from:
Alexander Held
v0.7.0#
This is a minor release from v0.6.3 → v0.7.0.
Important Notes#
Please note this release has API breaking changes and carefully read these notes while updating your code to the
v0.7.0API.All backends are now fully compatible and tested with Python 3.10. (PR #1809)
The
pyhf.tensorlib.poissonAPI now allows for the expected rate parameterlamto be0in the case that the observed eventsnis0given that the limit \(\lim_{\lambda \to 0} \,\mathrm{Pois}(n | \lambda)\) is well defined. (PR #1657)pyhf.readxml.parse()now supports reading of XML configurations with absolute paths. To support this,pyhf xlm2jsonnow has a-v/--mountoption. (PR #1909)Support for model specifications without a parameter of interest defined is added. (PRs #1638, #1636)
The
pyhf.parameters.paramsetsclassessuggested_fixedattribute behavior has been updated. To access the behavior used inpyhfv0.6.xuse thesuggested_fixed_as_boolattribute. (PR #1639)pyhf.pdf._ModelConfig.par_namesis changed to be a property attribute. (PR #2027)The order of model parameters is now sorted by model parameter name. (PR #1625)
Support for writing user custom modifiers is added. (PRs #1625, #1644)
Performance in
pyhf.readxmlis increased by improvements topyhf.readxml.import_root_histogram(). (PR #1691)pyhf.contrib.utils.download()is now more robust to different target file types. (PRs #1697, #1704)A
pyhf.default_backendhas been added that is configurable through adefaultkwarg inpyhf.set_backend(). (PR #1646) This is part of work to makepyhffully automatic differentiable. (Issue #882)Schema validation now allows for both
listandpyhf.tensorlibobjects to exist in the model specification. (PR #1647)The minimum required dependencies have been updated to support added features:
The minimum required backend versions have been updated to support added features:
JAX backend requires
jax>=0.2.10,jaxlib>=0.1.61(PR #1962)PyTorch backend requires
torch>=1.10.0(PR #1657)TensorFlow backend requires
tensorflow>=2.7.0,tensorflow-probability>=0.11.0(PRs #1962, #1657)iminuit optimizer requires
iminuit>=2.7.0(PR #1895)'xmlio'extra requiresuproot>=4.1.1(PR #1567)
Fixes#
Use improvements to
jsonschema.RefResolverto avoidjsonschema.exceptions.RefResolutionError. (PR #1976)Use the conditional maximum likelihood estimators of the nuisance parameters to create the sampling distributions for
pyhf.infer.calculators.ToyCalculator. (PR #1610) This follows the joint recommendations of the ATLAS and CMS experiments in Procedure for the LHC Higgs boson search combination in Summer 2011.
Features#
Python API#
The following functions have been added to the
pyhf.tensorlibAPI:pyhf.readxml.parse()now supports reading of XML configurations with absolute paths with the addition of themountsoptional argument. (PR #1909)Support for overriding the paths for finding schemas is added, using the
pyhfinstalled location as a base viapyhf.utils.schemas. (PRs #1753, #1818)>>> from pathlib import Path >>> import pyhf.schema >>> current_schema_path = pyhf.schema.path >>> current_schema_path PosixPath('/path/to/your/venv/lib/python3.X/site-packages/pyhf/schemas') >>> custom_schema_path = Path("/path/to/custom/pyhf/schema") >>> with pyhf.schema(custom_schema_path): ... print(repr(pyhf.schema.path)) ... PosixPath('/path/to/custom/pyhf/schema') >>> pyhf.schema.path PosixPath('/path/to/your/venv/lib/python3.X/site-packages/pyhf/schemas')
In
pyhf.workspace.Workspace.model()the parameter of interest specified in the measurement may now be overridden using the addedpoi_namekwarg. (PR #1636)The
pyhf.parameters.paramsetsclassessuggested_fixedattribute behavior has been updated to return alistofboolof lengthn_parameters. To access the behavior used inpyhfv0.6.xuse thesuggested_fixed_as_boolattribute. (PR #1639)pyhf.pdf._ModelConfig.par_namesis changed to be a property attribute. (PR #2027)The order of model parameters is now sorted by model parameter name. (PR #1625)
>>> import pyhf >>> model = pyhf.simplemodels.correlated_background( ... signal=[12.0, 11.0], ... bkg=[50.0, 52.0], ... bkg_up=[45.0, 57.0], ... bkg_down=[55.0, 47.0], ... ) >>> model.config.par_order ['correlated_bkg_uncertainty', 'mu'] >>> model.config.par_names ['correlated_bkg_uncertainty', 'mu']
Support for writing user custom modifiers is added. (PRs #1625, #1644) This is still in the stage where it is targeted at expert users.
{modifier}_builderclasses are added for all modifiers. (PRs #1625) For example,pyhf.modifiers.histosys.histosys_builder.When using
pyhf.writexmland thenormfactorparameter config is missinginitsorbounds, fall back to using default values. (PRs #1819)Supported options for
pyhf.infer.hypotest()can now be passed as kwargs through thepyhf.infer.intervals.upper_limits.upper_limit()API. (PR #1613) This now enables things like usingpyhf.infer.calculators.ToyCalculatoras the calculator used for the hypothesis test scan:>>> import numpy as np >>> import pyhf >>> pyhf.set_backend("jax") >>> model = pyhf.simplemodels.uncorrelated_background( ... signal=[12.0, 11.0], bkg=[50.0, 52.0], bkg_uncertainty=[3.0, 7.0] ... ) >>> observations = [51, 48] >>> data = pyhf.tensorlib.astensor(observations + model.config.auxdata) >>> scan = np.linspace(0, 5, 21) >>> obs_limit, exp_limits, (scan, results) = pyhf.infer.intervals.upper_limits.upper_limit( ... data, model, scan, return_results=True, calctype="toybased", ntoys=3000 ... )
Allow for fit parameter values from required fits in
pyhf.infer.test_statisticsfunctions to be returned by use ofreturn_fitted_parskwarg with thepyhf.infer.test_statisticsfunctions andreturn_calculatorkwarg withpyhf.infer.hypotest(). (PR #1554)A
validatekwarg has been added topyhf.workspace.Workspace()andpyhf.pdf.Model()to allow skipping validation. (PR #1646) This should only be used by expert users who understand the risks.A
pyhf.default_backendhas been added that is configurable through adefaultkwarg inpyhf.set_backend(). (PR #1646) This allows setting thepyhf.default_backendto be different from the value ofpyhf.tensorlibreturned bypyhf.get_backend(), which can be useful in situations where differentiable model construction is needed.>>> import jax >>> import pyhf >>> pyhf.set_backend("jax", default=True) >>> pyhf.set_backend("numpy") >>> pyhf.get_backend() (<pyhf.tensor.numpy_backend.numpy_backend object at 0x...>, <pyhf.optimize.scipy_optimizer object at 0x...>) >>> pyhf.default_backend <pyhf.tensor.jax_backend.jax_backend object at 0x...> >>> def example_op(x): ... return 2 * pyhf.default_backend.power(pyhf.default_backend.astensor(x), 3) ... >>> example_op([2.0]) DeviceArray([16.], dtype=float64) >>> jax.jacrev(jax.jit(example_op))([2.0]) [DeviceArray([24.], dtype=float64, weak_type=True)]
Schema validation now allows for both
listandpyhf.tensorlibobjects to exist in the model specification. (PR #1647)>>> import pyhf >>> signal = pyhf.tensorlib.astensor([12.0, 11.0]) >>> background = pyhf.tensorlib.astensor([50.0, 52.0]) >>> background_uncertainty = pyhf.tensorlib.astensor([3.0, 7.0]) >>> model = pyhf.simplemodels.uncorrelated_background( ... signal=signal, bkg=background, bkg_uncertainty=background_uncertainty ... )
CLI API#
The
pyhf xlm2jsonCLI API now has a-v/--mountoption to support reading XML configurations with absolute paths. (PR #1909) Similar to Docker volume mounts, the options allows a user to pass two fields separated by a colon (:). The first field is a local path and the second field is the absolute path specified in the XML configuration to be substituted. Without the-v/--mountoption a user would have to manually edit the absolute path in each XML file it appeared in!pyhf xml2json \ --mount /local/path/to/workspace:/absolute/path/to/replace/inside/xml \ --output-file workspace.json \ workspace/analysis_config.xml
Deprecations#
Python API#
The
pyhf.infer.intervals.upperlimit()API has been deprecated in favor ofpyhf.infer.intervals.upper_limits.upper_limit(). Thepyhf.infer.intervals.upperlimit()API will removed inpyhfv0.9.0. (PR #1274)
Removals#
Python API#
The
pyhf.simplemodels.hepdata_like()API, deprecated sincepyhfv0.6.2, has been removed. (PR #1670) Use thepyhf.simplemodels.uncorrelated_background()API instead.pyhf.workspace.Workspace’sparametersattribute is removed in favor of usingpyhf.pdf._ModelConfig’sparameters. (PR #1625)pyhf.workspace.Workspace.get_measurement()has thepoi_namekwarg removed. (PR #1636)
Contributors#
v0.7.0 benefited from contributions from:
Alexander Held
Mason Proffitt
Lars Henkelmann
Aryan Roy
Graeme Watt
Jerry Ling
Nathan Simpson
Beojan Stanislaus
v0.6.3#
This is a patch release from v0.6.2 → v0.6.3.
Important Notes#
With the addition of writing ROOT files in
uprootv4.1.0thexmlioextra no longer requiresuproot3and all dependencies onuproot3anduproot3-methodshave been dropped. (PR #1567)uproot4additionally brings large speedups to writing, which results in an order of magnitude faster conversion time for most workspace conversions from JSON back to XML + ROOT withpyhf json2xml.All backends are now fully compatible and tested with Python 3.9. (PR #1574)
The TensorFlow backend now supports compatibility with TensorFlow
v2.2.1and later and TensorFlow Probabilityv0.10.1and later. (PR #1001)The
pyhf.workspace.Workspace.data()with_auxkeyword arg has been renamed toinclude_auxdatato improve API consistency. (PR #1562)
Fixes#
The weakref bug with Click
v8.0+was resolved.pyhfis now fully compatible with Clickv7andv8releases. (PR #1530)
Features#
Python API#
Model parameter names are now propagated to optimizers through addition of the
pyhf.pdf._ModelConfig.par_names()API.pyhf.pdf._ModelConfig.par_names()also handles non-scalar modifiers with 1 parameter. (PRs #1536, #1560)>>> import pyhf >>> model = pyhf.simplemodels.uncorrelated_background( ... signal=[12.0, 11.0], bkg=[50.0, 52.0], bkg_uncertainty=[3.0, 7.0] ... ) >>> model.config.parameters ['mu', 'uncorr_bkguncrt'] >>> model.config.npars 3 >>> model.config.par_names() ['mu', 'uncorr_bkguncrt[0]', 'uncorr_bkguncrt[1]']
The
pyhf.pdf._ModelConfigchannel_nbinsdict is now sorted by keys to match the order of thechannelslist. (PR #1546)The
pyhf.workspace.Workspace.data()with_auxkeyword arg has been renamed toinclude_auxdatato improve API consistency. (PR #1562)
v0.6.2#
This is a patch release from v0.6.1 → v0.6.2.
Important Notes#
The
pyhf.simplemodels.hepdata_like()API has been deprecated in favor ofpyhf.simplemodels.uncorrelated_background(). Thepyhf.simplemodels.hepdata_like()API will be removed inpyhfv0.7.0. (PR #1438)There is a small breaking API change for
pyhf.contrib.viz.brazil.plot_results(). See the Python API changes section for more information.The
pyhf.patchset.PatchSetschema now allows string types for patch values in patchsets. (PR #1488)Only lower bounds on core dependencies are now set. This allows for greater developer freedom and reduces the risk of breaking user’s applications by unnecessarily constraining libraries. This also means that users will be responsible for ensuring that their installed dependencies do not conflict with or break
pyhf. c.f. Hynek Schlawack’s blog post Semantic Versioning Will Not Save You for more in-depth coverage on this topic. For most users nothing should change. This mainly affects developers of other libraries in whichpyhfis a dependency. (PR #1382)Calling
dir()on anypyhfmodule or trying to tab complete an API will now provide a more helpfully restricted view of the available APIs. This should help provide better exploration of thepyhfAPI. (PR #1403)Docker images of releases are now published to both Docker Hub and to the GitHub Container Registry. (PR #1444)
CUDA enabled Docker images are now available for release
v0.6.1and later on Docker Hub and the GitHub Container Registry. Visit github.com/pyhf/cuda-images for more information.
Fixes#
Allow for precision to be properly set for the tensorlib
onesandzerosmethods through adtypeargument. This allows for precision to be properly set through thepyhf.set_backend()precisionargument. (PR #1369)The default precision for all backends is now
64b. (PR #1400)Add check to ensure that POIs are not fixed during a fit. (PR #1409)
Parameter name strings are now normalized to remove trailing spaces. (PR #1436)
The logging level is now not automatically set in
pyhf.contrib.utils. (PR #1460)
Features#
Python API#
The
pyhf.simplemodels.hepdata_like()API has been deprecated in favor ofpyhf.simplemodels.uncorrelated_background(). Thepyhf.simplemodels.hepdata_like()API will be removed inpyhfv0.7.0. (PR #1438)The
pyhf.simplemodels.correlated_background()API has been added to provide an example model with a single channel with a correlated background uncertainty. (PR #1435)Add CLs component plotting kwargs to
pyhf.contrib.viz.brazil.plot_results(). This allows CLs+b and CLb components of the CLs ratio to be plotted as well. To be more consistent with thematplotlibAPI,pyhf.contrib.viz.brazil.plot_results()now returns a lists of the artists drawn on the axis and moves theaxarguments to the to the last argument. (PR #1377)The
pyhf.compatmodule has been added to aid in translating to and from ROOT names. (PR #1439)
CLI API#
The CLI API now supports a
patchset inspectAPI to list the individual patches in aPatchSet. (PR #1412)
pyhf patchset inspect [OPTIONS] [PATCHSET]
Contributors#
v0.6.2 benefited from contributions from:
Alexander Held
v0.6.1#
This is a patch release from v0.6.0 → v0.6.1.
Important Notes#
As a result of changes to the default behavior of
torch.distributionsin PyTorchv1.8.0, accommodating changes have been made in the underlying implementations forpyhf.tensor.pytorch_backend.pytorch_backend(). These changes require a new lower bound oftorchv1.8.0for use of the PyTorch backend.
Fixes#
In the PyTorch backend the
validate_argskwarg is used withtorch.distributionsto ensure a continuous approximation of the Poisson distribution intorchv1.8.0+.
Features#
Python API#
The
solver_optionskwarg can be passed to thepyhf.optimize.opt_scipy.scipy_optimizer()optimizer for additional configuration of the minimization. Seescipy.optimize.show_options()for additional options of optimization solvers.The
torchAPI is now used to provide the implementations of theravel,tile, andoutertensorlib methods for the PyTorch backend.
v0.6.0#
This is a minor release from v0.5.4 → v0.6.0.
Important Notes#
Please note this release has API breaking changes and carefully read these notes while updating your code to the
v0.6.0API. Perhaps most relevant is the changes to thepyhf.infer.hypotest()API, which now uses acalctypeargument to differentiate between using an asymptotic calculator or a toy calculator, and atest_statkwarg to specify which test statistic the calculator should use, with'qtilde', corresponding topyhf.infer.test_statistics.qmu_tilde(), now the default option. It also relies more heavily on using kwargs to pass options through to the optimizer.Following the recommendations of NEP 29 — Recommend Python and NumPy version support as a community policy standard
pyhfv0.6.0drops support for Python 3.6. PEP 494 – Python 3.6 Release Schedule also notes that Python 3.6 will be end of life in December 2021, sopyhfis moving forward with a minimum required runtime of Python 3.7.Support for the discovery test statistic, \(q_{0}\), has now been added through the
pyhf.infer.test_statistics.q0()API.Support for pseudoexperiments (toys) has been added through the
pyhf.infer.calculators.ToyCalculator()API. Please see the corresponding example notebook for more detailed exploration of the API.The
minuitextra,python -m pip install pyhf[minuit], now uses and requires theiminuitv2.Xrelease series and API. Note thatiminuitv2.Xcan result in slight differences in minimization results fromiminuitv1.X.The documentation will now be versioned with releases on ReadTheDocs. Please use pyhf.readthedocs.io to access the documentation for the latest stable release of
pyhf.pyhfis transitioning away from Stack Overflow to GitHub Discussions for resolving user questions not covered in the documentation. Please check the GitHub Discussions page to search for discussions addressing your questions and to open up a new discussion if your question is not covered.pyhfhas published a paper in the Journal of Open Source Software.Please make sure to include the paper reference in all citations of
pyhf, as documented in the Use and Citations section of the documentation.
Fixes#
Fix bug where all extras triggered warning for installation of the
contribextra.float-like values are used in division forpyhf.writexml().Model.specnow supports building new models from existing models.\(p\)-values are now reported based on their quantiles, instead of interpolating test statistics and converting to \(p\)-values.
Namespace collisions between
uproot3anduproot/uproot4have been fixed for thexmlioextra.The
normsysmodifier now uses thepyhf.interpolators.code4interpolation method by default.The
histosysmodifier now uses thepyhf.interpolators.code4pinterpolation method by default.
Features#
Python API#
The
tensorlibAPI now supports atensorlib.to_numpyandtensorlib.ravelAPI.The
pyhf.infer.calculators.ToyCalculator()API has been added to support pseudoexperiments (toys).The empirical test statistic distribution API has been added to help support the
ToyCalculatorAPI.Add a
tolerancekwarg to the optimizer API to set afloatvalue as a tolerance for termination of the fit.The
pyhf.optimize.opt_minuit.minuit_optimizer()optimizer now can return correlations of the fitted parameters through use of thereturn_correlationBoolean kwarg.Add the
pyhf.utils.citationAPI to get astrof the preferred BibTeX entry for citation of the version ofpyhfinstalled. See the example for the CLI API for more information.The
pyhf.infer.hypotest()API now uses acalctypeargument to differentiate between using an asymptotic calculator or a toy calculator, and atest_statkwarg to specify which test statistic to use. It also relies more heavily on using kwargs to pass options through to the optimizer.The default
test_statkwarg forpyhf.infer.hypotest()and the calculator APIs is'qtilde', which corresponds to the alternative test statisticpyhf.infer.test_statistics.qmu_tilde().The return type of \(p\)-value like functions is now a 0-dimensional
tensor(with shape()) instead of afloat. This is required to support end-to-end automatic differentiation in future releases.
CLI API#
The CLI API now supports a
--citationor--citeoption to print the preferred BibTeX entry for citation of the version ofpyhfinstalled.
$ pyhf --citation
@software{pyhf,
author = {Lukas Heinrich and Matthew Feickert and Giordon Stark},
title = "{pyhf: v0.6.0}",
version = {0.6.0},
doi = {10.5281/zenodo.1169739},
url = {https://doi.org/10.5281/zenodo.1169739},
note = {https://github.com/scikit-hep/pyhf/releases/tag/v0.6.0}
}
@article{pyhf_joss,
doi = {10.21105/joss.02823},
url = {https://doi.org/10.21105/joss.02823},
year = {2021},
publisher = {The Open Journal},
volume = {6},
number = {58},
pages = {2823},
author = {Lukas Heinrich and Matthew Feickert and Giordon Stark and Kyle Cranmer},
title = {pyhf: pure-Python implementation of HistFactory statistical models},
journal = {Journal of Open Source Software}
}
Contributors#
v0.6.0 benefited from contributions from:
Alexander Held
Marco Gorelli
Pradyumna Rahul K
Eric Schanet
Henry Schreiner
v0.5.4#
This is a patch release from v0.5.3 → v0.5.4.
Fixes#
Require
uproot3instead ofuprootv3.Xreleases to avoid conflicts whenuproot4is installed in an environment withuprootv3.Xinstalled and namespace conflicts withuproot-methods. Adoption ofuproot3inv0.5.4will ensurev0.5.4works far into the future if XML and ROOT I/O through uproot is required.
Example:
Without the v0.5.4 patch release there is a regression in using uproot v3.X
and uproot4 in the same environment (which was swiftly identified and patched by the
fantastic uproot team)
$ python -m pip install "pyhf[xmlio]<0.5.4"
$ python -m pip list | grep "pyhf\|uproot"
pyhf 0.5.3
uproot 3.13.1
uproot-methods 0.8.0
$ python -m pip install uproot4
$ python -m pip list | grep "pyhf\|uproot"
pyhf 0.5.3
uproot 4.0.0
uproot-methods 0.8.0
uproot4 4.0.0
this is resolved in v0.5.4 with the requirement of uproot3
$ python -m pip install "pyhf[xmlio]>=0.5.4"
$ python -m pip list | grep "pyhf\|uproot"
pyhf 0.5.4
uproot3 3.14.1
uproot3-methods 0.10.0
$ python -m pip install uproot4 # or uproot
$ python -m pip list | grep "pyhf\|uproot"
pyhf 0.5.4
uproot 4.0.0
uproot3 3.14.1
uproot3-methods 0.10.0
uproot4 4.0.0
v0.5.3#
This is a patch release from v0.5.2 → v0.5.3.
Fixes#
Workspaces are now immutable
ShapeFactor support added to XML reading and writing
An error is raised if a fit initialization parameter is outside of its bounds (preventing hypotest with POI outside of bounds)
Features#
Python API#
Inverting hypothesis tests to get upper limits now has an API with
pyhf.infer.intervals.upperlimitBuilding workspaces from a model and data added with
pyhf.workspace.build
CLI API#
Added CLI API for
pyhf.infer.fit:pyhf fitpyhf combine now allows for merging channels:
pyhf combine --merge-channels --join <join option>Added utility to download archived pyhf pallets (workspaces + patchsets) to contrib module:
pyhf contrib download
Contributors#
v0.5.3 benefited from contributions from:
Karthikeyan Singaravelan