DataPathComputeBinding 类

配置计算目标上提供所 DataPath 定义数据的方式。

DataPath 配置指示数据在计算目标(上传或装载)上的使用方式,以及是否应覆盖数据。

初始化 DataPathComputeBinding。

构造函数

DataPathComputeBinding(mode='mount', path_on_compute=None, overwrite=False)

参数

名称 说明
mode
str

对数据引用的作。 支持“装载”和“下载”。

默认值: mount
path_on_compute
str

数据引用的计算目标上的路径。

默认值: None
overwrite

指示是否覆盖现有数据。

默认值: False
mode
必需
str

对数据引用的作。 支持“装载”和“下载”。

path_on_compute
必需
str

数据引用的计算目标上的路径。

overwrite
必需

指示是否覆盖现有数据。

方法

create_data_reference

从 DataPath 和此 DataPathComputeBinding 创建 DataReference。

create_from_data_reference

从 DataReference 创建 DataPathComputeBinding。

create_data_reference

从 DataPath 和此 DataPathComputeBinding 创建 DataReference。

create_data_reference(data_reference_name=None, datapath=None)

参数

名称 说明
data_reference_name
str

要创建的数据引用的名称。

默认值: None
datapath

[必需]用于创建数据引用的数据路径。

默认值: None

返回

类型 说明

DataReference 对象。

create_from_data_reference

从 DataReference 创建 DataPathComputeBinding。

static create_from_data_reference(data_reference)

参数

名称 说明
data_reference
必需

[必需]用于创建数据路径计算绑定的数据引用。

返回

类型 说明

DataPathComputeBinding 对象。