Strict type-checking + tests for foundry.utils (instantiators, ddp, logging); remove dead rf3.data.paired_msa#322
Open
lyskov-ai wants to merge 3 commits into
Conversation
instantiators is already fully annotated, so this adds it to the per-module strict mypy override (a lock-in for future defs) and fills the test gap with tests/test_instantiators.py covering the callback/logger instantiation control flow. Co-authored-by: lyskov-ai <277346777+lyskov-ai@users.noreply.github.com>
…st logging Adds the three remaining small foundry.utils modules to the per-module strict mypy override. squashfs was already fully annotated (pure lock-in); ddp needed one annotation (RankedLogger.log varargs); logging needed five. New tests/test_logging.py covers the two pure helpers (CachedDataFilter.filter and condense_count_columns_of_grouped_df). Co-authored-by: lyskov-ai <277346777+lyskov-ai@users.noreply.github.com>
rf3.data.paired_msa no longer imports against the installed atomworks: MultiInputDatasetWrapper subclasses StructuralDatasetWrapper, which atomworks turned into a deprecated factory function, so subclassing it raises TypeError at import. The module was reachable only through domain_distillation.yaml, which is itself referenced only in commented-out lines of pdb_and_distillation.yaml, and its LoadPairedMSAs class was used nowhere. Remove the module, its orphaned domain_distillation.yaml config, the dangling commented references in pdb_and_distillation.yaml, and the stale pyproject mypy-exemption comment. rf3 now type-checks fully with no in-file suppressions. 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.
Continues bringing the shared
foundry.utilslayer under strict type-checking with unit tests, and removes a dead module inrf3.Type stubs + tests (foundry.utils)
instantiators— added unit tests covering the hydra instantiation control flow (callbacks/loggers,None/empty handling, missing-_target_errors) and tightened it to strict type-checking. Already fully annotated, so this is a strictness lock-in.ddp/squashfs/logging— tightened to strict type-checking and added the missing annotations (RankedLogger.log,CachedDataFilter.filter, warning/print helpers). New tests forlogging's two pure helpers (CachedDataFilter.filter,condense_count_columns_of_grouped_df). The rest of these modules is side-effecting glue (Rich output, subprocess mounts, rank state) and is intentionally left untested.Remove dead code (rf3)
rf3.data.paired_msa. It subclassedStructuralDatasetWrapper, which the installedatomworksnow exposes as a factory function rather than a class, so the module raisedTypeErroron import. It was reachable only through a dataset config that is itself referenced solely from commented-out lines, so it was dead in practice. Removed the module, its orphaneddomain_distillation.yamlconfig, the dangling commented references to it, and the now-stale type-checker exemption comment.With this, all of
rf3type-checks with no in-file suppressions.