Repository navigation
Polish & robustness: validation guards, __all__, coverage gate, viz tests - #47
Merged
Merged
Conversation
DenoisingScoreMatching sigma>0, SlicedScoreMatching n_projections>=1, and classifier_two_sample_test (test_frac in (0,1), >=2 samples/set) — each previously could NaN silently while peer methods guarded. @torch.no_grad on ood_auroc to match the other eval metrics.
One-line docstrings for eight_gaussians/checkerboard/rings/spirals (parity with two_moons); explicit __all__ on datasets and viz to document the public surface (matching eval/nets).
Enforce coverage fail_under=90 (currently 96%); extend ruff to C4/PIE/PERF/RUF (ignoring the ambiguous-Unicode rules — the library uses σ/ε/ρ math notation on purpose) + per-file E731 for test lambdas; fix the handful of real lint nits (itertools.pairwise, unused unpack, dict-literals). Add tests for energy_contour/plot_samples/energy_histogram (the one coverage hole). Gitignore the stray ebmkit-blog-post.txt.
Merged
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.
Polish & robustness (non-breaking)
Second half of the cleanup — small correctness, consistency, and tooling wins from the API audit. No API changes, no version bump.
Robustness guards (each previously could NaN silently while peer methods guarded):
DenoisingScoreMatchingrejectssigma <= 0;SlicedScoreMatchingrejectsn_projections < 1;classifier_two_sample_testvalidatestest_frac ∈ (0,1)and ≥2 samples/set.@torch.no_grad()onood_aurocfor parity with the other eval metrics.Consistency & docs:
eight_gaussians/checkerboard/rings/spirals(parity withtwo_moons).__all__ondatasetsandviz(matchingeval/nets).Dev tooling:
fail_under = 90(actual 97.6%) so the badge is enforced against regressions.C4/PIE/PERF/RUF(ignoring the ambiguous-Unicode rules — the library uses σ/ε/ρ math notation on purpose) +per-file-ignoresfor test lambdas; fixed the few real nits (itertools.pairwise, unused unpack, dict-literals).ebmkit-blog-post.txt.Tests: added coverage for
energy_contour/plot_samples/energy_histogram(the one coverage hole) and the new guards.Verification: ruff + format + mypy clean; 157 tests pass; coverage 97.6%.
🤖 Generated with Claude Code