feat(record): delete dataset from the Hub, not just local disk - #94
Draft
ravediamond wants to merge 1 commit into
Draft
feat(record): delete dataset from the Hub, not just local disk#94ravediamond wants to merge 1 commit into
ravediamond wants to merge 1 commit into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Delete Datasetin LeLab only wipes the local cache directory. If the dataset had already been pushed to the Hub, it's still there afterwards — you have to go delete the repo by hand on huggingface.co. There's nohuggingface_hub.delete_repo()call anywhere in the codebase.Fix
DatasetInfoRequestgets an optionaldelete_from_hubflag.handle_delete_datasetcallshuggingface_hub.delete_repo(repo_id, repo_type="dataset")when that flag is set, before removing the local copy. A missing Hub repo is treated as a no-op (nothing to delete); any other failure aborts before touching local disk.Testing
tests/test_record.pycovering: hub delete called when requested, skipped by default, and local copy preserved if the Hub call fails.pytest(204 passed),ruff check,ruff format --checkclean.tsc --noEmit,eslint,npm run buildclean (one pre-existingreact-hooks/exhaustive-depswarning on this file, unrelated to this change).frontend/distnot touched — CI rebuilds it on merge.Opening as draft since I'd like a look at the confirm-by-typing UX before marking ready — happy to simplify to a plain checkbox if that's overkill for this.