From b8ff3380ec0fb01373c548eabb18b047d4e7749f Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Tue, 7 Feb 2023 00:22:35 +0000 Subject: [PATCH] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- demo.ipynb | 1 - examples/binning.ipynb | 3 +++ examples/cuts.ipynb | 1 + setup.cfg | 7 +------ src/neos/losses.py | 1 - src/neos/top_level.py | 2 +- 6 files changed, 6 insertions(+), 9 deletions(-) diff --git a/demo.ipynb b/demo.ipynb index 867cde3..7672ccd 100644 --- a/demo.ipynb +++ b/demo.ipynb @@ -427,7 +427,6 @@ " scale_factors: dict[str, float],\n", " include_bins: bool = True,\n", ") -> tuple[Array, dict[str, list]]:\n", - "\n", " loss = partial(\n", " pipeline,\n", " nn=nn,\n", diff --git a/examples/binning.ipynb b/examples/binning.ipynb index 7a2f92a..c42f267 100644 --- a/examples/binning.ipynb +++ b/examples/binning.ipynb @@ -668,6 +668,7 @@ "num_bins = 4\n", "pars = jnp.linspace(0, 8, num_bins + 1)\n", "\n", + "\n", "# differentiable significance pipeline\n", "def asimov_pipe(bins, s, b, bandwidth=1e-2):\n", " # restrict bin edges so they don't overlap during optimisation\n", @@ -732,6 +733,7 @@ "\n", "from copy import deepcopy\n", "\n", + "\n", "# specify the workspace for a simple model with a three-point background systematic\n", "def correlated_background(signal, bkg, bkg_up, bkg_down):\n", " spec = {\n", @@ -768,6 +770,7 @@ "\n", "from pyhf import interpolators\n", "\n", + "\n", "# pipeline to calculate the full CLs for the model, given a number of bins\n", "def pipe(num_bins):\n", " def cls_pipe(bins, s, b, bup, bdown, bandwidth=1e-2, skeleton_model=None):\n", diff --git a/examples/cuts.ipynb b/examples/cuts.ipynb index 48d56a4..395285d 100644 --- a/examples/cuts.ipynb +++ b/examples/cuts.ipynb @@ -341,6 +341,7 @@ "from jaxopt import OptaxSolver\n", "from optax import adam\n", "\n", + "\n", "# define something to minimise (1/significance)\n", "def loss(cut):\n", " s_weights = relaxed.cut(sig, cut, slope) + 1e-4\n", diff --git a/setup.cfg b/setup.cfg index e783631..7e5cfff 100644 --- a/setup.cfg +++ b/setup.cfg @@ -21,11 +21,6 @@ classifiers = Programming Language :: Python Programming Language :: Python :: 3 Programming Language :: Python :: 3 :: Only - Programming Language :: Python :: 3.6 - Programming Language :: Python :: 3.7 - Programming Language :: Python :: 3.8 - Programming Language :: Python :: 3.9 - Programming Language :: Python :: 3.10 Topic :: Scientific/Engineering project_urls = Documentation = https://neos.readthedocs.io/ @@ -41,7 +36,7 @@ install_requires = relaxed>=0.2.0 sklearn typing-extensions>=3.7;python_version<'3.8' -python_requires = >=3.6 +python_requires = >=3.7 include_package_data = True package_dir = =src diff --git a/src/neos/losses.py b/src/neos/losses.py index 1710b0e..78e545f 100644 --- a/src/neos/losses.py +++ b/src/neos/losses.py @@ -10,7 +10,6 @@ import jax.numpy as jnp import pyhf - import relaxed Array = jnp.ndarray diff --git a/src/neos/top_level.py b/src/neos/top_level.py index 0f64ccb..bdb234c 100644 --- a/src/neos/top_level.py +++ b/src/neos/top_level.py @@ -10,8 +10,8 @@ import jax.numpy as jnp import pyhf - import relaxed + from neos.losses import ( cls_value, discovery_significance,