资源计费与日志 参数详情
字段「默认值/必填/可选值」为后端表单(
add/edit_form_extra_fields)静态快照,运行时可能随用户、配置或_info接口动态变化,联调时以$view/api/_info返回为准。通用调用约定见 README 与 标准化接口。
计量计费
/pod_modelview/api,表名:pod,视图:Pod_ModelView_Api,模型:Pod。
源码:myapp/views/view_pod.py,myapp/models/model_pod.py。
新增参数
无。
修改参数
无。
查看参数
无。
账单管理
/bill_modelview/api,表名:bill,视图:Bill_ModelView_Api,模型:Bill。
源码:myapp/views/view_bill.py,myapp/models/model_bill.py。
新增参数
无。
修改参数
无。
查看参数
| 参数 | 名称 | 类型 | 必填 | 默认值 | 唯一 | 说明 | 校验/可选值 |
|---|---|---|---|---|---|---|---|
details_url |
details_url | computed | 否 | 否 |
报警消息
/message_modelview/api,表名:message,视图:Message_ModelView_Api,模型:Message。
源码:myapp/views/view_message.py,myapp/models/model_message.py。
新增参数
无。
修改参数
无。
查看参数
无。
机器资源
/node_modelview/api,表名:node,视图:Node_ModelView_Api,模型:Node。
源码:myapp/views/view_resource_node.py,myapp/models/model_node.py。
新增参数
无。
修改参数
| 参数 | 名称 | 类型 | 必填 | 默认值 | 唯一 | 说明 | 校验/可选值 |
|---|---|---|---|---|---|---|---|
enable_cpu |
enable_cpu | string(enum) | 否 | true | 否 | 是否允许调度cpu任务 | choices=[['true', 'true'], ['false', 'false']] |
enable_gpu |
enable_gpu | string(enum) | 否 | true | 否 | 是否允许调度gpu任务 | choices=[['true', 'true'], ['false', 'false']] |
enable_vgpu |
enable_vgpu | string(enum) | 否 | false | 否 | 是否允许调度vgpu任务 | choices=[['true', 'true'], ['false', 'false']] |
enable_rdma |
enable_rdma | string(enum) | 否 | false | 否 | 是否允许调度rdma任务 | choices=[['true', 'true'], ['false', 'false']] |
gpu_type |
gpu_type | string(enum) | 否 | T4 | 否 | gpu卡的类型 | Regexp('^[A-Z0-9]*$'); choices=[['T4', 'T4'], ['V100', 'V100'], ['A10', 'A10'], ['A100', 'A100'], ['A800', 'A800'], ['H100', 'H100'], ['H... |
org |
org | string | 是 | public | 否 | 划分资源组,一台机器只能归属于一个资源组,字母、数字、减号 | DataRequired(); Regexp('^[a-z0-9\-]*$') |
worker_type |
worker_type | array | 是 | ['notebook', 'train', 'service'] | 否 | 机器允许的任务类型 | DataRequired(); choices=[[x, x] for x in ['notebook', 'train', 'service']] |
查看参数
无。
存储资源
/storage_modelview/api,表名:storage,视图:Storage_ModelView_Api,模型:Storage。
源码:myapp/views/view_resource_storage.py,myapp/models/model_storage.py。
新增参数
| 参数 | 名称 | 类型 | 必填 | 默认值 | 唯一 | 说明 | 校验/可选值 |
|---|---|---|---|---|---|---|---|
storage_type |
storage_type | string(enum) | 是 | nfs | 否 | 分布式文件存储类型 | DataRequired(); choices=[['nfs', 'nfs'], ['cfs', 'tencent cloud cfs'], ['cos', 'tencent cloud cos'], ['nas', 'ali cloud nas'], ['oss', 'a... |
name |
name | string | 是 | 否 | 英文名(小写字母、数字、- 组成),最长50个字符 | DataRequired(); Regexp('^[a-z][a-z0-9\-]*[a-z0-9]$') | |
describe |
describe | string | 是 | 否 | 存储的描述 | DataRequired() | |
config |
配置 | string | 是 | '\nnfs:\n server: nfs-server-ip\n path: /path/to/nfs/shar... | 否 | 参数配置,yaml格式 | DataRequired() |
clusters |
clusters | array | 是 | 否 | 可用集群 | DataRequired(); choices=[[x, x] for x in list(conf.get('CLUSTERS', {}).keys())] |
修改参数
| 参数 | 名称 | 类型 | 必填 | 默认值 | 唯一 | 说明 | 校验/可选值 |
|---|---|---|---|---|---|---|---|
storage_type |
storage_type | string(enum) | 是 | nfs | 否 | 分布式文件存储类型 | DataRequired(); choices=[['nfs', 'nfs'], ['cfs', 'tencent cloud cfs'], ['cos', 'tencent cloud cos'], ['nas', 'ali cloud nas'], ['oss', 'a... |
name |
name | string | 是 | 否 | 英文名(小写字母、数字、- 组成),最长50个字符 | DataRequired(); Regexp('^[a-z][a-z0-9\-]*[a-z0-9]$') | |
describe |
describe | string | 是 | 否 | 存储的描述 | DataRequired() | |
config |
配置 | string | 是 | '\nnfs:\n server: nfs-server-ip\n path: /path/to/nfs/shar... | 否 | 参数配置,yaml格式 | DataRequired() |
clusters |
clusters | array | 是 | 否 | 可用集群 | DataRequired(); choices=[[x, x] for x in list(conf.get('CLUSTERS', {}).keys())] |
查看参数
无。
日志列表
/log_modelview/api,表名:logs,视图:LOG_ModelView_Api,模型:Log。
源码:myapp/views/view_log.py,myapp/models/log.py。
新增参数
无。
修改参数
无。
查看参数
无。