Skip to content

Commit

Permalink
[Runs] Give precedence to artifact target path over URI in result HTML (
Browse files Browse the repository at this point in the history
  • Loading branch information
alonmr committed May 21, 2024
1 parent e993ee2 commit a73ad7d
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions mlrun/render.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ def artifacts_html(

if not attribute_value:
mlrun.utils.logger.warning(
"Artifact is incomplete, omitting from output (most likely due to a failed artifact logging)",
f"Artifact required attribute {attribute_name} is missing, omitting from output",
artifact_key=key,
)
continue
Expand Down Expand Up @@ -400,14 +400,17 @@ def time_str(x):
else:
df["labels"] = df["labels"].apply(dict_html)
df["inputs"] = df["inputs"].apply(inputs_html)
if df["artifact_uris"][0]:
df["artifact_uris"] = df["artifact_uris"].apply(dict_html)
df.drop("artifacts", axis=1, inplace=True)
else:
if df["artifacts"][0]:
df["artifacts"] = df["artifacts"].apply(
lambda artifacts: artifacts_html(artifacts, "target_path"),
)
df.drop("artifact_uris", axis=1, inplace=True)
elif df["artifact_uris"][0]:
df["artifact_uris"] = df["artifact_uris"].apply(dict_html)
df.drop("artifacts", axis=1, inplace=True)
else:
df.drop("artifacts", axis=1, inplace=True)
df.drop("artifact_uris", axis=1, inplace=True)

def expand_error(x):
if x["state"] == "error":
Expand Down

0 comments on commit a73ad7d

Please sign in to comment.