-
Notifications
You must be signed in to change notification settings - Fork 380
docs: consolidate pydantic Field descriptions with numpydoc Parameters (#1700) #2572
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
Open
anevolbap
wants to merge
10
commits into
pymc-labs:main
Choose a base branch
from
anevolbap:fix/1700-consolidate-pydantic-numpydoc
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 6 commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
80080d9
chore(docs): add autodoc-pydantic to docs extras
anevolbap 7aa451b
docs: wire autodoc-pydantic and consolidate HSGPKwargs description
anevolbap 9a0c5a9
docs(scaling): drop numpydoc Parameters duplicating Field descriptions
anevolbap a6f8ab3
Merge branch 'main' into fix/1700-consolidate-pydantic-numpydoc
anevolbap aff0763
docs(scaling): restore bold and Unicode multiplication sign in value …
anevolbap 95f3379
fix(docs): inject pydantic Parameters via autodoc-process-docstring
anevolbap 7fddded
docs: render pydantic Fields via autopydantic_model directive
anevolbap 0918c31
docs(budget-optimizer): wrap *budget_dims in literal RST
anevolbap 36b5239
docs: trim pydantic v1 aliases and skip Attributes block for pydantic…
anevolbap ee74c4f
Merge branch 'main' into fix/1700-consolidate-pydantic-numpydoc
anevolbap File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -46,24 +46,6 @@ class HSGPKwargs(BaseModel): | |
| .. [4] PyMC Example Gallery: `"Gaussian Processes: HSGP Advanced Usage" <https://www.pymc.io/projects/examples/en/latest/gaussian_processes/HSGP-Advanced.html>`_. | ||
| .. [5] PyMC Example Gallery: `"Baby Births Modelling with HSGPs" <https://www.pymc.io/projects/examples/en/latest/gaussian_processes/GP-Births.html>`_. | ||
| .. [6] Orduz, J. `"A Conceptual and Practical Introduction to Hilbert Space GPs Approximation Methods" <https://juanitorduz.github.io/hsgp_intro/>`_. | ||
|
|
||
| Parameters | ||
| ---------- | ||
| m : int | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Some of the rendering here: |
||
| Number of basis functions. Default is 200. | ||
| L : float, optional | ||
| Extent of basis functions. Set this to reflect the expected range of in+out-of-sample data | ||
| (considering that time-indices are zero-centered).Default is `X_mid * 2` (identical to `c=2` in HSGP). | ||
| By default it is None. | ||
| eta_lam : float | ||
| Exponential prior for the variance. Default is 1. | ||
| ls_mu : float | ||
| Mean of the inverse gamma prior for the lengthscale. Default is 5. | ||
| ls_sigma : float | ||
| Standard deviation of the inverse gamma prior for the lengthscale. Default is 5. | ||
| cov_func : CovFunc, optional | ||
| Covariance function enum. Supported values: ``ExpQuad``, ``Matern52``, ``Matern32``. | ||
| By default it is None (resolved to ``Matern52`` at model-build time). | ||
| """ # noqa E501 | ||
|
|
||
| m: int = Field(200, description="Number of basis functions") | ||
|
|
@@ -90,7 +72,11 @@ class HSGPKwargs(BaseModel): | |
| description="Standard deviation of the inverse gamma prior for the lengthscale", | ||
| ) | ||
| cov_func: CovFunc | None = Field( | ||
| None, description="Covariance function enum (ExpQuad, Matern52, Matern32)" | ||
| None, | ||
| description=( | ||
| "Covariance function enum. Supported values: ``ExpQuad``, ``Matern52``, " | ||
| "``Matern32``. ``None`` is resolved to ``Matern52`` at model-build time." | ||
| ), | ||
| ) | ||
|
|
||
| def to_dict(self) -> dict[str, Any]: | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will we need this?