创建一个Tensorboard,可以通过一个任务或者指定数据源配置来创建。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
调试
授权信息
请求语法
POST /api/v1/tensorboards HTTP/1.1
请求参数
|
名称 |
类型 |
必填 |
描述 |
示例值 |
| body |
object |
否 |
请求参数。 |
{"DisplayName":"tensorboard","DataSourceType":"OSS","SummaryPath":"/root/data/","WorkspaceId":"123***","DataSourceId":"d-xxxxxxxx"} |
| WorkspaceId |
string |
否 |
工作空间 ID。如何获取工作空间 ID,请参见 ListWorkspaces 。 |
123*** |
| JobId |
string |
否 |
任务 ID。如何获取任务 ID,请参见 ListJobs 。 |
dlc-20210126170216-mtl37ge7gkvdz |
| DataSourceId |
string |
否 |
数据集 ID。如何获取数据集 ID,请参见 ListDatasets 。 |
d-xxxxxxxx |
| DataSourceType |
string |
否 |
数据集类型,取值如下:
|
OSS |
| Uri |
string |
否 |
数据集的 URI:
|
oss://.oss-cn-shanghai-finance-1.aliyuncs.com/ |
| Options |
string |
否 |
数据集的扩展字段为 JSON 格式,当前支持 MountPath:自定义数据集挂载的路径。 |
{"mountpath":"/root/data/"} |
| SummaryPath |
string |
否 |
Summary 目录。 |
/root/data/ |
| SummaryRelativePath |
string |
否 |
Summary 相对目录。 |
/summary/ |
| DisplayName |
string |
否 |
Tensorboard 名称。 |
tensorboard |
| SourceType |
string |
否 |
来源类型。 |
job |
| SourceId |
string |
否 |
来源 ID。 |
dlc-xxxxxx |
| MaxRunningTimeMinutes |
integer |
否 |
最长运行时长,单位为:分钟。 |
240 |
| DataSources |
array |
否 |
数据源配置。 |
|
| DataSourceItem |
否 |
数据源信息。 |
||
| Cpu |
integer |
否 |
CPU 核数。 |
1 |
| Memory |
integer |
否 |
内存大小,单位为:GB。 |
1000 |
| TensorboardDataSources |
array |
否 |
Tensorboard 任务挂载的数据集配置列表。 |
|
| TensorboardDataSourceSpec |
否 |
Tensorboard 数据源配置信息,用于 Tensorboard 挂载多数据集功能。目前支持按数据集配置(datasource)和按任务配置(dlc)。当 Tensorboard 数据源配置信息不为空时,DataSourceId 配置,Uri, DataSourceType 等参数不生效 |
||
| TensorboardSpec | TensorboardSpec |
否 |
Tensorboard 后付费配置信息,用于创建使用后付费资源的 Tensorboard 任务。 |
|
| QuotaId |
string |
否 |
资源配额 ID。使用资源配额的资源创建 Tensorboard 任务时的必填参数。如何获取资源配额 ID,请参见 ListQuotas 。 只发布国内站 当前仅白名单用户可以使用资源配额资源创建 Tensorboard 任务,若需要使用该功能,请和我们联系 |
quota12345 |
| Priority |
string |
否 |
任务的优先级,可选参数,默认值 1,参数值的范围是 1~9。其中:
|
1 |
| Accessibility |
string |
否 |
任务的可见性,取值如下:
|
PRIVATE |
返回参数
|
名称 |
类型 |
描述 |
示例值 |
|
object |
|||
| JobId |
string |
任务 ID。 |
dlc-20210126170216-xxxxxxxx |
| DataSourceId |
string |
数据集 ID。 |
ds-20210126170216-xxxxxxxx |
| TensorboardId |
string |
Tensorboard ID。 |
tbxxxxxxxx |
| RequestId |
string |
请求 ID。 |
473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E |
示例
正常返回示例
JSON格式
{
"JobId": "dlc-20210126170216-xxxxxxxx",
"DataSourceId": "ds-20210126170216-xxxxxxxx",
"TensorboardId": "tbxxxxxxxx",
"RequestId": "473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E"
}
错误码
访问错误中心查看更多错误码。
变更历史
更多信息,参考变更详情。