FlowGraph

Applicable Products

Product

Supported

Atlas A3 training products / Atlas A3 inference products

√

Atlas A2 training products / Atlas A2 inference products

√

Atlas 200I/500 A2 inference products

x

Atlas inference products

x

Atlas training products

x

Function Description

Defines a DataFlow graph, which consists of the input node FlowData and compute node FlowNode.

Prototype

1
FlowGraph(outputs, graph_options={}, name=None, graphpp_builder_async = False)

Parameters

Parameter

Data Type

Value Description

outputs

List[FlowOutput]

All outputs of the FlowGraph output node must be included. For details, see dataflow.FlowOutput.

graph_options

Dict[str, str]

Options compiled by FlowGraph, which currently supports the configuration parameters passed by the AddGraph API.

For details about options, see Options.

The configuration example must be adapted based on Python.

name

str

Graph name. The framework automatically ensures that the graph name is unique. If this parameter is not set, names such as FlowGraph, FlowGraph_1, FlowGraph_2, and the like will be automatically generated.

graphpp_builder_async

bool

Whether the builder of GraphProcessPoint in FlowGraph is executed asynchronously. The values are as follows:

  • True: yes
  • False: no

The default value is False.

Returns

None is returned in normal scenarios.

The DfException exception is reported in abnormal scenarios. You can obtain error_code and message in DfException to view the error code and error information. For details, see DataFlow Error Codes.

Examples

1
2
import dataflow as df
graph = df.FlowGraph(...)

Constraints

None