Skip to content
Merged
Changes from 1 commit
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
6fac8dc
Studio images: coalesce concurrent requests across accounts
danielhanchen Nov 26, 2026
80a7423
Studio images: coalesce plain text-to-image on /images/generate
danielhanchen Nov 26, 2026
d068da9
Studio images: let seeded requests join a batch behind an opt-in
danielhanchen Nov 26, 2026
a40d678
Studio images: serve the generation slot first come, first served
danielhanchen Nov 26, 2026
7d3e9d2
Studio images: keep per-account LoRAs and embeddings out of shared ba…
danielhanchen Nov 26, 2026
ad1d92c
Studio images: group batch members by what their family encodes per call
danielhanchen Nov 26, 2026
2428129
Studio images: one Stop rule for batched requests, across accounts
danielhanchen Nov 26, 2026
eae66f8
Studio images: no live preview for a batch shared across accounts
danielhanchen Nov 26, 2026
20b7f42
Studio images: batch a static-shape load only at sizes it already com…
danielhanchen Nov 26, 2026
17f3a29
Studio images: one member's failure no longer fails the whole batch
danielhanchen Nov 26, 2026
02a10ae
Studio images: a batch keeps its place in line; follow-up passes go f…
danielhanchen Nov 26, 2026
771a1f0
Studio images: record the shared call in recipes; pin coalesced calls
danielhanchen Nov 26, 2026
077bd66
Studio images: reserved batches get their own worker; tighter batch keys
danielhanchen Nov 26, 2026
e0e4311
Studio images: an idle reservation never stalls the line; recovery ke…
danielhanchen Nov 26, 2026
208b5a6
Studio images: CUDA-graph loads serve serially, and status says so
danielhanchen Nov 26, 2026
f4aaf9c
Studio images: poll review-test conditions by count, not by clock dea…
danielhanchen Nov 26, 2026
aa2e573
Merge origin/main into studio-image-concurrency
danielhanchen Nov 26, 2026
43ed7c3
Studio images: a leader whose Stop was acknowledged returns no images
danielhanchen Nov 26, 2026
97c4054
Studio images: test per-family batch grouping with interleaved arrivals
danielhanchen Nov 26, 2026
6659015
Studio images: read batch keys through private tokenizer copies
danielhanchen Nov 26, 2026
8b82bdf
Studio images: keep Qwen-Image-2.1 out of cross-account batches
danielhanchen Nov 26, 2026
ec19318
Studio images: coalesce across requests only when the denoiser stream…
danielhanchen Nov 26, 2026
e6a3595
Studio images: keep MOSS-Image out of cross-account batches
danielhanchen Nov 26, 2026
34029ec
Studio images: serve serially when the DiT scales activations per call
danielhanchen Nov 26, 2026
d27a985
Trim comments in image request batching
danielhanchen Nov 26, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Studio images: poll review-test conditions by count, not by clock dea…
…dline

The two waits in test_image_concurrency_review.py compared time.monotonic() against a deadline,
which the backend CI parallel-isolation scan flags as a timing claim under -n 4. They only wait for
an ordering condition, so poll a fixed number of times instead.
  • Loading branch information
danielhanchen committed Nov 26, 2026
commit f4aaf9c67ac01d7e15b0637c6df5539d9b26ee82
16 changes: 7 additions & 9 deletions studio/backend/tests/test_image_concurrency_review.py
Original file line number Diff line number Diff line change
Expand Up @@ -272,10 +272,7 @@ def run():
threads = [threading.Thread(target = queued(name), daemon = True) for name in events]
for thread in threads:
thread.start()
deadline = __import__("time").monotonic() + 5
while len(engine._queued_generate_cancels) < 2:
assert __import__("time").monotonic() < deadline
threading.Event().wait(0.01)
_wait_until(lambda: len(engine._queued_generate_cancels) >= 2)
assert engine.cancel_generate(expected_account = "bob") is True
assert events["bob"].is_set() and not events["alice"].is_set()
for thread in threads:
Expand Down Expand Up @@ -508,12 +505,13 @@ def generate(**kwargs):
assert sorted(record["account"] for record in saved) == ["alice", "bob", "carol"]


def _wait_until(predicate, timeout = 5.0):
import time
deadline = time.monotonic() + timeout
while not predicate():
assert time.monotonic() < deadline, "condition never held"
def _wait_until(predicate, polls = 1000):
"""Poll until predicate holds, failing after a fixed number of 5 ms waits (no clock comparison)."""
for _ in range(polls):
if predicate():
return
threading.Event().wait(0.005)
assert predicate(), "condition never held"


def _hold_slot(engine):
Expand Down