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.

Update synthetic.py

Daniel Han7b97cf230459
diff --git a/unsloth/dataprep/synthetic.py b/unsloth/dataprep/synthetic.py
index d501b69665a..33db2f2055d 100644
--- a/unsloth/dataprep/synthetic.py
+++ b/unsloth/dataprep/synthetic.py
@@ -24,15 +24,15 @@ import os
import requests
import torch
import gc
+import time
+
def check_vllm_status():
try:
response = requests.get("http://localhost:8000/metrics")
if response.status_code == 200:
- print("vllm server is running")
return True
except requests.exceptions.ConnectionError:
- print("vllm server is not running")
return False
pass
pass
@@ -75,7 +75,12 @@ def async_load_vllm(
pass
if vllm_process is None:
raise RuntimeError("Unsloth: vllm_process failed to load!")
- check_vllm_status()
+ trial = 0
+ while not check_vllm_status():
+ if trial >= 100:
+ raise RuntimeError("Unsloth: vllm_process failed to load!")
+ trial += 1
+ time.sleep(1)
return vllm_process
pass