test(tinytorch): regression coverage for architecture module gaps - #3
Closed
Shashank-Tripathi-07 wants to merge 1 commit into
Closed
test(tinytorch): regression coverage for architecture module gaps#3Shashank-Tripathi-07 wants to merge 1 commit into
Shashank-Tripathi-07 wants to merge 1 commit into
Conversation
2 tasks
Covers convolutions, tokenization, embeddings, attention, and transformers: non-4D input validation for Conv2d/MaxPool2d/AvgPool2d, requires_grad propagation when neither operand needs gradients, BatchNorm2d's standalone pytest coverage, tokenize_dataset's default (no truncation) path, create_tokenizer's invalid-strategy error, Embedding's out-of-range and negative index validation, PositionalEncoding's four shape-validation checks, MultiHeadAttention's non-3D mask handling and embed_dim mismatch check, and LayerNorm's all-frozen requires_grad branch. Pure regression tests, no source or package files touched. Each test was verified against a clean origin/dev checkout before being added.
Shashank-Tripathi-07
force-pushed
the
mcdc-02-data-training
branch
from
August 14, 2026 23:36
5638f88 to
2263ab8
Compare
Shashank-Tripathi-07
force-pushed
the
mcdc-03-architecture
branch
from
August 14, 2026 23:36
2ad9cd2 to
49d0bb7
Compare
Shashank-Tripathi-07
changed the base branch from
mcdc-02-data-training
to
dev
August 14, 2026 23:37
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.
Summary
Adds regression tests for architecture module gaps found by an MC/DC audit: convolutions, tokenization, embeddings, attention, and transformers. Independent of the other companion PRs in this series (#1, #2, #4, #5), each covers a different module group and can be reviewed/merged in any order.
Covered gaps:
Conv2d/MaxPool2d/AvgPool2dConv2d'srequires_gradpropagation when neither operand needs gradientsBatchNorm2d's standalone pytest coverage (previously zero)tokenize_dataset's default no-truncation path,create_tokenizer's invalid-strategy errorEmbedding's out-of-range and negative index validationPositionalEncoding's four shape-validation checksMultiHeadAttention's non-3D mask handling andembed_dimmismatch checkLayerNorm's all-frozenrequires_gradbranchPure regression tests, no source or package files touched.
Test plan
pytest tests/09_convolutions tests/10_tokenization tests/11_embeddings tests/12_attention tests/13_transformers -qpasses locally, including all new cases