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
debug: fix dataset access - result is a dict, use dataset['dataset']
Roland Tannous49b29fb1fd21
diff --git a/studio/backend/core/training/worker.py b/studio/backend/core/training/worker.pyindex f0194cb836f..fae010cff0f 100644--- a/studio/backend/core/training/worker.py+++ b/studio/backend/core/training/worker.py@@ -228,22 +228,17 @@ def run_training_process(eval_dataset = None# [DEBUG] Print first sample before model is loaded+ # dataset is a dict {"dataset": <Dataset>, "detected_format": ..., ...}+ # or a raw Dataset for audio pathstry:- print(f"\n[DEBUG] Dataset loaded BEFORE model. type={type(dataset).__name__}, len={len(dataset) if hasattr(dataset, '__len__') else '?'}", flush=True)- if hasattr(dataset, 'column_names'):- print(f"[DEBUG] Dataset columns: {dataset.column_names}", flush=True)- # Try multiple access patterns- try:- sample = dataset[0]- except Exception:- sample = next(iter(dataset)) if hasattr(dataset, '__iter__') else None- if sample:- preview = {k: str(v)[:200] for k, v in (sample.items() if hasattr(sample, 'items') else enumerate([sample]))}- print(f"[DEBUG] First sample: {preview}\n", flush=True)+ 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:- import tracebackprint(f"[DEBUG] Could not preview first sample: {type(e).__name__}: {e}", flush=True)- traceback.print_exc()# Disable eval if eval_steps <= 0eval_steps = config.get("eval_steps", 0.00)