Skip to content

Studio: truncate completion_mask / assistant_masks with pre-tokenized input_ids - #14884

Merged
danielhanchen merged 13 commits into
mainfrom
dh/s3-pretokenized-mask-truncate
Oct 23, 2026
Merged

danielhanchen merged 13 commits into
mainfrom
dh/s3-pretokenized-mask-truncate

Conversation

@danielhanchen

Copy link
Copy Markdown
Member

Pre-tokenized datasets (#13816) are truncated to max_seq_length column by column, but only input_ids, attention_mask, labels and token_type_ids were truncated. Rows without labels keep TRL's collator when they carry completion_mask or assistant_masks, and TRL applies those masks to the labels, so a row longer than max_seq_length failed on its first step:

IndexError: The shape of the mask [1, 6] at index 1 does not match the shape of the indexed tensor [1, 4]
  • completion_mask and assistant_masks are now truncated with input_ids.
  • Like labels, they must have the same length as input_ids in every row; a mismatch is a clear ValueError before training instead of the error above.

Tests: 4 new cases in test_pretokenized_dataset.py (truncation and length check for both masks) fail on main and pass here; the pre-tokenized and token preview suites pass (52).

@danielhanchen

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 23, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-23T12:01:37.728810Z aee074a Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 27ea8e4a5c

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +61 to +64
for name in _LOSS_COLUMNS:
if name not in table.column_names:
continue
if not pc.all(pc.equal(lengths, pc.list_value_length(table.column(name)))).as_py():

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Validate loss-mask lengths for streamed datasets

When the pre-tokenized input is a datasets.IterableDataset (the supported dataset_streaming path), it has no Arrow .data, so _check_arrow_table is never called and this new length check never runs. _truncate then slices the masks independently; a short mask can still reach TRL with a different length and fail during collation, while some overlong malformed masks can be silently made equal by truncation. Validate each streamed batch against input_ids before slicing so the promised early ValueError applies consistently.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in f16c640: the streamed path now checks each batch's masks against input_ids before slicing, with the same ValueError. Test test_prepare_checks_streamed_loss_masks.

for name in _LOSS_COLUMNS:
if name not in table.column_names:
continue
if not pc.all(pc.equal(lengths, pc.list_value_length(table.column(name)))).as_py():

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Reject null values in loss-mask columns

When only some Arrow rows contain a mask, Hugging Face represents the missing values as nulls; pc.equal therefore returns null for those rows, and pc.all skips nulls by default. A column such as [[0, 1, 1], None] consequently passes this check and is returned unchanged when no truncation is needed, but TRL later attempts torch.tensor(None) and fails during collation. Treat a null comparison as a mismatch (or explicitly reject null list values) so every row is actually checked.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in f16c640: the mask comparison uses skip_nulls = False, so a row without the mask fails the check. Test test_prepare_rejects_a_row_without_its_loss_mask.

Comment on lines +61 to +64
for name in _LOSS_COLUMNS:
if name not in table.column_names:
continue
if not pc.all(pc.equal(lengths, pc.list_value_length(table.column(name)))).as_py():

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Skip loss-mask checks when explicit labels take precedence

For pre-tokenized datasets that already contain labels, Studio treats those labels as the complete objective (has_custom_labels disables response masking), and Unsloth's SFT preparation selects the labels-based collator rather than consuming completion_mask or assistant_masks. This unconditional loop newly rejects such datasets when an otherwise-unused mask metadata column has a different length, even though the same dataset trained correctly before this commit. Only require mask alignment when the corresponding mask can actually be used instead of explicit labels.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in f16c640: the mask checks only run when the dataset has no labels; with user labels the masks are unused and a dataset that trained before still does. Test test_prepare_ignores_unused_masks_next_to_user_labels. Truncation still applies to every token column.

…t missing rows, check streamed batches

[skip ci]
@danielhanchen

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Something went wrong. Try again later by commenting “@codex review”.

Unknown error
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@danielhanchen

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: f16c64041d

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +12 to +13
"completion_mask",
"assistant_masks",

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Exclude unused masks from labeled truncation

When an explicitly labeled dataset has an overlong row and an unused mask column whose Arrow type is null (for example, every completion_mask value is None) or scalar metadata, _checked_masks correctly skips validation but _truncate_arrow still passes that column to pc.list_slice, which raises ArrowNotImplementedError and aborts preparation. Such mask columns are ignored by the labels-based training path and were not sliced before this change, so omit them from the truncation columns whenever labels is present.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in f6723ae: with labels present the mask columns are left out of the truncation columns entirely, so a null or scalar mask column next to labels is passed through untouched as before. Test test_prepare_leaves_unused_null_masks_next_to_labels_alone (raised ArrowNotImplementedError before). The formatter bot's commit had also reformatted test_diffusion_learned_peaks.py, which this PR does not touch; that file is restored.

@danielhanchen

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: f6723aef1c

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".


def _checked_masks(columns) -> tuple:
# User labels are the whole objective: the masks are then unused and not checked.
return () if "labels" in columns else tuple(c for c in _MASK_COLUMNS if c in columns)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Respect completion-only mode before checking completion masks

When a pre-tokenized dataset has no labels but carries a completion_mask, this treats that mask as active unconditionally. Studio does not pass completion_only_loss into SFTConfig (studio/backend/core/training/trainer.py:4948-4964,5104-5113), so TRL resolves it to false for input_ids-only language-modeling data; the repository's own supervision logic therefore gates completion_mask on that flag (unsloth/models/rl.py:1555-1566). Consequently, stale or malformed completion-mask metadata that downstream ignores—and that previously trained on the full sequence—now raises here or fails during list_slice; pass the resolved mode into preparation or leave this column untouched when completion-only loss is disabled.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed, fixed in 92a2835. TRL only applies completion_mask when completion_only_loss resolves true, and with Studio leaving it unset that never happens for input_ids-only rows (TRL resolves None to "has prompt and completion columns", the same in 0.22.2 and 1.15). So checking the mask unconditionally rejected datasets that train fine. The mask checks now follow the same effective completion_only_loss the trainer uses: Studio passes its SFTConfig value in, an unset value resolves the way TRL resolves it, assistant_masks is still checked whenever present, and a mask the trainer ignores is left as it is. New tests cover stale completion masks with the flag unset or False (normal and streamed) and assistant_masks without the flag; tests/test_pretokenized_dataset.py: 34 passed.

@danielhanchen

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 92a2835714

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +27 to +28
if "labels" in columns:
return ()

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Remove or align masks beside explicit labels

When pre-tokenized rows contain explicit labels plus assistant_masks (or an enabled completion_mask), this early return excludes the active mask from both validation and truncation. TRL's collator constructs labels from the explicit column and then applies these masks on top, so truncating an overlong row can produce four-token IDs/labels alongside a six-token mask and fail during boolean indexing. Fresh evidence in the current tree is unsloth/models/rl.py:2991-3001, which likewise treats labels and active masks as intersecting supervision signals; either keep such masks aligned or remove them before they reach the collator.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed for TRL before 1.7, fixed in 9e31207. Up to 1.6 the collator takes the row's labels and then applies assistant_masks, and completion_mask under completion_only_loss, on top of them (trl v0.22.2 sft_trainer.py 200-250), so truncating ids and labels without the mask breaks the boolean index. From 1.7 the collator only reads labels, and TRL folds the masks in only when a dataset has no labels column (v1.15.0 sft_trainer.py 172 and 1405-1431), so there the masks beside user labels are unused. The masks beside user labels are now checked and truncated with the ids whenever the installed TRL's collator applies them, and left as they are on TRL 1.7 and later. New tests cover both mask names, in memory and streamed, plus the 1.7+ case; tests/test_pretokenized_dataset.py: 39 passed.

@danielhanchen

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 9e31207c6b

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +132 to +133
names = _column_names(dataset)
masks = _checked_masks(names, completion_only_loss)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Ignore mask columns hidden by the dataset format

When a Hugging Face dataset uses set_format(columns=["input_ids"], output_all_columns=False), column_names still includes backing columns that examples do not expose. Consequently, a hidden stale assistant_masks column is treated as active here and a length mismatch newly raises ValueError, even though TRL never receives or applies that mask. Determine active masks from the dataset's effective formatted columns rather than all backing columns.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed, fixed in b1417d9. Dataset.format["columns"] with output_all_columns = False is what the trainer's rows contain, while column_names still lists the backing columns (datasets 3.6.0 arrow_dataset.py 2437-2443, 4.8.5 2814-2820, 5.1.0 2806-2812). The pre-tokenized checks now read the active columns from the format, so a hidden mask or labels column is neither checked nor treated as active. The truncation pass also kept only the format type, which dropped the column selection and re-exposed hidden columns; it now restores the full format. With output_all_columns = True a mask is still checked, and IterableDataset has no column selection, so streaming is unchanged. New tests cover a hidden stale mask with truncation and the output_all_columns = True case; tests/test_pretokenized_dataset.py: 41 passed.

pre-commit-ci Bot and others added 2 commits October 23, 2026 09:57
Active columns follow Dataset.format (columns / output_all_columns), so a hidden
stale mask or labels column is neither checked nor applied, and the truncation
restores the full format so hidden columns stay hidden.

[skip ci]
chatgpt-codex-connector[bot]

This comment was marked as resolved.

…ck masks hidden by the format

TRL resolves an unset completion_only_loss once from the train split and uses it for
eval too. Hidden mask columns are still applied by TRL 0.22-0.26 (with_transform resets
the column selection) and 1.7+ (dataset.column_names plus map), so they are checked and
truncated as well.

[skip ci]
@danielhanchen

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 79c6466e75

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

# with_transform, and 1.7+ reads dataset.column_names and builds labels with map(), which sees them all.
masks = _checked_masks(getattr(dataset, "column_names", None) or names, completion_only_loss)
# A mask the trainer will not apply is left as it is (it may not even be a list).
columns = [c for c in _TOKEN_COLUMNS if (c in names and c not in _MASK_COLUMNS) or c in masks]

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Keep hidden labels aligned with truncated input IDs

When a map-style dataset uses set_format(columns=["input_ids"], output_all_columns=False) while retaining a backing labels column, this filters labels out of columns, so an overlong row gets four-token IDs but keeps its original labels. The TRL paths described immediately above re-expose backing columns, and its collator consumes labels whenever present, producing different input and target lengths and failing during training. Either remove labels that are intended to remain hidden before passing the dataset to TRL, or validate and truncate the backing label column alongside input_ids.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A labels column hidden by set_format never reaches the collator next to truncated input_ids. Studio trains through Unsloth's SFTTrainer, whose _prepare_dataset (unsloth_zoo sft_prepare_dataset) reads the formatted row (column_names = set(next(iter(dataset)).keys())) and does not call with_transform, so dataset[i] still yields only input_ids after prepare_pretokenized_dataset and the Trainer's remove_columns. When the zoo builds labels with map() on TRL 1.7+, it overwrites the hidden column from the already truncated input_ids, and the column stays hidden. Stock TRL behaves the same way. In 0.22.2, with_transform (sft_trainer.py:858-859) exposes the column, but truncate_dataset (sft_trainer.py:1015, data_utils.py:722-727) then slices every list column, labels included. In 1.x, the hidden labels column skips label building (sft_trainer.py:1411-1412) and is truncated together with input_ids (sft_trainer.py:1451-1454). No path pairs truncated input_ids with untruncated labels, so the column is left as it is.

… error

pc.list_value_length has no kernel for a null or scalar column, so such a mask raised
ArrowNotImplementedError instead of the documented ValueError. Check the column is
list-typed first.

[skip ci]
@unslothai unslothai deleted a comment from chatgpt-codex-connector Bot Oct 23, 2026
@unslothai unslothai deleted a comment from chatgpt-codex-connector Bot Oct 23, 2026
@unslothai unslothai deleted a comment from chatgpt-codex-connector Bot Oct 23, 2026
@danielhanchen

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: f04c52eb04

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

completion_only_loss = resolve_completion_only_loss(dataset, completion_only_loss)
# Masks are checked even when set_format hides them: TRL 0.22-0.26 re-exposes every column through
# with_transform, and 1.7+ reads dataset.column_names and builds labels with map(), which sees them all.
masks = _checked_masks(getattr(dataset, "column_names", None) or names, completion_only_loss)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Use effective labels when deciding whether masks are active

Under supported TRL >= 1.7, a map-style dataset can hide a backing labels column with set_format while still exposing assistant_masks. Passing the unfiltered backing column_names here makes _checked_masks see those hidden labels and skip the active mask, whereas Unsloth's dataset preparation inspects the formatted row, sees no labels, and builds labels from that mask. A short mask therefore bypasses validation and produces labels shorter than input_ids, failing during collation or training; use the effective names for the labels decision while discovering mask columns separately.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not changed. When set_format hides a labels column, the masks are not applied on TRL 1.7+ on either preparation path, so line 152 reading the backing column_names matches what training does. Unsloth's sft_prepare_dataset (unsloth_zoo/dataset_utils.py:3033-3051 on main) does build labels from the mask when the formatted row has no labels, but it writes them with dataset.map, and datasets' transmit_format (arrow_dataset.py:549 and :564 in datasets 3.6.0) keeps any column that was not formatted hidden after the map. So the rebuilt labels land in the hidden labels column and stay hidden, and the mask is removed. Reproduced: with input_ids [1,2,3,4], hidden labels and a 2-long assistant_masks, the row after that block is {'input_ids': [1, 2, 3, 4]}, and the short labels exist only in the hidden backing column. The collator then builds labels from input_ids (TRL v1.16.0 sft_trainer.py:171), so no short labels reach collation. TRL's own path (v1.16.0 sft_trainer.py:1411-1412) reads get_dataset_column_names, sees the hidden labels and skips the masks too. On TRL < 1.7 the labels check does not apply, since the collator applies the masks on top of labels (v0.22.2 sft_trainer.py:200-248). Using the effective names here would reject or rewrite a mask that no trainer reads.

Comment on lines +170 to +172
for ids, mask in zip(batch["input_ids"], batch[name]):
if mask is None or ids is None or len(mask) != len(ids):
raise _mask_error(name)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Reject scalar masks explicitly in streamed batches

For an IterableDataset whose active mask column contains scalar values, such as assistant_masks: 0, evaluating len(mask) raises an unhandled TypeError instead of the mask-specific ValueError produced for the same schema on the Arrow path. Validate that each streamed mask is list-like before taking its length so malformed streamed datasets receive the promised early, actionable error.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in aee074a. The streamed check (pretokenized.py:169-178) now turns the TypeError from len() on a scalar mask (None, int, float, bool, numpy scalar, 0-d array or tensor) into the same "'assistant_masks' must have the same length as 'input_ids'" ValueError the Arrow path raises. Lists, tuples, 1-d numpy arrays and torch tensors are still accepted and truncated. test_prepare_rejects_streamed_scalar_masks_with_the_mask_error covers scalar masks unformatted and under numpy and torch format and fails without the change; test_prepare_truncates_streamed_array_masks checks that numpy and torch masks still truncate.

@danielhanchen

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. 🚀

Reviewed commit: aee074a9c1

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@danielhanchen
danielhanchen merged commit 93c5b32 into main Oct 23, 2026
2 of 40 checks passed
@danielhanchen
danielhanchen deleted the dh/s3-pretokenized-mask-truncate branch October 23, 2026 17:40
danielhanchen added a commit that referenced this pull request Oct 23, 2026
…#15018)

`tests/test_source_read_encoding.py::test_checked_in_file_reads_name_an_encoding[8]`
fails on `main`, for example in `Repo tests (CPU, rest)` on #15009 and
#15010:

```
studio/backend/tests/test_pretokenized_dataset.py:313: read_text()
```

#14884 added a read of `core/training/trainer.py` with the platform
default encoding. This passes `encoding = "utf-8"`.

## Verification

- On `main`: `-k checked_in_file_reads` gives 1 failed, 15 passed.
- On this branch: 16 passed.
- `studio/backend/tests/test_pretokenized_dataset.py`: 56 passed.
danielhanchen added a commit that referenced this pull request Oct 25, 2026
Drops the earlier auto-format of unrelated unsloth/ and tests/ files (AST-equal) so the PR only touches Studio.

[skip ci]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant