Skip to content
Merged
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
5 changes: 4 additions & 1 deletion data_juicer/core/data/ray_dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,10 @@
def get_abs_path(path, dataset_dir):
if is_remote_path(path):
return path
full_path = os.path.abspath(os.path.join(dataset_dir, path))
path = os.path.join(dataset_dir, path)
if is_remote_path(path):
return path
full_path = os.path.abspath(path)
if os.path.exists(full_path):
return full_path
else:
Expand Down
2 changes: 1 addition & 1 deletion data_juicer/utils/file_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ def find_files_with_suffix(

def is_remote_path(path: str):
"""Check if the path is a remote path."""
return path.startswith(("http://", "https://"))
return path.startswith(("http://", "https://", "s3://", "gs://", "hdfs://"))


def is_absolute_path(path: Union[str, Path]) -> bool:
Expand Down