download_mode=`force_redownload` does not work on removed datasets
Author: severoCreated Oct 18, 2021Updated Oct 1, 2026
Labelsbugdataset-viewer
Describe the bug
If a cached dataset is removed from the library, I don't see how to delete it programmatically. I thought that using force_redownload would try to refresh the cache, then raise an exception, but it reuses the cache instead.
Steps to reproduce the bug
requires to already have wit in the cache: see https://github.com/huggingface/datasets/pull/2981
import datasets as ds
dataset = ds.load_dataset("wit", split="train", download_mode='force_redownload')Expected results
It should raise an exception, since the dataset does not exist anymore.
Actual results
It uses the cached result
Using the latest cached version of the module from /home/slesage/.cache/huggingface/modules/datasets_modules/datasets/wit/107afbffd48e058b19101bddc47fbee25fa68eb6d50a733e262875f1285a5171 (last modified on Wed Sep 29 08:21:10 2021) since it couldn't be found locally at wit, or remotely on the Hugging Face Hub.Environment info
datasetsversion: 1.13.4.dev0- Platform: Linux-5.11.0-1019-aws-x86_64-with-glibc2.31
- Python version: 3.9.6
- PyArrow version: 4.0.1
Source: huggingface/datasets