Skip to content

chore: clean-up - #15680

Merged
kgryte merged 3 commits into
developfrom
claude/cool-johnson-f3vqhs
Sep 30, 2026
Merged

kgryte merged 3 commits into
developfrom
claude/cool-johnson-f3vqhs

Conversation

@Planeshifter

Copy link
Copy Markdown
Member

Description

What is the purpose of this pull request?

This pull request:

  • corrects a stale enumeration example in ml/base/sgd/loss-functions and completes the penalty value lists in two ml/base/sgd/penalty-resolve-* benchmarks, bringing both in line with their siblings.

@stdlib/ml/base/sgd/loss-functions

The lib/enum.js JSDoc note cited HINGE == 0, but the enumeration maps epsilon-insensitive to 0 (hinge is 1), as does STDLIB_ML_SGD_EPSILON_INSENSITIVE = 0 in loss_functions.h. The example now reads EPSILON_INSENSITIVE == 0, matching the member actually mapped to zero in 8/9 (89%) sibling packages carrying the note.

@stdlib/ml/base/sgd/penalty-resolve-enum

The string and integer value lists in benchmark/benchmark.js omitted none. Adds none so the benchmarks cover every supported penalty, as 10/12 (83%) sibling benchmarks enumerating a value set do, including penalty-enum2str and penalty-str2enum.

@stdlib/ml/base/sgd/penalty-resolve-str

Same omission and same fix as penalty-resolve-enum: none added to both value lists in benchmark/benchmark.js (10/12 siblings, 83%).

Related Issues

Does this pull request have any related issues?

No.

Questions

Any questions for reviewers of this pull request?

The test/test.js value lists in penalty-resolve-enum and penalty-resolve-str also omit none. Test updates were out of scope for this change; they are a candidate for a follow-up.

Other

Any other information relevant to this pull request? This may include screenshots, references, and/or implementation notes.

Namespace summary. ml/base/sgd: 15 packages, none autogenerated. Features analyzed: file tree, package.json key sets (top-level, scripts, directories), README section headings, manifest.json keys, test/benchmark/example file names, public signature, return kind, validation prologue, error construction, JSDoc shape, and source dependencies. Every structural and semantic feature had a clear majority (≥75%, 12/15). The only structural deviations are in learning-rates, loss-functions, and penalties, which alone carry include/, lib/data.json, lib/enum.js, manifest.json, and a "C APIs" README section. They are the enumeration/C-header packages, so these files are intentional and were left alone. README ## Notes (6/15) has no clear majority and was excluded.

Validation. Structural features were extracted from the filesystem. Semantic features were extracted from lib/main.js and lib/index.js by normalizing across the three families (learning rate, loss function, penalty). Each candidate went through three separate reviews (semantic intent, cross-referencing tests and docs, and structural applicability), and all three confirmed drift for both candidates. Deliberately excluded: intentional deviations (enum-table packages), test changes, and features without a clear majority. No public behavior changes: one edit is to a JSDoc comment, the rest are to benchmark inputs. I checked that resolve( 'none' ) and resolve( str2enum( 'none' ) ) return values that pass each benchmark's existing type assertions.

Checklist

Please ensure the following tasks are completed before submitting this pull request.

AI Assistance

When authoring the changes proposed in this PR, did you use any kind of AI assistance?

  • Yes
  • No

If you answered "yes" above, how did you use AI assistance?

  • Code generation (e.g., when writing an implementation or fixing a bug)
  • Test/benchmark generation
  • Documentation (including examples)
  • Research and understanding

Disclosure

If you answered "yes" to using AI assistance, please provide a short disclosure indicating how you used AI assistance. This helps reviewers determine how much scrutiny to apply when reviewing your contribution. Example disclosures: "This PR was written primarily by Claude Code." or "I consulted ChatGPT to understand the codebase, but the proposed changes were fully authored manually by myself.".

This PR was written primarily by Claude Code, as part of an automated check for drift between packages in the same namespace, using a majority vote across sibling packages.


@stdlib-js/reviewers

🤖 Generated with Claude Code

https://claude.ai/code/session_01T5eqmcfD2xBYKR3EwFfPx1


Generated by Claude Code

The JSDoc note in `lib/enum.js` cited `HINGE == 0`, but the enumeration
maps `epsilon-insensitive` to `0` and `hinge` to `1`, as does
`STDLIB_ML_SGD_EPSILON_INSENSITIVE = 0` in the C header. Corrected the
example to `EPSILON_INSENSITIVE == 0`, matching the member mapped to 0
(8/9 sibling packages carrying this note, 89%).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01T5eqmcfD2xBYKR3EwFfPx1
…m` benchmarks

Added `none` to the string and integer value lists in
`benchmark/benchmark.js`, so the benchmarks cover every supported
penalty, as the `penalty-enum2str` and `penalty-str2enum` benchmarks do
(10/12 sibling benchmarks enumerate the full value set, 83%).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01T5eqmcfD2xBYKR3EwFfPx1
…` benchmarks

Added `none` to the string and integer value lists in
`benchmark/benchmark.js`, so the benchmarks cover every supported
penalty, as the `penalty-enum2str` and `penalty-str2enum` benchmarks do
(10/12 sibling benchmarks enumerate the full value set, 83%).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01T5eqmcfD2xBYKR3EwFfPx1
@stdlib-bot

Copy link
Copy Markdown
Contributor

Coverage Report

Package Statements Branches Functions Lines
ml/base/sgd/loss-functions $\\color{green}163/163$
$\\color{green}+100.00\\%$
$\\color{green}5/5$
$\\color{green}+100.00\\%$
$\\color{green}2/2$
$\\color{green}+100.00\\%$
$\\color{green}163/163$
$\\color{green}+100.00\\%$
ml/base/sgd/penalty-resolve-enum $\\color{green}97/97$
$\\color{green}+100.00\\%$
$\\color{green}9/9$
$\\color{green}+100.00\\%$
$\\color{green}1/1$
$\\color{green}+100.00\\%$
$\\color{green}97/97$
$\\color{green}+100.00\\%$
ml/base/sgd/penalty-resolve-str $\\color{green}96/96$
$\\color{green}+100.00\\%$
$\\color{green}9/9$
$\\color{green}+100.00\\%$
$\\color{green}1/1$
$\\color{green}+100.00\\%$
$\\color{green}96/96$
$\\color{green}+100.00\\%$

The above coverage report was generated for the changes in this PR.

@kgryte
kgryte marked this pull request as ready for review September 30, 2026 09:24
@kgryte
kgryte requested a review from a team September 30, 2026 09:24
@kgryte kgryte changed the title docs: fix enumeration example in ml/base/sgd/loss-functions and add missing none penalty to benchmarks chore: clean-up Sep 30, 2026
@kgryte
kgryte merged commit ec5c016 into develop Sep 30, 2026
20 checks passed
@kgryte
kgryte deleted the claude/cool-johnson-f3vqhs branch September 30, 2026 09:25
@stdlib-bot stdlib-bot added Needs Review A pull request which needs code review. and removed Needs Review A pull request which needs code review. labels Sep 30, 2026
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.

4 participants