fix(strategy): expose --spectral-alpha for the decaying-spectrum fill#232
Open
ultrahighsuper wants to merge 1 commit into
Open
fix(strategy): expose --spectral-alpha for the decaying-spectrum fill#232ultrahighsuper wants to merge 1 commit into
ultrahighsuper wants to merge 1 commit into
Conversation
storage.generate takes a spectral_alpha knob (the k^-alpha singular-value decay for --fill decaying-spectrum), but the strategy CLI had no flag for it and runner.run/compare didn't thread it through, so every decaying-spectrum run was hardcoded to alpha=1.0 -- the only generate() parameter with no CLI path. Now that decaying-spectrum is a scored track (floor 0.90), contributors need to sweep the decay rate to see where a transform holds vs. degrades. Add --spectral-alpha (float, default 1.0, >= 0; negatives grow the tail and are rejected at the CLI boundary like --n/--data-rank) and thread it through runner.run/compare into storage.generate. End-to-end (N=512, M=48): --spectral-alpha 0.5 -> rel_err 0.70; 3.0 -> rel_err 0.004. Adds CLI-validation and pure-NumPy plumbing/effect tests. Fixes zeokin#231
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
storage.generatetakes aspectral_alphaknob (thek^-alphasingular-value decay for--fill decaying-spectrum), but the strategy CLI had no flag for it andrunner.run/runner.comparedidn't thread it through — so every decaying-spectrum run was hardcoded toalpha=1.0. It was the onlygenerate()parameter with no CLI path. Now that decaying-spectrum is a scored track (floor 0.90), contributors need to sweep the decay rate to see where a transform holds up vs. degrades.This adds
--spectral-alpha(float, default 1.0,>= 0; negatives grow the tail — not a decaying spectrum — and are rejected at the CLI boundary like--n/--data-rank) and threads it throughrunner.run/compareintostorage.generate.Fixes #231. Distinct from #229 (which only corrects the
--data-rankhelp text).Effect (GPU end-to-end, N=512, decaying-spectrum, M=48)
Steeper alpha packs more energy into the leading components, so the subspace method reconstructs it far better — exactly the axis this fill is meant to probe.
Validation (CPU-safe path)
The 2 failures pre-exist on clean
mainand are environment-only (Windows path-separator assertion ineval/tests/test_gpu_batch.py; fp16 in-core/tiled parity on a GTX 1650). New tests: negative--spectral-alphaexits cleanly (rc 2), the flag is parsed with default 1.0, and a larger alpha provably steepens the singular-value decay (pure NumPy).Scope
strategy/cli.py+strategy/runner.py+ tests only; open (non-protected) zone. Pure plumbing of an existing-but-unreachable knob; no behavior change at the defaultalpha=1.0.