fix(strategy): --data-rank help omits decaying-spectrum and misstates its default#229
Open
statxc wants to merge 1 commit into
Open
fix(strategy): --data-rank help omits decaying-spectrum and misstates its default#229statxc wants to merge 1 commit into
statxc wants to merge 1 commit into
Conversation
… its default storage.generate uses --data-rank for BOTH --fill lowrank and --fill decaying-spectrum, and its default is max(1, n//32) (floored so small n is never rank 0). The CLI help claimed only '--fill lowrank' and a bare 'n//32'. Correct the help and add pure-NumPy tests pinning that --data-rank sets the generated rank for both fills and that the default floors at 1.
2 tasks
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.
PR kind
Summary
The
--data-rankCLI help was inaccurate on two counts:storage.generateusesdata_rankfor both--fill lowrankand--fill decaying-spectrum(r = data_rank or max(1, n // 32)in each branch).default n//32, but the real default ismax(1, n//32)— floored so smalln(wheren//32 == 0) never produces a rank-0 / all-zero matrix.Empirically (pure NumPy, no GPU):
Fix
Correct the help to name both fills and the real
max(1, n//32)default, and add tests pinning the contract.Touches only
strategy/cli.pyand a new test — no protected paths.Validation
Checklist
Co-authored-byfooters for coding agents such as Cursor, Codex, Claude, Copilot, or similar tools.featPR — no scorecard required.