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.

Merge pull request #347 from unslothai/feature/studio-storage-roots

Roland Tannous6b43e33ff1e7
diff --cc studio/backend/routes/datasets.py
index 25965a847eb,a9eb74f10c9..b8793fd9d0c
--- a/studio/backend/routes/datasets.py
+++ b/studio/backend/routes/datasets.py
@@@ -83,17 -89,20 +89,16 @@@ def _serialize_preview_rows(rows)
# --- Endpoints ---
# Recognized data-file extensions for the single-file fallback approach.
-DATA_EXTS = (
- '.parquet',
- '.json', '.jsonl',
- '.csv', '.tsv',
- '.txt',
- '.arrow',
- '.tar', '.tar.gz', '.tgz',
- '.gz', '.zst',
- '.zip',
-)
+# Tabular formats are preferred over archives for Tier 1 preview because
+# archives (e.g. images.zip) may be loaded as ImageFolder datasets with
+# synthetic columns (image/label) that don't match the real dataset schema.
+_TABULAR_EXTS = ('.parquet', '.json', '.jsonl', '.csv', '.tsv', '.arrow')
+_ARCHIVE_EXTS = ('.tar', '.tar.gz', '.tgz', '.gz', '.zst', '.zip', '.txt')
+DATA_EXTS = _TABULAR_EXTS + _ARCHIVE_EXTS
LOCAL_FILE_EXTS = ('.json', '.jsonl', '.csv', '.parquet')
LOCAL_UPLOAD_EXTS = {".csv", ".json", ".jsonl", ".parquet"}
- BACKEND_ROOT = Path(__file__).resolve().parents[1]
- LOCAL_DATASETS_ROOT = BACKEND_ROOT / "assets" / "datasets"
- DATASET_UPLOAD_DIR = LOCAL_DATASETS_ROOT / "uploads"
+ LOCAL_DATASETS_ROOT = recipe_datasets_root()
+ DATASET_UPLOAD_DIR = dataset_uploads_root()
def _safe_read_metadata(path: Path) -> dict | None: