Skip to content

Studio: keep Start Export off for a Hub push until the repo is named - #13651

Merged
danielhanchen merged 3 commits into
unslothai:mainfrom
NilayYadav:export-hub-require-repo
Oct 14, 2026
Merged

danielhanchen merged 3 commits into
unslothai:mainfrom
NilayYadav:export-hub-require-repo

Conversation

@NilayYadav

@NilayYadav NilayYadav commented Oct 13, 2026 •

Copy link
Copy Markdown
Collaborator

On the Export page, choosing Push to Hub and leaving Username / Org or Model Name empty still let Start Export run. Studio then loaded the model and wrote the full merged or GGUF export to disk, which can take many minutes, and only at the end failed with "Repository ID and Hugging Face token required for Hub upload".

Start Export now stays disabled for a Hub push until both boxes are filled, and a short line under them says what is missing. Saving locally and decision model exports are unchanged.

Before / after

Export page, Merged Model, Export Model, Push to Hub with Username / Org and Model Name left blank. Before: Start Export is enabled. After: Start Export is disabled and the hint below the boxes says what is missing. Once both boxes are filled, Start Export is enabled on both builds.

Push to Hub with the repo boxes blank, before and after

@NilayYadav

Copy link
Copy Markdown
Collaborator Author

@codex review

1 similar comment
@NilayYadav

Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 13, 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-14T16:29:11.037579Z 6dba297 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. Another round soon, please!

Reviewed commit: 8efc234231

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

@NilayYadav NilayYadav left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Review + reproduction evidence

Pinned review: 8efc234231. No blocking findings.

I reproduced a Push to Hub export with Username / Org and Model Name left empty on fresh upstream main (Linux, NVIDIA L4, Chromium 1360x1000), using unsloth/Llama-3.2-1B-Instruct with Merged Model 16-bit:

  • main cc7e8aa: Start Export is enabled with both boxes empty. Clicking it loads the model (POST /api/export/load-checkpoint 83.9 s) and writes the full 16-bit export to exports/unsloth-Llama-3.2-1B-Instruct-merged. Then POST /api/export/export/merged returns 400 and the panel ends in "Repository ID and Hugging Face token required for Hub upload", Failed after 1m 28s.
  • PR head 8efc234: in the same state, Start Export is disabled and "Enter a Username / Org and Model Name to push to the Hub." shows under the boxes. A click sends no /api/export request. It stays disabled with only Username filled, with only Model Name filled, and with spaces in both. It becomes enabled once both are filled.

PR 13651 before/after

  • Frontend checks on upstream main merged with this PR: i18n:check:strict, typecheck, npm test (12072 pass, 0 fail) and build are all green. With the two source files put back to main and the new test kept, npm test fails exactly 1 test: a Hub push cannot start until Username / Org and Model Name are filled (actual <button>Start Export</button>).
  • Unchanged on both sides: Save Locally starts and completes (62.2 s on main, 54.1 s on the PR), a Hub push with both boxes filled starts the run as before, and decision model exports are not gated. Same results in Chromium, WebKit and Firefox.

Conclusion: the issue is real and this fixes it at the button and in the start handler, without touching local or decision exports. It is ready once the queued upstream CI finishes.

@danielhanchen

Copy link
Copy Markdown
Member

@codex review

1 similar comment
@danielhanchen

Copy link
Copy Markdown
Member

@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: 6a1c81c0e2

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

const checkpointPath = selectedCp?.path ?? null;

const pushToHub = destination === "hub";
if (pushToHub && !isDecision && (!hfUsername.trim() || !modelName.trim()))

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 Normalize repository fields before starting export

When either field has surrounding whitespace (for example a pasted alice ), this guard treats it as present, but the later repoId construction uses the untrimmed hfUsername and modelName. That raw ID reaches HfApi.create_repo, which rejects the spaces only after the merged/GGUF artifact has been written, recreating the expensive late failure this change is intended to prevent; trim the components when constructing the ID (or reject non-normalized values before runExport).

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Fixed in 6dba297: the repo id is now built from the trimmed Username / Org and Model Name.

danielhanchen pushed a commit to danielhanchen/unsloth-staging-2 that referenced this pull request Oct 14, 2026
@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. Hooray!

Reviewed commit: 6dba2976af

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

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