Skip to content

Update Label Studio docs to recommend Storage Buckets for persistence#2381

Merged
davanstrien merged 3 commits intomainfrom
docs/label-studio-bucket-persistence
Apr 15, 2026
Merged

Update Label Studio docs to recommend Storage Buckets for persistence#2381
davanstrien merged 3 commits intomainfrom
docs/label-studio-bucket-persistence

Conversation

@davanstrien
Copy link
Copy Markdown
Member

@davanstrien davanstrien commented Apr 14, 2026

Summary

  • Add "Enable Persistence with HF Storage Buckets" section with step-by-step setup
  • Rename old Postgres section to "Enable Persistence with Postgres" (for heavier deployments)
  • Update ephemeral storage warning to link to the bucket persistence section

Aligns with the Space template PR that just merged: https://huggingface.co/spaces/LabelStudio/LabelStudio/discussions/8

Working example: https://huggingface.co/spaces/davanstrien/label-studio-buckets-demo

🤖 Generated with Claude Code


Note

Low Risk
Low risk: documentation-only changes with no runtime or API impact; risk limited to potential user confusion if instructions are inaccurate.

Overview
Updates the Label Studio on Spaces guide to emphasize persistent storage via HF Storage Buckets: the ephemeral-storage warning now links to a new persistence section and the production checklist calls out buckets as the default persistence option.

Adds a step-by-step "Enable Persistence with HF Storage Buckets" walkthrough (including required variables LABEL_STUDIO_BASE_DATA_DIR/STORAGE_PERSISTENCE, optional SECRET_KEY, and an optional huggingface_hub automation snippet), and renames/positions the existing database guidance as "Enable Persistence with Postgres" for heavier deployments.

Reviewed by Cursor Bugbot for commit 7438612. Bugbot is set up for automated code reviews on this repo. Configure here.

@davanstrien davanstrien requested review from julien-c and pcuenca April 14, 2026 13:29
@HuggingFaceDocBuilderDev
Copy link
Copy Markdown

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.

@davanstrien
Copy link
Copy Markdown
Member Author

cc @christophe-rannou for viz

@davanstrien davanstrien requested a review from Pierrci April 14, 2026 13:54
Copy link
Copy Markdown
Member

@julien-c julien-c left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

great

hf buckets create <your-namespace>/label-studio-data
```

2. **Attach it** in Space Settings → Storage Buckets, mount path `/data`.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe show via CLI or code too

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated to make it more agent-friendly!

cc @Wauplin @hanouticelina - any objections to a PR for adding mounting volumes to hf CLI? Might be quicker for agents vs the current approach in these docs.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes sure! We actually have quite a lot of Space-specific methods in the API that would deserve to be in the CLI:

As a side note, it's already possible to attach a volume when creating the Space:

hf repos create ... --repo-type -v hf://gpt2:/models

(still agree on the need for a hf spaces volume ...)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

…e setup

Addresses Julien's review on #2381 — shows the equivalent Python flow
(set_space_volumes / add_space_variable / restart_space) so the setup
can be handed off to a coding agent instead of clicking through Space
settings.

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
Comment thread docs/hub/spaces-sdks-docker-label-studio.md Outdated
@davanstrien davanstrien merged commit b901bce into main Apr 15, 2026
3 checks passed
@davanstrien davanstrien deleted the docs/label-studio-bucket-persistence branch April 15, 2026 14:49
@davanstrien
Copy link
Copy Markdown
Member Author

I'll merge this as is for now, but will update once huggingface/huggingface_hub#4109 lands in a release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants