API
publish_dataset
Upload a baked dataset directory to HF Hub.
function · source
publish_dataset(local_dir: "'Path | str'", *, repo_id: 'str', tag: 'Optional[str]' = None, token: 'Optional[str]' = None, commit_message: 'Optional[str]' = None, private: 'bool' = False, repo_exist_ok: 'bool' = True) -> 'str'Upload a baked dataset directory to HF Hub.
Re-renders README.md with the actual repo_id and revision (tag) before
upload so the published card has real values, not placeholders.
Args:
local_dir: Directory containing data/, metadata.json, README.md.
repo_id: e.g. "aicrowd/arc-whestbench-2026".
tag: If provided, creates a git tag pointing at the new commit.
token: HF Hub auth token; falls back to HF auth cache.
commit_message: Commit message; default is auto-generated.
private: If creating the repo, mark it private.
repo_exist_ok: If True, don't error when the repo already exists.
Returns:
The commit SHA from the upload.