[PR #1279] [MERGED] Fix #1256 refactor Token Constants, test vocab init/build behaviour #9930

Closed
opened 2026-05-08 10:56:00 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/harvard-edge/cs249r_book/pull/1279
Author: @asgalon
Created: 3/23/2026
Status: Merged
Merged: 3/24/2026
Merged by: @profvjreddi

Base: devHead: feature/feature-1256


📝 Commits (1)

  • d638eee Fix #1256 refactor Token Constants, test vocab init/build behaviour

📊 Changes

1 file changed (+69 additions, -62 deletions)

View changed files

📝 tinytorch/src/10_tokenization/10_tokenization.py (+69 -62)

📄 Description

Changes made:

  • Extracted constants into Tokenizer for special tokens and
  • Modified test_unit_char_tokenizer() to check expected behaviour build_vocab overwriting init vocabulary
  • adjusted documentation to constant use

By submitting this PR, you agree to release your contribution under the project's CC-BY-NC-ND license.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/harvard-edge/cs249r_book/pull/1279 **Author:** [@asgalon](https://github.com/asgalon) **Created:** 3/23/2026 **Status:** ✅ Merged **Merged:** 3/24/2026 **Merged by:** [@profvjreddi](https://github.com/profvjreddi) **Base:** `dev` ← **Head:** `feature/feature-1256` --- ### 📝 Commits (1) - [`d638eee`](https://github.com/harvard-edge/cs249r_book/commit/d638eeea49bb2d1281641e86428e05009aa84ef2) Fix #1256 refactor Token Constants, test vocab init/build behaviour ### 📊 Changes **1 file changed** (+69 additions, -62 deletions) <details> <summary>View changed files</summary> 📝 `tinytorch/src/10_tokenization/10_tokenization.py` (+69 -62) </details> ### 📄 Description Changes made: - Extracted constants into Tokenizer for special tokens <UNK> and </w> - Modified test_unit_char_tokenizer() to check expected behaviour build_vocab overwriting init vocabulary - adjusted documentation to constant use --- *By submitting this PR, you agree to release your contribution under the project's CC-BY-NC-ND license.* --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-05-08 10:56:00 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/cs249r_book#9930