Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Make p-value-like values 0-d tensors #1311

Merged
merged 8 commits into from
Feb 15, 2021

Conversation

matthewfeickert
Copy link
Member

@matthewfeickert matthewfeickert commented Feb 15, 2021

Description

Resolves #1268

Ensure all p-value-like values and test statistics are given as 0-d tensors and harmonize returns types across calculator types.

ReadTheDocs build: https://pyhf.readthedocs.io/en/fix-ensure-p-value-like-return-type/

Checklist Before Requesting Reviewer

  • Tests are passing
  • "WIP" removed from the title of the pull request
  • Selected an Assignee for the PR to be responsible for the log summary

Before Merging

For the PR Assignees:

  • Summarize commit messages into a comprehensive review of the PR
* Ensure p-value-like values and test statistics are all 0-d tensors for consistent return type
   - Update docstrings
* Harmonize return types from asymptotic and toy calculators

@matthewfeickert matthewfeickert added docs Documentation related fix A bug fix labels Feb 15, 2021
@matthewfeickert matthewfeickert self-assigned this Feb 15, 2021
@codecov
Copy link

codecov bot commented Feb 15, 2021

Codecov Report

Merging #1311 (79e7a34) into master (ae9e39c) will increase coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #1311   +/-   ##
=======================================
  Coverage   97.49%   97.50%           
=======================================
  Files          63       63           
  Lines        3758     3760    +2     
  Branches      537      538    +1     
=======================================
+ Hits         3664     3666    +2     
  Misses         55       55           
  Partials       39       39           
Flag Coverage Δ
unittests 97.50% <100.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
src/pyhf/infer/utils.py 100.00% <ø> (ø)
src/pyhf/infer/calculators.py 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update ae9e39c...79e7a34. Read the comment docs.

@matthewfeickert
Copy link
Member Author

cc @alexander-held for feedback on any downstream problems with this.

@alexander-held
Copy link
Member

cc @alexander-held for feedback on any downstream problems with this.

Thanks! cabinetry currently does not use infer.calculators directly, so this has no direct impact and all tests run fine.

@kratsg kratsg merged commit 3193be5 into master Feb 15, 2021
@kratsg kratsg deleted the fix/ensure-p-value-like-return-type branch February 15, 2021 16:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Documentation related fix A bug fix
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Ensure consistent return type of CLs-like / p-value-like values
3 participants