Skip to content

Chore/mypy quarantine v0.5.1 - #19

Merged
CanGeng merged 2 commits into
masterfrom
chore/mypy-quarantine-v0.5.1
Jun 26, 2026
Merged

Chore/mypy quarantine v0.5.1#19
CanGeng merged 2 commits into
masterfrom
chore/mypy-quarantine-v0.5.1

Conversation

@CanGeng

@CanGeng CanGeng commented Jun 26, 2026

Copy link
Copy Markdown
Owner

No description provided.

CanGeng added 2 commits June 27, 2026 04:31
…ped_defs ratchet; bump 0.5.1

B1: built a CPU-torch parity venv mirroring the CI types job (torch CPU +
.[dev] -c constraints.txt) to reproduce CI's mypy view locally, then cleared
all 12 quarantined modules to zero (95→0, env-invariant — parity venv AND
local nightly-torch both green). Removed the entire `ignore_errors` override.

The torch-stub batch diverges by error CODE across torch builds (nightly
attr-defined vs CPU-torch operator/return-value), so any coded `# type: ignore`
is unused in one env under warn_unused_ignores. Fixed env-invariantly: wrapped-
module / DeepSpeed-engine methods via `cast(Any, model).m(...)`; layer iterators
and ArchitectureProfile lambdas via `cast(Any, m).attr`; stateful `self._state`
narrowed with `assert ... is not None`; trainer `self.model: Any | None`
consumers asserted; artifact-store header/root/finalize (on the concrete
ArtifactStoreBase / subclass, not the read protocol) via targeted casts.

B2: enabled `check_untyped_defs = true`. The whole lighttrain/ package passes
with untyped bodies checked (0 new errors, incl. the 12 un-quarantined
modules); the ~358 untyped-body errors are all in tests/, opted out via a new
`tests.*` override (the next ratchet target).

asserts only restate existing invariants — zero runtime behavior change.

CanGeng
…KNOWN_ISSUES tombstone

New docs/changelog/v0/v0.5/v0.5.1.md documents the CPU-torch parity-venv
methodology, the B1 12→0 quarantine clear, and the B2 check_untyped_defs
ratchet. KNOWN_ISSUES.md: B1 moved to a one-line tombstone (→ v0.5.1); B2
updated to reflect production fully checked with tests/ remainder as the
next ratchet target.

CanGeng
@CanGeng
CanGeng merged commit 5a878e4 into master Jun 26, 2026
3 checks passed
@CanGeng
CanGeng deleted the chore/mypy-quarantine-v0.5.1 branch June 27, 2026 00:49
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.

1 participant