From 56608577f332e5c6b8932136aa63d2f2ff88f321 Mon Sep 17 00:00:00 2001 From: epwalsh Date: Fri, 12 Apr 2024 16:49:50 -0700 Subject: [PATCH] hack to work around mcli bug --- scripts/mcli/manage_run.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/scripts/mcli/manage_run.py b/scripts/mcli/manage_run.py index c710fe529..8b008d8dd 100644 --- a/scripts/mcli/manage_run.py +++ b/scripts/mcli/manage_run.py @@ -21,6 +21,7 @@ import argparse import sys +import time from concurrent.futures import as_completed from typing import List, Optional, Set @@ -76,8 +77,11 @@ def wait_on_runs(runs: List[Run], timeout: int = _DEFAULT_TIMEOUT) -> List[Run]: Wait on a list of runs to reach 'COMPLETED' status (or a failure of some kind). """ futures = [] - for run in runs: + for i, run in enumerate(runs): futures.append(mcli.api.runs.wait_for_run_status(run, RunStatus.COMPLETED, future=True)) + if i == 0: + # HACK: this works around a bug in `mcli`. + time.sleep(0.05) results = [] for future in track(