---
title: dataflow.init
description: "| 产品 | 是否支持 |"
url: https://www.hiascend.com/document/detail/zh/canncommercial/latest/others/dataflowdevg/dfrefp_23_0050.html
sourcePath: /source/zh/canncommercial/900/others/dataflowdevg/dfrefp_23_0050.html
indexId: de18245bf26ad01c78c0c38ff489d96a2716df62d793905989ab7cca3d4e80a969
---
# dataflow.init

#### 产品支持情况

| 产品 | 是否支持 |
| --- | --- |
| Atlas A3 训练系列产品 / Atlas A3 推理系列产品 | √ |
| Atlas A2 训练系列产品 / Atlas A2 推理系列产品 | √ |
| Atlas 200I/500 A2 推理产品 | x |
| Atlas 推理系列产品 | x |
| Atlas 训练系列产品 | x |


#### 函数功能

初始化dataflow时的options。


#### 函数原型

```
init(flow_options)
```


#### 参数说明

| 参数名称 | 数据类型 | 取值说明 |
| --- | --- | --- |
| flow\_options | Dict[str, str] | 初始化dataflow时的options。options当前支持全局和session级别的。 options详细描述可以参考“options参数说明(https://www.hiascend.comdocument/detail/zh/canncommercial/900/API/ascendgraphapi/atlasgeapi\_07\_0150.html)”。 其中的配置示例请按照Python语言进行适配。 |


#### 返回值

正常场景下返回None。

异常情况下会抛出DfException异常。可以通过捕捉异常获取DfException中的error_code与message查看具体的错误码及错误信息。详细信息请参考DataFlow错误码。


#### 调用示例

```
import dataflow as df
df.init(...)
```


#### 约束说明

无
