jenyag commited on
Commit
9ea9349
1 Parent(s): dc0e67a

add warning for expired warning

Browse files
Files changed (1) hide show
  1. src/get_results_for_task.py +1 -4
src/get_results_for_task.py CHANGED
@@ -19,9 +19,8 @@ try:
19
  AVAILABLE_TASKS = get_dataset_config_names(os.environ["DATASET_ID"])
20
  except FileNotFoundError as e:
21
  AVAILABLE_TASKS = []
 
22
 
23
- logging.info(f'Dataset: {os.environ["DATASET_ID"]}')
24
- get_dataset_config_names(os.environ["DATASET_ID"])
25
 
26
  def _get_results_stub() -> pd.DataFrame:
27
  stub_df = pd.DataFrame(
@@ -90,8 +89,6 @@ def _get_results_dataset(task_id: str) -> pd.DataFrame:
90
 
91
  def get_results_for_task(task_pretty: str) -> pd.DataFrame:
92
  task_id = TASKS_PRETTY_REVERSE[task_pretty]
93
- logging.info(f'Tasks: {AVAILABLE_TASKS}')
94
- logging.info(f'Task ID: {task_id}')
95
  if task_id in AVAILABLE_TASKS:
96
  logging.info(f"Retrieving results for {task_pretty}...")
97
  return _get_results_dataset(task_id)
 
19
  AVAILABLE_TASKS = get_dataset_config_names(os.environ["DATASET_ID"])
20
  except FileNotFoundError as e:
21
  AVAILABLE_TASKS = []
22
+ logging.warning("Dataset is not available! Check if token is expired.")
23
 
 
 
24
 
25
  def _get_results_stub() -> pd.DataFrame:
26
  stub_df = pd.DataFrame(
 
89
 
90
  def get_results_for_task(task_pretty: str) -> pd.DataFrame:
91
  task_id = TASKS_PRETTY_REVERSE[task_pretty]
 
 
92
  if task_id in AVAILABLE_TASKS:
93
  logging.info(f"Retrieving results for {task_pretty}...")
94
  return _get_results_dataset(task_id)