Skip to content

Commit

Permalink
bugfix(init_samples): fix path error on Windows platform
Browse files Browse the repository at this point in the history
  • Loading branch information
imhuwq committed Sep 25, 2023
1 parent 9c88c83 commit d6363bd
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
1 change: 0 additions & 1 deletion deepdataspace/services/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@

import requests

from deepdataspace.utils.function import retry
from deepdataspace.utils.os import PLATFORM
from deepdataspace.utils.os import Platforms
from deepdataspace.utils.string import gen_random_str
Expand Down
4 changes: 2 additions & 2 deletions deepdataspace/services/dds.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,15 +138,15 @@ def prefight_checks(self):
self.exit_or_raise(msg)

def init_samples(self):
sample_file = f"/{self.runtime_dir}/dataset-samples.zip"
sample_file = os.path.join(self.runtime_dir, "dataset-samples.zip")

if not os.path.exists(sample_file):
sample_url = f"{self.dl_prefix}/datasets/dataset-samples.zip"
with progress_log(f"Downloading sample datasets"):
download_by_requests(sample_url, sample_file)

with zipfile.ZipFile(sample_file, "r") as fp:
fp.extractall(f"{self.runtime_dir}/")
fp.extractall(f"{self.runtime_dir}")

extract_dir = f"{self.runtime_dir}/dataset-samples"
for item in os.listdir(extract_dir):
Expand Down

0 comments on commit d6363bd

Please sign in to comment.