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.
Python agentaichatgptdeepseekfine-tuninggemmaimage-generationllamallmllmsopenaipythonqwenreinforcement-learningself-hostedstable-diffusiontext-to-speechttsuiunsloth
fix: comment out debug print statements (#4357)
Roland Tannousa0aba96ebdfa
diff --git a/studio/backend/core/training/trainer.py b/studio/backend/core/training/trainer.pyindex 330fb74747b..0aa6d0922e5 100644--- a/studio/backend/core/training/trainer.py+++ b/studio/backend/core/training/trainer.py@@ -3270,25 +3270,25 @@ class UnslothTrainer:logger.info(f"Post-filter dataset size: {filtered_len} samples\n")# [DEBUG] Decode first sample AFTER train_on_completions applied- try:- _row = self.trainer.train_dataset[0]- _space = self.tokenizer(- " ", add_special_tokens = False- ).input_ids[0]- print("[DEBUG] === After train_on_completions ===", flush = True)- print(- f"[DEBUG] input_ids decoded:\n{self.tokenizer.decode(_row['input_ids'])}\n",- flush = True,- )- print(- f"[DEBUG] labels decoded (-100 → space):\n{self.tokenizer.decode([_space if x == -100 else x for x in _row['labels']])}\n",- flush = True,- )- except Exception as _dbg_e:- print(- f"[DEBUG] Could not decode post-completions sample: {_dbg_e}",- flush = True,- )+ # try:+ # _row = self.trainer.train_dataset[0]+ # _space = self.tokenizer(+ # " ", add_special_tokens = False+ # ).input_ids[0]+ # print("[DEBUG] === After train_on_completions ===", flush = True)+ # print(+ # f"[DEBUG] input_ids decoded:\n{self.tokenizer.decode(_row['input_ids'])}\n",+ # flush = True,+ # )+ # print(+ # f"[DEBUG] labels decoded (-100 → space):\n{self.tokenizer.decode([_space if x == -100 else x for x in _row['labels']])}\n",+ # flush = True,+ # )+ # except Exception as _dbg_e:+ # print(+ # f"[DEBUG] Could not decode post-completions sample: {_dbg_e}",+ # flush = True,+ # )except Exception as e:logger.warning(f"Failed to apply train on responses only: {e}")diff --git a/studio/backend/core/training/worker.py b/studio/backend/core/training/worker.pyindex c2801227ff6..685a4a674ec 100644--- a/studio/backend/core/training/worker.py+++ b/studio/backend/core/training/worker.py@@ -314,21 +314,21 @@ def run_training_process(# [DEBUG] Print first sample before model is loaded# dataset is a dict {"dataset": <Dataset>, "detected_format": ..., ...}# or a raw Dataset for audio paths- try:- ds = dataset["dataset"] if isinstance(dataset, dict) else dataset- print(- f"\n[DEBUG] Dataset loaded BEFORE model. type={type(ds).__name__}, len={len(ds)}",- flush = True,- )- print(f"[DEBUG] Columns: {ds.column_names}", flush = True)- sample = ds[0]- preview = {k: str(v)[:300] for k, v in sample.items()}- print(f"[DEBUG] First sample: {preview}\n", flush = True)- except Exception as e:- print(- f"[DEBUG] Could not preview first sample: {type(e).__name__}: {e}",- flush = True,- )+ # try:+ # ds = dataset["dataset"] if isinstance(dataset, dict) else dataset+ # print(+ # f"\n[DEBUG] Dataset loaded BEFORE model. type={type(ds).__name__}, len={len(ds)}",+ # flush = True,+ # )+ # print(f"[DEBUG] Columns: {ds.column_names}", flush = True)+ # sample = ds[0]+ # preview = {k: str(v)[:300] for k, v in sample.items()}+ # print(f"[DEBUG] First sample: {preview}\n", flush = True)+ # except Exception as e:+ # print(+ # f"[DEBUG] Could not preview first sample: {type(e).__name__}: {e}",+ # flush = True,+ # )# Disable eval if eval_steps <= 0eval_steps = config.get("eval_steps", 0.00)