diff --git a/metaflow/graph.py b/metaflow/graph.py index ed5f87bb52..1642600696 100644 --- a/metaflow/graph.py +++ b/metaflow/graph.py @@ -175,7 +175,7 @@ def _create_nodes(self, flow): nodes = {} for element in dir(flow): func = getattr(flow, element) - if hasattr(func, "is_step"): + if callable(func) and hasattr(func, "is_step"): source_file = inspect.getsourcefile(func) source_lines, lineno = inspect.getsourcelines(func) source_code = textwrap.dedent("".join(source_lines))