Skip to content

Commit

Permalink
[Runtimes] Fix serving child functions handling and runs compare on p…
Browse files Browse the repository at this point in the history
…roject (#1879)
  • Loading branch information
yaronha committed Apr 7, 2022
1 parent a81a4a4 commit 61f2ad1
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
4 changes: 4 additions & 0 deletions mlrun/frameworks/parallel_coordinates.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import datetime
import os
import warnings
from typing import List, Union

Expand Down Expand Up @@ -192,6 +193,9 @@ def _show_and_export_html(html: str, show=None, filename=None, runs_list=None):
html_table = runs_list.show(False, short=True)

if filename:
dir = os.path.dirname(filename)
if dir:
os.makedirs(dir, exist_ok=True)
with open(filename, "w") as fp:
if runs_list:
# add runs table after the plot
Expand Down
6 changes: 5 additions & 1 deletion mlrun/serving/states.py
Original file line number Diff line number Diff line change
Expand Up @@ -1080,7 +1080,11 @@ def list_child_functions(self):
"""return a list of child function names referred to in the steps"""
functions = []
for step in self.get_children():
if step.function and step.function not in functions:
if (
hasattr(step, "function")
and step.function
and step.function not in functions
):
functions.append(step.function)
return functions

Expand Down

0 comments on commit 61f2ad1

Please sign in to comment.