test(rf3): clear easy-tier mypy modules and add first unit tests#301
Open
lyskov-ai wants to merge 3 commits into
Open
test(rf3): clear easy-tier mypy modules and add first unit tests#301lyskov-ai wants to merge 3 commits into
lyskov-ai wants to merge 3 commits into
Conversation
Fixture-backed CPU unit tests for the pure symmetry geometry in rfd3.inference.symmetry: cyclic/dihedral frame generation, the framecoord <-> (R, t) round-trip, pack/unpack, Kabsch _align/_rms recovery, symmetry-id parsing, and contig-string expansion. New tests/rfd3/ dir, auto-collected by testpaths and kept separate from the cluster-only models/rfd3/tests/. No source or config changes. Co-authored-by: lyskov-ai <277346777+lyskov-ai@users.noreply.github.com>
Add models/rf3/src/rf3 to [tool.mypy].files and seed a fresh per-module ignore_errors ratchet listing the 26 rf3 modules with pre-existing errors (158 total), mirroring the rfd3 bootstrap. mypy now type-checks the 28 already-clean rf3 modules; the 26 are cleared slice-by-slice in follow-ups. Co-authored-by: lyskov-ai <277346777+lyskov-ai@users.noreply.github.com>
mypy: fix the 3 one-error rf3 modules (extra_xforms setattr, metrics_logging set[str], predict_and_score assert-narrow on run()'s dict|None return) and drop them from the ignore_errors ratchet (26 -> 23). Annotation/type-honesty only, no behavior change. tests: add tests/rf3/ first pass — 15 fixture-backed CPU unit tests pinning utils/frames.py (rigid_from_3_points proper-rotation/origin/batch /NA-branch, is_atom) and metrics/metric_utils.py (bin midpoints, unbin expectation, chain/interface masks, subsampled mean/min). Co-authored-by: lyskov-ai <277346777+lyskov-ai@users.noreply.github.com>
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.
Two rf3 changes:
data/extra_xforms.py,callbacks/metrics_logging.py,utils/predict_and_score.py) and remove them from the per-module ignore list, so they are now type-checked. Annotation / type-honesty only — no behavior change.tests/rf3/directory — 15 tests pinningutils/frames.py(rigid_from_3_points,is_atom) andmetrics/metric_utils.py(bin midpoints, logit unbinning, chain/interface masks, subsampled mean/min). Small inline fixtures — no data files, GPU, or checkpoints.