Skip to content

Studio fine-tuning queue: run the batch model probe behind the account's path guard - #15727

Merged
danielhanchen merged 2 commits into
mainfrom
studio-batch-probe-account-path-guard
Oct 28, 2026
Merged

danielhanchen merged 2 commits into
mainfrom
studio-batch-probe-account-path-guard

Conversation

@danielhanchen

Copy link
Copy Markdown
Member

When compatible OpenAI fine-tuning jobs are queued, _start_queued probes the head job's model (_trains_alone) to decide whether it can join a multi-LoRA batch. That probe ran with the raw model_name, before the account's path guard and outside the job's account context. A managed account could queue two batchable jobs whose model is a UNC path (\\host\share\model or //host/share/model); on a Windows host the probe's file checks then open that share, which makes the Studio service account sign in over SMB and hands its NetNTLM response to that host.

account_path already refuses share and device paths for managed accounts before touching the filesystem, and start_training applies it, but the batch probe ran first.

Fix

  • The probe calls account_path(model_name, reference = True) first. A path the account may not use makes the job train alone, so the normal single start refuses it with the usual 403.
  • _start_queued runs the probe under arun_as(entry.account, ...), so it sees the job's account rather than the drain loop's.

Owners, Desktop and notebooks are unaffected (account_path returns early for the owner). Managed accounts still batch Hub ids and workspace paths exactly as before. The check is a pure lookup, so repeated drains behave the same.

Tests

@danielhanchen danielhanchen self-assigned this Oct 28, 2026
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 28, 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-28T09:13:10.611168Z e4be9a4 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.

@danielhanchen

Copy link
Copy Markdown
Member Author

@codex review

1 similar comment
@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: e4be9a4904

ℹ️ 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 70ff76c into main Oct 28, 2026
@danielhanchen
danielhanchen deleted the studio-batch-probe-account-path-guard branch October 28, 2026 12:40
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.

1 participant