alex n commited on
Commit
5f353cb
·
1 Parent(s): 163756c
Files changed (1) hide show
  1. src/wandb_data.py +14 -1
src/wandb_data.py CHANGED
@@ -209,6 +209,19 @@ def _add_runs(wandb_runs: list[wapi.Run]):
209
  date = _date_from_run(wandb_run)
210
  id = wandb_run.id
211
  average_benchmarking_time = float(wandb_run.summary["average_benchmarking_time"]) if "average_benchmarking_time" in wandb_run.summary else 0
 
 
 
 
 
 
 
 
 
 
 
 
 
212
  run = Run(
213
  start_date=date,
214
  version=version,
@@ -218,7 +231,7 @@ def _add_runs(wandb_runs: list[wapi.Run]):
218
  status=status,
219
  average_benchmarking_time=average_benchmarking_time,
220
  step=int(metrics["step"]),
221
- eta=max(int(average_benchmarking_time * (len(submission_info) - len(submissions) - len(invalid_submissions))) if average_benchmarking_time else 0, 0) if status != BenchmarkStatus.FINISHED else 0,
222
  winner_uid=winner_uid,
223
  baseline_metrics=baseline_metrics,
224
  total_submissions=len(submission_info),
 
209
  date = _date_from_run(wandb_run)
210
  id = wandb_run.id
211
  average_benchmarking_time = float(wandb_run.summary["average_benchmarking_time"]) if "average_benchmarking_time" in wandb_run.summary else 0
212
+
213
+ # Get num_gpus from metrics, default to 1 if not found
214
+ num_gpus = int(metrics.get("num_gpus", 1))
215
+
216
+ # Update ETA calculation to account for GPUs
217
+ eta_calculation = (
218
+ max(
219
+ int(average_benchmarking_time * (len(submission_info) - len(submissions) - len(invalid_submissions))) if average_benchmarking_time else 0,
220
+ 0
221
+ ) // num_gpus # Divide by number of GPUs
222
+ if status != BenchmarkStatus.FINISHED else 0
223
+ )
224
+
225
  run = Run(
226
  start_date=date,
227
  version=version,
 
231
  status=status,
232
  average_benchmarking_time=average_benchmarking_time,
233
  step=int(metrics["step"]),
234
+ eta=eta_calculation,
235
  winner_uid=winner_uid,
236
  baseline_metrics=baseline_metrics,
237
  total_submissions=len(submission_info),