Skip to content

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
RosettaCommons:productionfrom
lyskov-ai:0041-remove-rf3-paired-msa
Open

Strict type-checking + tests for foundry.utils (instantiators, ddp, logging); remove dead rf3.data.paired_msa#322
lyskov-ai wants to merge 3 commits into
RosettaCommons:productionfrom
lyskov-ai:0041-remove-rf3-paired-msa

Conversation

@lyskov-ai

Copy link
Copy Markdown
Contributor

Continues bringing the shared foundry.utils layer under strict type-checking with unit tests, and removes a dead module in rf3.

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 for logging'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)

  • Deleted rf3.data.paired_msa. It subclassed StructuralDatasetWrapper, which the installed atomworks now exposes as a factory function rather than a class, so the module raised TypeError on 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 orphaned domain_distillation.yaml config, the dangling commented references to it, and the now-stale type-checker exemption comment.

With this, all of rf3 type-checks with no in-file suppressions.

lyskov and others added 3 commits June 16, 2026 19:43
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>
@lyskov-ai lyskov-ai requested a review from woodsh17 June 16, 2026 19:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants