Skip to content

Studio: fix embedding fine-tunes failing at the first step - #17311

Merged
danielhanchen merged 4 commits into
unslothai:mainfrom
NilayYadav:embedding-training-nested-gather
Nov 10, 2026
Merged

danielhanchen merged 4 commits into
unslothai:mainfrom
NilayYadav:embedding-training-nested-gather

Conversation

@NilayYadav

Copy link
Copy Markdown
Collaborator

Every embedding fine-tune in Studio fails at step 0 with "'SentenceTransformerTrainer' object has no attribute '_nested_gather'". Studio installs transformers 5.5.0, which removed that method, but still pins sentence-transformers 5.2.0, which calls it.

This moves the pin to sentence-transformers 5.2.3, the patch release for transformers 5.2 and newer. Python 3.9 installs keep 5.1.2. Embedding runs now train, log and save checkpoints on Linux and macOS.

Before and after

all-MiniLM-L6-v2, LoRA, sentence-transformers/all-nli, 30 steps.

Before (main) After (this branch)
before after

@NilayYadav

Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 9, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

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

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-10T11:11:20.459925Z 0a7bbb8 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

Copy link
Copy Markdown

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

Reviewed commit: 7f1cac42e4

ℹ️ 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

@codex review

1 similar comment
@danielhanchen

Copy link
Copy Markdown
Member

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Chef's kiss.

Reviewed commit: 0a7bbb8c61

ℹ️ 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 f39389b into unslothai:main Nov 10, 2026
danielhanchen added a commit that referenced this pull request Nov 11, 2026
…-transformers pin scan (#17547)

## Summary

`Repo tests (CPU, studio-install)` can fail on any PR, depending on what
runs at the same time on the other xdist workers (seen on #17533):

```
tests/studio/install/test_sentence_transformers_pin.py:47: in test_pinned_sentence_transformers_can_log_with_the_pinned_transformers
E   FileNotFoundError: [Errno 2] No such file or directory: '.../studio/backend/requirements/single-env/.data-designer-deps-filtered-bpfrp0a_.txt'
```

`install_python_stack._filter_requirements` writes a hidden
`.<stem>-filtered-*.txt` copy beside its source file, so relative
`-r`/`-c` lines still resolve, and the installer deletes it again
afterwards. Tests that drive the installer do this inside the repo's own
`studio/backend/requirements` tree. The pin test added in #17311 walks
that tree with `rglob("*.txt")` and reads every match, so when another
worker's copy disappears between the walk and the read, it fails.

The installer is right to put the copy there, and the pin check itself
is right. The scan just has to ignore those copies, the same way its
sibling scans already do (`test_transformers_tokenizers_pair.py` skips
dot-named files, and `test_diffusers_pin.py` skips the `-filtered-`
pattern).

## Change

- `tests/studio/install/test_sentence_transformers_pin.py`: the scan now
goes through a `_requirement_files()` helper that skips dot-named files.
- New `test_a_filtered_copy_vanishing_mid_scan_is_not_read`: it plants a
dangling `.data-designer-deps-filtered-*.txt` link (a copy deleted
mid-scan) next to a real file and checks that the scan skips it. Without
the skip, that test fails with the CI error.

No library code changes.

## Testing

- `test_sentence_transformers_pin.py`,
`test_transformers_tokenizers_pair.py`, `test_diffusers_pin.py`: 76
passed.
- With the skip removed,
`test_a_filtered_copy_vanishing_mid_scan_is_not_read` fails.
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.

2 participants