Chore/b2 check untyped defs v0.5.2 - #20
Merged
Merged
Conversation
…→0), drop opt-out; bump 0.5.2 B2 finale: cleared the tests/ untyped-function-body type debt that v0.5.1 deferred behind the `tests.*` override, then removed the override entirely. check_untyped_defs now covers the whole repo (lighttrain/ + tests/). 358 → 0 across 80 test files / 8 directories. Authority = the CPU-torch parity venv (= CI types view); env-invariant (parity venv AND local nightly both green). annotation-first: narrow-inferred locals/literals annotated (collator sample lists as list[Mapping[str, Any]], empty dict/list literals, var-annotated sites, test-fake attrs); 47 `assert ... is not None` for known-non-None Optional access (trainer.model/value-head, Path|None before ZipFile/read_text, dict|None / Tensor|None indexing, EvalReport|None). Targeted `# type: ignore` only where annotation cannot express intent: method-assign monkeypatching (49), intentional wrong-type coercion/validation tests, duck-typed test doubles, dynamic RootConfig|DictConfig fields, captured -> None returns. Production annotation fix (behavior-preserving): LengthGroupedSampler / CurriculumSampler `__iter__` return `Iterable[int]` → `Iterator[int]` (bodies already `return iter(...)`); only the tests' `iter(sampler)`/`list(sampler)` exercised it — one fix cleared 26 test errors. asserts only restate existing invariants — zero runtime behavior change. CanGeng
…er now empty New v0.5.2.md documents the tests/ check_untyped_defs clear (358→0, annotation-first) and the opt-out removal. KNOWN_ISSUES.md: B2 moved to a tombstone (→ v0.5.1 production + v0.5.2 tests); the Open ledger is now empty — every issue from the historical changelog audit is resolved or dismissed. CanGeng
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.
No description provided.