Skip to content

Commit

Permalink
fix windows error related to urllib parse scheme
Browse files Browse the repository at this point in the history
  • Loading branch information
deependujha committed Sep 6, 2024
1 parent 848484a commit 4d62fdd
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/litdata/streaming/resolver.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,7 @@ def _resolve_dir(dir_path: Optional[Union[str, Dir]]) -> Dir:

cloud_prefixes = _SUPPORTED_CLOUD_PROVIDERS
dir_scheme = parse.urlparse(dir_path).scheme
if bool(dir_scheme):
print("=" * 80)
print(f"{dir_scheme=}")
print("=" * 80)
if bool(dir_scheme) and dir_scheme not in ["c", "d", "e" , "f"]: # prevent windows `c:\\` and `d:\\`
if any(dir_path.startswith(cloud_prefix) for cloud_prefix in cloud_prefixes):
return Dir(path=None, url=dir_path)
raise ValueError(
Expand Down

0 comments on commit 4d62fdd

Please sign in to comment.