Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix issue with case sensitivity when loading dataset from local cache #6763

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/datasets/load.py
Original file line number Diff line number Diff line change
Expand Up @@ -1608,7 +1608,7 @@ def _get_modification_time(module_hash):
}
return DatasetModule(module_path, hash, builder_kwargs, importable_file_path=importable_file_path)
cache_dir = os.path.expanduser(str(self.cache_dir or config.HF_DATASETS_CACHE))
cached_datasets_directory_path_root = os.path.join(cache_dir, self.name.replace("/", "___"))
cached_datasets_directory_path_root = os.path.join(cache_dir, self.name.lower().replace("/", "___"))
cached_directory_paths = [
cached_directory_path
for cached_directory_path in glob.glob(os.path.join(cached_datasets_directory_path_root, "*", "*", "*"))
Expand Down
2 changes: 1 addition & 1 deletion src/datasets/packaged_modules/cache/cache.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ def _find_hash_in_cache(
else:
config_id = None
cache_dir = os.path.expanduser(str(cache_dir or datasets.config.HF_DATASETS_CACHE))
cached_datasets_directory_path_root = os.path.join(cache_dir, dataset_name.replace("/", "___"))
cached_datasets_directory_path_root = os.path.join(cache_dir, dataset_name.lower().replace("/", "___"))
cached_directory_paths = [
cached_directory_path
for cached_directory_path in glob.glob(
Expand Down