Skip to content

docs: correct docstring drift in schemas, db models, transforms, and cross-validation - #103

Open
kgdunn wants to merge 5 commits into
mainfrom
claude/ecstatic-johnson-4p687n
Open

docs: correct docstring drift in schemas, db models, transforms, and cross-validation#103
kgdunn wants to merge 5 commits into
mainfrom
claude/ecstatic-johnson-4p687n

Conversation

@kgdunn

@kgdunn kgdunn commented Aug 14, 2026

Copy link
Copy Markdown
Owner

Docstrings only -- no runtime behavior changes.

Fixes

  • src/scorepilot/schemas.py (FitModelRequest): clarify that when auto_components=True, n_components is ignored; cross-validation picks the count via the selected selection_rule up to the hard-coded _AUTO_MAX_COMPONENTS = 20 ceiling in api/models.py.
  • src/scorepilot/db/models.py (Model): fix the params blob description to list the arrays actually saved by _pack_params -- x_loadings, explained_variance, r2_cumulative. Remove the inaccurate "P, W, means, scales" mention.
  • src/scorepilot/core/transforms.py (apply_transform Notes): correct the power note -- default is c1 = 0.0, and when zero, an effective exponent of 0.5 (signed root) is used.
  • src/scorepilot/core/cross_validation.py (_pls_curves docstring): rename selection_is_stable -> stable and selection_distribution -> vote_share to match the _Curves fields the function actually returns.

Verification

  • uv run ruff check . and uv run ruff format --check . both pass.
  • Version bumped to 0.22.1 (PATCH, docs-only).
  • uv.lock intentionally not committed (per repo policy for Claude Code sessions).

🤖 Generated with Claude Code


Generated by Claude Code

claude added 5 commits August 14, 2026 07:56
Clarify that FitModelRequest.auto_components=True IGNORES n_components; the
count is picked by cross-validation up to the hard-coded _AUTO_MAX_COMPONENTS
= 20 ceiling in api/models.py.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0132CNPVroNNG679mikPzqwc
List the arrays actually saved by _pack_params (x_loadings,
explained_variance, r2_cumulative) in the Model.params blob description.
Remove the inaccurate 'P, W, means, scales' mention.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0132CNPVroNNG679mikPzqwc
Correct the 'power' note in apply_transform: the default is c1 = 0.0, and
when zero, an effective exponent of 0.5 (signed root) is used.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0132CNPVroNNG679mikPzqwc
Rename selection_is_stable -> stable and selection_distribution -> vote_share
in _pls_curves Notes to match the _Curves fields actually returned.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0132CNPVroNNG679mikPzqwc
Docs-only PATCH bump for docstring corrections in schemas, db models,
transforms, and cross-validation.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0132CNPVroNNG679mikPzqwc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants