Skip to content

refactor(mypy): un-ignore 5 easy-tier modules#293

Closed
lyskov-ai wants to merge 2 commits into
RosettaCommons:productionfrom
lyskov-ai:0004-ratchet-mypy-easy-modules
Closed

refactor(mypy): un-ignore 5 easy-tier modules#293
lyskov-ai wants to merge 2 commits into
RosettaCommons:productionfrom
lyskov-ai:0004-ratchet-mypy-easy-modules

Conversation

@lyskov-ai
Copy link
Copy Markdown
Contributor

Type-checking: fix the type errors in 5 modules and remove them from the [[tool.mypy.overrides]] ignore_errors list (18 → 13 remaining), so mypy now type-checks them. Each was a single pure-annotation / setattr fix — no behavior change.

Modules: foundry.callbacks.train_logging, foundry.callbacks.metrics_logging, foundry.common, foundry.hydra.resolvers, foundry.inference_engines.base.

Per-module details are in the commit message.

Fix each module's single pre-existing type error with a pure annotation
or setattr change (no behavior change) and remove it from the
[[tool.mypy.overrides]] ignore_errors list:

- callbacks/train_logging: loss_trackers: dict[str, MeanMetric]
- callbacks/metrics_logging: seen_examples: set[str]
- common: setattr(wrapper, "_has_run", True) for the @wraps wrapper
- hydra/resolvers: attribute_path: str | None (body already guards)
- inference_engines/base: base_overrides: dict[str, Any]

13 modules remain on the ignore list. mypy now type-checks the 5
newly-included modules cleanly.

Co-authored-by: Sergey Lyskov <sergey.lyskov@jhu.edu>
@lyskov-ai lyskov-ai requested a review from woodsh17 June 3, 2026 04:28
@woodsh17 woodsh17 force-pushed the 0004-ratchet-mypy-easy-modules branch from 64f0ec6 to a8380e5 Compare June 3, 2026 18:38
@woodsh17 woodsh17 closed this Jun 3, 2026
@woodsh17
Copy link
Copy Markdown
Member

woodsh17 commented Jun 3, 2026

The changes covered in this PR were already covered in PR #287 so there are no new changes from this PR, so I am closing it.

@lyskov-ai lyskov-ai deleted the 0004-ratchet-mypy-easy-modules branch June 3, 2026 22:06
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