Fix get_grid and cross_validation docstring inconsistencies#93
Open
kgdunn wants to merge 3 commits into
Open
Conversation
The form validator at src/scorepilot/api/exploration.py:108 accepts only "raw" or "scaled" (regex ^(raw|scaled)$), so the docstring's "autoscaled" was misleading. Docstring only; no behaviour change.
…m default The selectors are called without an explicit scale_inside_folds kwarg (src/scorepilot/core/cross_validation.py:274-283 for PCA, :321-330 for PLS), so ScorePilot relies on process_improve's default (scale_inside_folds=True, confirmed in process_improve's _pca.py:51 and _pls.py:927). Rewrite the docstring to honestly describe that we accept the default rather than passing the kwarg. No behaviour change.
Docs-only fixes to get_grid and cross_validation module docstrings.
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Two small, scoped docstring fixes. No behaviour change in either case.
Inconsistencies fixed
src/scorepilot/api/exploration.py:114—get_grid()docstring said "Return a windowed block of cells for the grid, raw or autoscaled.", but the form validator at:108accepts only"raw"or"scaled"(regex^(raw|scaled)$). Changed "autoscaled" -> "scaled" in the docstring; the regex and validator are untouched.src/scorepilot/core/cross_validation.py:34-38(module docstring) — claimed that the selectors re-fit the centring/scaling inside each training fold "(scale_inside_folds=True)", as if ScorePilot passed the kwarg. The actual calls at:274-283(PCA) and:321-330(PLS) never passscale_inside_folds. Verified againstprocess_improve(src/process_improve/multivariate/_pca.py:51and_pls.py:927):scale_inside_folds: bool = Trueis the upstream default, so the observed behaviour was correct but the docstring was misleading. Rewrote the sentence as "By default the selectors re-fit the centring/scaling inside each training fold (process_improve'sscale_inside_folds=Truedefault, which ScorePilot does not override)..." so the docstring honestly describes what actually happens.Other notes
0.22.1inpyproject.toml(PATCH — docs-only).uv.lockleft uncommitted per cross-repo Claude Code rules.uv run ruff check/uv run ruff formatclean on touched files.pyrightskipped because changes are docstrings + version only.Generated by Claude Code