Skip to content

Studio: show disk space in the same GB as model sizes - #11150

Merged
Lyxot merged 3 commits into
unslothai:mainfrom
NilayYadav:studio-disk-space-decimal-gb
Sep 17, 2026
Merged

Lyxot merged 3 commits into
unslothai:mainfrom
NilayYadav:studio-disk-space-decimal-gb

Conversation

@NilayYadav

Copy link
Copy Markdown
Collaborator

Model cards show sizes in decimal GB, but the "not enough disk space" messages, the folders dialog and the download toast divided by 1024 and still said GB. A 1.8 GB model was refused with "need about 1.7 GB", so the numbers never matched.

All of these now use decimal GB. Memory and VRAM math is untouched.

Tested with new unit tests and on a live Studio: the folders dialog matches the real free space, and a refused download now reports the same size the card shows.

@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 Sep 16, 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-09-16T20:58:20.978515Z 57b59c4 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. Nice work!

Reviewed commit: 57b59c4079

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

The unit change lines up with the decimal formatBytes already used in studio/frontend/src/features/hub/lib/format.ts, but this branch also reflows unrelated code in studio/backend/main.py, test_bootstrap_banner_password_visibility.py and tests/studio/playwright_queue_localization.py. Could you drop those reformatting hunks so the diff is only the GB change?

@Lyxot Lyxot self-assigned this Sep 17, 2026
NilayYadav and others added 2 commits September 17, 2026 10:29
…es in decimal GB

Settings > Resources rendered the download folder's free space in GiB, so it disagreed with the on-device folders dialog for the same value, and the training start overlay divided download bytes by 1024 but labelled them GB. Both now use the Hub byte formatter. The disk refusal test uses a free size that differs between GB and GiB and checks the exit code.
@Lyxot
Lyxot force-pushed the studio-disk-space-decimal-gb branch from edbc945 to 551248d Compare September 17, 2026 02:57
@Lyxot

Lyxot commented Sep 17, 2026

Copy link
Copy Markdown
Collaborator

Pushed an update:

  • Rebased on main and dropped the pre-commit.ci commit, so the unrelated reformatting in main.py, test_bootstrap_banner_password_visibility.py and playwright_queue_localization.py is gone (@danielhanchen).
  • Settings > Resources showed the download folder's free space in GiB, which disagreed with the on-device folders dialog for the same value. It now uses the Hub formatBytes.
  • The training start overlay divided download bytes by 1024 but labelled them GB. It now uses the Hub formatBytes too.
  • Tests: the disk refusal test now uses a free size that reads differently in GB and GiB and checks the exit code; the frontend test covers the folders dialog, Settings, the training overlay and the chat download toast.

Memory/VRAM units and transfer rates are unchanged.

@Lyxot

Lyxot commented Sep 17, 2026

Copy link
Copy Markdown
Collaborator

@codex review

2 similar comments
@Lyxot

Lyxot commented Sep 17, 2026

Copy link
Copy Markdown
Collaborator

@codex review

@Lyxot

Lyxot commented Sep 17, 2026

Copy link
Copy Markdown
Collaborator

@codex review

The training start overlay paired decimal byte totals with the chat transfer formatter's rate, which divides by 1024 while labelling KB/MB/GB. It now uses the Hub formatRate so the rate matches the totals beside it.

@Lyxot Lyxot left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM. Disk free space, download sizes and the training download rate now use the same decimal units as the Hub model cards; memory/VRAM stays binary. Codex review came back clean on the current commits, and the remaining CI failures also fail on main.

@Lyxot
Lyxot merged commit 0baf72b into unslothai:main Sep 17, 2026
54 of 57 checks passed
shaojun pushed a commit to shaojun/unsloth that referenced this pull request Sep 29, 2026
* Studio: report disk space in decimal GB to match Hub sizes

* fix(studio): show remaining disk free space and training download sizes in decimal GB

Settings > Resources rendered the download folder's free space in GiB, so it disagreed with the on-device folders dialog for the same value, and the training start overlay divided download bytes by 1024 but labelled them GB. Both now use the Hub byte formatter. The disk refusal test uses a free size that differs between GB and GiB and checks the exit code.

* fix(studio): show the training download rate in decimal units

The training start overlay paired decimal byte totals with the chat transfer formatter's rate, which divides by 1024 while labelling KB/MB/GB. It now uses the Hub formatRate so the rate matches the totals beside it.

---------

Co-authored-by: Lyxot <[email protected]>
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.

3 participants