unslothai/unsloth · error · RecipeDatasetPublishError
Execution artifact path is not a dataset folder.
Error message
Execution artifact path is not a dataset folder.
What it means
RecipeDatasetPublishError raised when the artifact path exists but is not a directory (resolved.is_dir() is False). Publishing to Hugging Face requires a dataset folder (with metadata/config files); a plain file, a broken symlink that still resolves, or a special file at the path fails this check.
Source
Thrown at studio/backend/core/data_recipe/huggingface.py:39
"""Raised when a recipe dataset cannot be published to Hugging Face."""
def _resolve_recipe_artifact_path(artifact_path: str) -> Path:
root = recipe_datasets_root().expanduser().resolve()
candidate = resolve_dataset_path(artifact_path).expanduser()
resolved = candidate.resolve(strict = False)
try:
resolved.relative_to(root)
except ValueError as exc:
raise RecipeDatasetPublishError(
"This execution artifact is outside the Recipe Studio dataset storage."
) from exc
if not resolved.exists():
raise RecipeDatasetPublishError("Execution artifacts are no longer available.")
if not resolved.is_dir():
raise RecipeDatasetPublishError("Execution artifact path is not a dataset folder.")
return resolved
def publish_recipe_dataset(
*,
artifact_path: str,
repo_id: str,
description: str,
hf_token: str | None = None,
private: bool = False,
) -> str:
dataset_path = _resolve_recipe_artifact_path(artifact_path)
try:
from data_designer.engine.storage.artifact_storage import (
FINAL_DATASET_FOLDER_NAME,
METADATA_FILENAME,View on GitHub (pinned to 203007d190)
Solutions
- Pass the run's output directory (the artifact_path from the execution result), not a file inside it.
- Verify with os.path.isdir(...) before calling publish.
- If the directory was replaced, re-run the recipe.
Example fix
# before publish_recipe_dataset(artifact_path=str(run_dir / "data.jsonl"), ...) # after publish_recipe_dataset(artifact_path=str(run_dir), ...)
Defensive patterns
Strategy: validation
Validate before calling
import os assert os.path.isdir(os.path.expanduser(artifact_path)), 'artifact_path must be the run output directory, not a file'
Type guard
def is_dataset_dir(path: str) -> bool:
p = Path(path).expanduser()
return p.is_dir() Try / catch
try:
publish_recipe_dataset(artifact_path=p, repo_id=r)
except RecipeDatasetPublishError as e:
if 'not a dataset folder' in str(e):
p = str(Path(p).parent); retry(p) Prevention
- Pass the run's output directory, never a file inside it.
- Check isdir() client-side before the publish call.
When it happens
Trigger: Passing a path to a single output file (e.g. a .jsonl or .parquet file) instead of the run's output directory; the artifact dir replaced by a file of the same name.
Common situations: Clients deriving artifact_path from a reported file location rather than the run's folder; partially cleaned storage where only a marker file remains.
Related errors
- This execution artifact is outside the Recipe Studio dataset
- Execution artifacts are no longer available.
- NeMo Data Designer Hugging Face integration is not installed
- Add a Provider connection block before running this recipe.
- The Hugging Face cache folder is invalid.
AI-assisted analysis of unslothai/unsloth@203007d190 (2026-08-15).
Data as JSON: /api/errors/c9f03c05aa89bf7a.
Report an issue: GitHub.