dataflow.utils.generate_deploy_template

Applicability

Product

Supported

Atlas A3 training product/Atlas A3 inference product

Atlas A2 training product/Atlas A2 inference product

Atlas 200I/500 A2 inference product

x

Atlas inference product

x

Atlas training product

x

Function Description

Generates a template of files required by option:"ge.experiment.data_flow_deploy_info_path" in a specified deployment location based on FlowGraph. For details about the format, see Specifying the Deployment Location of the DataFlow Node.

Prototype

1
generate_deploy_template(graph, file_path)

Parameters

Parameter

Data Type

Description

graph

FlowGraph

Constructed FlowGraph.

file_path

str

Path (including the file name) of the file used to specify the deployment information.

Returns

None

Examples

1
2
3
4
import dataflow as df
# The graph construction process is omitted.
dag = df.FlowGraph([output])
df.utils.generate_deploy_template(dag, "deploy_info.json")

Constraints

The default deployment location of the generated template is device0. If you need to adjust the location, manually modify the file.