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

Documentation for parameter-related properties of _ModelConfig #1747

Closed
1 task done
alexander-held opened this issue Jan 20, 2022 · 1 comment · Fixed by #1972
Closed
1 task done

Documentation for parameter-related properties of _ModelConfig #1747

alexander-held opened this issue Jan 20, 2022 · 1 comment · Fixed by #1972
Assignees
Labels
docs Documentation related

Comments

@alexander-held
Copy link
Member

Summary

There are a few different things available in a model.config for accessing parameters:

  • model.config.parameters for an alphabetically sorted, non-expanded (staterror/shaperror) list,
  • model.config.par_order for a non-expanded list in the order that pyhf uses internally when handling and returning parameters,
  • model.config.par_names() for an expanded version of the list in the order used internally.

Only par_names() shows up in the _ModelConfig documentation at the moment. parameters presumably comes from the _ChannelSummaryMixin mixin, but I do not see this class in the documentation (if that was there, clicking through to it from the _ModelConfig page could be a convenient way to find additional properties coming from the base class).

model.config.parameters may not be that commonly needed, and could be obtained from model.config.par_order. The latter is very useful when using model.config.param_set().

See also #1024 for a few more points related to parameters vs par_order.

Documentation Page Link

https://pyhf.readthedocs.io/en/v0.6.3/_generated/pyhf.pdf._ModelConfig.html

Code of Conduct

  • I agree to follow the Code of Conduct
@alexander-held alexander-held added docs Documentation related needs-triage Needs a maintainer to categorize and assign labels Jan 20, 2022
@matthewfeickert matthewfeickert removed the needs-triage Needs a maintainer to categorize and assign label Jan 20, 2022
@matthewfeickert
Copy link
Member

Thanks @alexander-held — 100% agree with you here. 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Documentation related
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants