Skip to content

Commit 6f2364e

Browse files
committed
add/skip types to match what PublicAPIFlowController.java sends
1 parent bfa43fb commit 6f2364e

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

dataikuapi/dss/flow.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -515,8 +515,9 @@ def get_successor_computables(self, node, as_type="dict"):
515515
return self._convert_nodes_list(computables, as_type)
516516

517517
def _convert_nodes_list(self, nodes, as_type):
518+
actual_nodes = [node for node in nodes if node['type'] != 'RUNNABLE_IMPLICIT_RECIPE']
518519
if as_type == "object" or as_type == "objects":
519-
return [self._get_object_from_graph_node(node) for node in nodes]
520+
return [self._get_object_from_graph_node(node) for node in actual_nodes]
520521
else:
521522
return nodes
522523

@@ -529,6 +530,8 @@ def _get_object_from_graph_node(self, node):
529530
return DSSManagedFolder(self.flow.client, self.flow.project.project_key, node["ref"])
530531
elif node["type"] == "COMPUTABLE_SAVED_MODEL":
531532
return DSSSavedModel(self.flow.client, self.flow.project.project_key, node["ref"])
533+
elif node["type"] == "COMPUTABLE_STREAMING_ENDPOINT":
534+
return DSSStreamingEndpoint(self.flow.client, self.flow.project.project_key, node["ref"])
532535
else:
533536
# TODO add streaming elements
534537
raise Exception("unsupported node type: %s" % node["type"])

0 commit comments

Comments
 (0)