Skip to content

Support Grain with Tfrecord in train_tokenizer#3522

Open
aireenmei wants to merge 1 commit intomainfrom
aireen/train_tokenizer_tfrecord
Open

Support Grain with Tfrecord in train_tokenizer#3522
aireenmei wants to merge 1 commit intomainfrom
aireen/train_tokenizer_tfrecord

Conversation

@aireenmei
Copy link
Copy Markdown
Collaborator

@aireenmei aireenmei commented Mar 30, 2026

Description

train_tokenizer.py already supports training with Grain in arrayrecord or parquet formats. Add support for tfrecord

Tests

Add TrainTokenizerFormatTest in tokenizer_test.py to test all 3 formats

Checklist

Before submitting this PR, please make sure (put X in square brackets):

  • I have performed a self-review of my code. For an optional AI review, add the gemini-review label.
  • I have necessary comments in my code, particularly in hard-to-understand areas.
  • I have run end-to-end tests tests and provided workload links above if applicable.
  • I have made or will make corresponding changes to the doc if needed, including adding new documentation pages to the relevant Table of Contents (toctree directive) as explained in our documentation.

@codecov
Copy link
Copy Markdown

codecov bot commented Mar 30, 2026

Codecov Report

❌ Patch coverage is 83.33333% with 2 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/maxtext/trainers/tokenizer/train_tokenizer.py 83.33% 1 Missing and 1 partial ⚠️

📢 Thoughts on this report? Let us know!

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