hi-melnikov commited on
Commit
a70555b
1 Parent(s): d317f64

removed error from not downloading and using private token

Browse files
src/leaderboard/build_leaderboard.py CHANGED
@@ -35,7 +35,7 @@ def download_dataset(repo_id, local_dir, repo_type="dataset", max_attempts=3, ba
35
  local_dir=local_dir,
36
  repo_type=repo_type,
37
  tqdm_class=None,
38
- token=os.environ.get("HF_TOKEN"),
39
  etag_timeout=30,
40
  max_workers=8,
41
  )
@@ -46,7 +46,7 @@ def download_dataset(repo_id, local_dir, repo_type="dataset", max_attempts=3, ba
46
  logging.error(f"Error downloading {repo_id}: {e}, retrying in {wait_time}s")
47
  time.sleep(wait_time)
48
  attempt += 1
49
- raise Exception(f"Failed to download {repo_id} after {max_attempts} attempts")
50
 
51
  def build_leadearboard_df():
52
  """Initializes the application space, loading only necessary data."""
 
35
  local_dir=local_dir,
36
  repo_type=repo_type,
37
  tqdm_class=None,
38
+ token=os.environ.get("HF_TOKEN_PRIVATE"),
39
  etag_timeout=30,
40
  max_workers=8,
41
  )
 
46
  logging.error(f"Error downloading {repo_id}: {e}, retrying in {wait_time}s")
47
  time.sleep(wait_time)
48
  attempt += 1
49
+ logging.error(f"Failed to download {repo_id} after {max_attempts} attempts")
50
 
51
  def build_leadearboard_df():
52
  """Initializes the application space, loading only necessary data."""