huggingface / huggingface/leLab

Deleting a dataset doesn't remove it from the Hub

Open
#93 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
171
Forks
60
Avg merge
1d 52m
Merged PRs (30d)
5

Description

## Describe the Bug / Missing Feature

`Delete Dataset` in LeLab only removes the local copy under `~/.cache/huggingface/lerobot/`.
If the dataset was already pushed to the Hub, it's still sitting there afterwards.
LeLab gives no way to remove it, you have to go delete the repo manually on huggingface.co.

## Steps to reproduce

1. Record a dataset and push it to the Hub.
2. Go delete it from LeLab (dataset list -> delete).
3. Check the Hub — the repo is still there.

## Expected behavior

Deleting a dataset that's been pushed to the Hub should give the option to
also delete the Hub repo, not just wipe the local cache.

## Proposed fix

`handle_delete_dataset` (`lelab/record.py`) would need to call `huggingface_hub.delete_repo(repo_id, repo_type="dataset")` when the dataset is Hub-hosted, probably behind its own confirmation step in the UI since it's not reversible (e.g. type the repo name to confirm, similar to GitHub's repo delete flow).

Contributor guide

No contributing guide indexed for this repository

Research direction

Start in lelab/record.py at handle_delete_dataset and trace how the dataset-list delete action identifies Hub-hosted datasets. Review the huggingface_hub.delete_repo call described in the issue and the existing delete confirmation flow. Done means deletion offers a separate confirmation for the Hub repo and removes it when confirmed, while local-only deletion still works.

Written by the indexing model from the issue text.

Assessment

Tech stack
huggingface, python
Domain
cloud, data
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
72/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.