hanhainebula commited on
Commit
85255fd
·
1 Parent(s): 94e499a

debug for backend.py

Browse files
Files changed (1) hide show
  1. src/backend.py +2 -3
src/backend.py CHANGED
@@ -105,10 +105,9 @@ def get_file_list(dir_path: str, allowed_suffixes: List[str] = None) -> List[str
105
 
106
  def get_zip_file_path(zip_file_name: str):
107
  zip_file_path = None
108
- logger.warning(f"File list: {os.listdir(ZIP_CACHE_DIR)}")
109
  for root, _, files in os.walk(ZIP_CACHE_DIR):
110
  for file in files:
111
- logger.warning(f"file: {file}")
112
  if file == zip_file_name:
113
  zip_file_path = os.path.abspath(os.path.join(root, file))
114
  break
@@ -191,7 +190,7 @@ def pull_search_results(
191
  repo_type="dataset",
192
  local_dir=ZIP_CACHE_DIR,
193
  etag_timeout=30,
194
- allow_patterns=[zip_file_name]
195
  )
196
  zip_file_path = get_zip_file_path(zip_file_name)
197
  assert zip_file_path is not None, f"zip_file_path is None"
 
105
 
106
  def get_zip_file_path(zip_file_name: str):
107
  zip_file_path = None
108
+ # logger.warning(f"File list: {os.listdir(ZIP_CACHE_DIR)}")
109
  for root, _, files in os.walk(ZIP_CACHE_DIR):
110
  for file in files:
 
111
  if file == zip_file_name:
112
  zip_file_path = os.path.abspath(os.path.join(root, file))
113
  break
 
190
  repo_type="dataset",
191
  local_dir=ZIP_CACHE_DIR,
192
  etag_timeout=30,
193
+ allow_patterns=[f'*{zip_file_name}']
194
  )
195
  zip_file_path = get_zip_file_path(zip_file_name)
196
  assert zip_file_path is not None, f"zip_file_path is None"