Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed May 9, 2023
1 parent 1ecf147 commit c3ec6f1
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 9 deletions.
1 change: 0 additions & 1 deletion demo.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
3 changes: 3 additions & 0 deletions examples/binning.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand Down
1 change: 1 addition & 0 deletions examples/cuts.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
7 changes: 1 addition & 6 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -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/
Expand All @@ -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
Expand Down
1 change: 0 additions & 1 deletion src/neos/losses.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@

import jax.numpy as jnp
import pyhf

import relaxed

Array = jnp.ndarray
Expand Down
2 changes: 1 addition & 1 deletion src/neos/top_level.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@

import jax.numpy as jnp
import pyhf

import relaxed

from neos.losses import (
cls_value,
discovery_significance,
Expand Down

0 comments on commit c3ec6f1

Please sign in to comment.