Skip to content

Commit

Permalink
fix condition
Browse files Browse the repository at this point in the history
  • Loading branch information
zain-sohail committed Jun 13, 2024
1 parent c4d0484 commit 8ba4941
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions sed/dataset/dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,6 @@ def data_name(self, value: str):
self._datasets = DatasetsManager.load_datasets_dict()
self._state = self._check_dataset_availability()
self._subdirs = self._state.get("subdirs", [])
self._set_data_dir(None, True)

@property
def existing_data_paths(self) -> list:
Expand Down Expand Up @@ -360,8 +359,8 @@ def get(
files_in_dir = self._get_file_list(kwargs.get("ignore_zip", True))
file_list: list = self._state.get("files", [])

# if file_list is subset of/same as files_in_dir, then don't download/extract data
if len(file_list) != 0 and set(file_list).issubset(set(files_in_dir)):
# if all files are present, skip download
if all(file in files_in_dir for file in file_list):
logger.info(f"{self._data_name} data is already present.")
else:
url: str = self._state.get("url")
Expand Down

0 comments on commit 8ba4941

Please sign in to comment.