Skip to content

Unsloth Studio: show linked instances on the API page - #18312

Open
danielhanchen wants to merge 3 commits into
studio-linked-instances-settingsfrom
studio-linked-instances-api-page
Open

danielhanchen wants to merge 3 commits into
studio-linked-instances-settingsfrom
studio-linked-instances-api-page

Conversation

@danielhanchen

Copy link
Copy Markdown
Member

Owners with linked instances see one card per instance on the API page: online state, latency, GPU and VRAM, the loaded model and how it is reached (Localhost, LAN, Cloudflare, Public). A card opens the details dialog; Manage opens Settings.

Split from #12092 (by @LeoBorcherding), rebased on current main. Stacked on #18311.

main has redesigned the API page since #12092, so the cards are mounted as one section under the endpoint panel. The two-column layout rework and use-fit-to-viewport.ts from #12092 are dropped.

Tests

  • Typecheck and production build clean.
  • Rendered against a real Studio with a linked instance: the card shows @wsl, 1 of 1 online, its GPU and VRAM and the loaded model. Pages without linked instances, and non-owners, render as on main.

Owners with linked instances see a card per instance under the endpoint:
online state, latency, GPU and VRAM, the loaded model and how it is
reached. Cards open the details dialog; Manage opens Settings.

Split from #12092. Mounted on the current API page instead of the earlier
two-column layout rework.

Co-authored-by: LeoBorcherding <[email protected]>
@chatgpt-codex-connector

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

Copy link
Copy Markdown
Codex Review Summary: ❌ Failed

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

Review Status Commit Review trigger
📝 Code Review ❌ Failed 2026-11-18T11:50:31.379907Z
We couldn’t complete this review. Comment @codex review to try again.
a338136 PR opened
ℹ️ 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 added a commit that referenced this pull request Nov 18, 2026
…18343)

## Comment the BLOCK constexpr on the bf16 stochastic rounding kernels

`tests/test_triton_constexpr_comments.py` fails on `main` since #18282.
It shows up in `Repo tests (CPU, rest)` on unrelated PRs, for example
#18312 and #18313:

```
E   AssertionError: tl.constexpr parameters without a comment:
E     unsloth/optimizers/bf16_stochastic_rounding.py:60 _round_kernel.BLOCK
E     unsloth/optimizers/bf16_stochastic_rounding.py:83 _adamw_kernel.BLOCK
```

### Cause

That lint requires every `tl.constexpr` parameter of an Unsloth Triton
kernel to sit on its own line with a comment saying what it is. It does
this because each distinct constexpr value compiles a new kernel.

#18282 added `_round_kernel` and `_adamw_kernel`, whose `BLOCK`
constexpr has no comment. `_round_kernel` also takes it inline on the
`def` line.

### Fix

Both kernels now take `BLOCK` on its own line with a comment: `#
elements per program, fixed at _BLOCK`. `_round_kernel`'s signature is
split one parameter per line to match.

No behaviour changes. The parameters and their order are unchanged, and
every launch still passes `BLOCK = _BLOCK` (1024).

### Verification

- `tests/test_triton_constexpr_comments.py`: fails on `main` on these
two lines and passes with this change.
- `tests/test_bf16_stochastic_rounding.py`: 13 passed, 2 skipped on CPU
across the two files.
- ruff is clean.

This branch has not been deployed

No deployments
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