Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
* Fixes huggingface#5757

Fixes the bug huggingface#5757

* code formatting
  • Loading branch information
eli-osherovich committed Apr 20, 2023
1 parent 3fdb46c commit e7ce0ac
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/datasets/load.py
Original file line number Diff line number Diff line change
Expand Up @@ -701,7 +701,9 @@ def __init__(
increase_load_count(name, resource_type="dataset")

def get_module(self) -> DatasetModule:
base_path = str(Path(self.data_dir).resolve()) if self.data_dir is not None else str(Path().resolve())
base_path = (
str(Path(self.data_dir).expanduser().resolve()) if self.data_dir is not None else str(Path().resolve())
)
patterns = (
sanitize_patterns(self.data_files) if self.data_files is not None else get_data_patterns_locally(base_path)
)
Expand Down

0 comments on commit e7ce0ac

Please sign in to comment.