Skip to content

Local UI to run and train LLMs and diffusion models. Supports GGUF, MLX, Qwen3.8, DeepSeek-V4.1, MiniMax-H3, Gemma 4, FLUX and more.

Tests: keep tqdm's monitor thread out of the ShareGPT no-threads count (#15992)

Daniel Han81c219b63cb2
diff --git a/studio/backend/tests/test_sharegpt_image_parallel_fetch.py b/studio/backend/tests/test_sharegpt_image_parallel_fetch.py
index acfef41451d..8796d5e6d77 100644
--- a/studio/backend/tests/test_sharegpt_image_parallel_fetch.py
+++ b/studio/backend/tests/test_sharegpt_image_parallel_fetch.py
@@ -156,6 +156,11 @@ def test_mixed_local_and_url_rows_keep_row_order(monkeypatch, workers, tmp_path)
def test_local_only_dataset_starts_no_threads(monkeypatch, workers, tmp_path):
monkeypatch.setattr(format_conversion, "_own_image_path", lambda path, account: path)
+ # The first tqdm bar in a process starts tqdm's own TMonitor thread; that is not a fetch worker,
+ # and whether this test is that first bar depends on what ran before it in the worker.
+ from tqdm import std as tqdm_std
+
+ monkeypatch.setattr(tqdm_std.tqdm, "monitor_interval", 0)
before = threading.active_count()
created = []
real_init = threading.Thread.__init__