Skip to content

Commit 0620c4c

Browse files
author
Joel Niklaus
committed
fix summary not being updated with skipped runs
1 parent b5fbc1b commit 0620c4c

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed

examples/inference/benchmark/launch_experiments.py

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -378,23 +378,25 @@ def launch(self) -> dict[str, int]:
378378
logger.info(f"{'=' * 60}")
379379

380380
for run_name, exit_code in results.items():
381-
if self.dry_run:
381+
if run_name in skipped_runs:
382+
status = "⏭️ SKIPPED"
383+
elif self.dry_run:
382384
status = "✅ WOULD SUBMIT" if exit_code == 0 else f"❌ WOULD FAIL ({exit_code})"
383385
else:
384-
if run_name in skipped_runs:
385-
status = "⏭️ SKIPPED"
386-
else:
387-
status = "✅ SUBMITTED" if exit_code == 0 else f"❌ FAILED ({exit_code})"
386+
status = "✅ SUBMITTED" if exit_code == 0 else f"❌ FAILED ({exit_code})"
388387
logger.info(f"{run_name:<30} {status}")
389388

390389
if results:
391390
successful_submissions = sum(1 for name, code in results.items() if code == 0 and name not in skipped_runs)
391+
skipped_count = len(skipped_runs)
392392
if self.dry_run:
393-
logger.info(f"\n{successful_submissions}/{len(results)} jobs would be submitted successfully")
393+
logger.info(f"\n{successful_submissions}/{len(results)} jobs would be submitted")
394+
if skipped_count > 0:
395+
logger.info(f"{skipped_count} job(s) skipped (completed or OOM)")
394396
else:
395397
logger.info(f"\n{successful_submissions}/{len(results)} jobs submitted successfully")
396-
if skipped_runs:
397-
logger.info(f"{len(skipped_runs)} job(s) skipped (already completed)")
398+
if skipped_count > 0:
399+
logger.info(f"{skipped_count} job(s) skipped (completed or OOM)")
398400
if successful_submissions > 0:
399401
logger.info("Use 'squeue -u $USER' to monitor job status")
400402
logger.info("Use 'scancel <job_id>' to cancel jobs if needed")

0 commit comments

Comments
 (0)