Code Monkey home page Code Monkey logo

pyhf-validation's People

Contributors

danikam avatar lgtm-com[bot] avatar matthewfeickert avatar pre-commit-ci[bot] avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

lgtm-migrator

pyhf-validation's Issues

Fixing parameters in pyhf and root fits

While doing the validation for the displaced slepton analysis, it was found that it would be helpful to fix the mu_Sig parameter to 0 to do a bkg-only fit when comparing the fitted nuisance params in compare_fitted_nuisance.py . To do so, the following mods were needed:

line 58: bestfit = pyhf.infer.mle.fit(data, model) --> bestfit = pyhf.infer.mle.fixed_poi_fit(0.0, data, model)

After line 25: workspace.var('mu_Sig').setVal(0.0)

Initial plans for pyhf-validation

Transferring some information and ideas from a developer chat with @kratsg:

  • Support CLI that will allow for
pyhf-validation spec.json

that will run pyhf cls over spec.json and additionally runs json2xml+hist2workspace+run_single.py on the resulting ROOT workspace from the HistFactory side.

  • Provide signatures of
delta, pyhf_out, hifa_out = pyhf-validation.run_validation("spec.json")
  • Support ROOT and PyROOT in automated testing
    • Maybe treat it as a soft dependency (try import ROOT; except foo)

bug: Test version is slow only on MacOS

In the CI

def test_version(script_runner):
command = "pyhf-validation --version"
start = time.time()
ret = script_runner.run(*shlex.split(command))
end = time.time()
elapsed = end - start
assert ret.success
assert hfval.__version__ in ret.stdout
assert ret.stderr == ""
# make sure it took less than a second
assert elapsed < 1.0

will often fail as it will take longer than 1 second for test_version to complete but only on MacOS. I am not sure why it is only MacOS, but this should be resolved.

c.f. PR #9

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.