Skip to content

Commit

Permalink
Cap progress to 0.99 if experiment is still running (#861)
Browse files Browse the repository at this point in the history
* Cap progress to 0.99 if experiment is still running
  • Loading branch information
us8945 committed Sep 19, 2024
1 parent 3284a5c commit 32fa36b
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions llm_studio/app_utils/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -1850,6 +1850,13 @@ def get_experiments(
# make sure progress is 100% for finished experiments
df.loc[df.status == "finished", "progress"] = "1.0"

# make sure that if experiment is running the progress is at most 99%
df.loc[
(df.status == "running")
& (pd.to_numeric(df.progress, errors="coerce") > 0.99),
"progress",
] = ".99"

df["info"] = np.where(
(df["status"] == "running") & (df["eta"] != ""),
df["eta"].apply(lambda x: f"ETA: {x}"),
Expand Down

0 comments on commit 32fa36b

Please sign in to comment.