Skip to content

Commit

Permalink
Merge pull request #2956 from activeloopai/fix_triming_ds_name
Browse files Browse the repository at this point in the history
strip dataset name
  • Loading branch information
azat-manukyan authored Sep 24, 2024
2 parents c55c1c5 + e8e866f commit f93612a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
3 changes: 0 additions & 3 deletions deeplake/api/tests/test_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -2508,9 +2508,6 @@ def test_invalid_ds_name():
with pytest.raises(InvalidDatasetNameException):
ds = deeplake.empty("hub://test/ Mnist123")

with pytest.raises(InvalidDatasetNameException):
ds = deeplake.like("hub://test/Mnist123 ", "hub://activeloop/mnist-train")

with pytest.raises(InvalidDatasetNameException):
ds = deeplake.deepcopy(
"hub://activeloop/mnist-train", "hub://activeloop/mnist$train"
Expand Down
3 changes: 2 additions & 1 deletion deeplake/util/path.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,8 @@ def convert_pathlib_to_string_if_needed(path: Union[str, pathlib.Path]) -> str:


def process_dataset_path(path: Union[str, pathlib.Path]) -> Tuple[str, Optional[str]]:
dataset_path, at, address = str(path).partition("@")
path = str(path).strip()
dataset_path, _, address = path.partition("@")
if not address:
address = None # type: ignore
return dataset_path, address
Expand Down

0 comments on commit f93612a

Please sign in to comment.