yicloud-sdk-python 0.6.0__tar.gz → 0.6.1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (101) hide show
  1. {yicloud_sdk_python-0.6.0 → yicloud_sdk_python-0.6.1}/PKG-INFO +4 -4
  2. {yicloud_sdk_python-0.6.0 → yicloud_sdk_python-0.6.1}/README.md +3 -3
  3. {yicloud_sdk_python-0.6.0 → yicloud_sdk_python-0.6.1}/pyproject.toml +1 -1
  4. {yicloud_sdk_python-0.6.0 → yicloud_sdk_python-0.6.1}/version.py +1 -1
  5. {yicloud_sdk_python-0.6.0 → yicloud_sdk_python-0.6.1}/yicloud/__init__.py +1 -1
  6. {yicloud_sdk_python-0.6.0 → yicloud_sdk_python-0.6.1}/yicloud/services/inferset/__init__.py +16 -0
  7. {yicloud_sdk_python-0.6.0 → yicloud_sdk_python-0.6.1}/yicloud/services/inferset/actions.py +112 -0
  8. {yicloud_sdk_python-0.6.0 → yicloud_sdk_python-0.6.1}/yicloud/services/inferset/models.py +75 -4
  9. {yicloud_sdk_python-0.6.0 → yicloud_sdk_python-0.6.1}/yicloud/services/job/__init__.py +2 -0
  10. {yicloud_sdk_python-0.6.0 → yicloud_sdk_python-0.6.1}/yicloud/services/job/actions.py +20 -14
  11. {yicloud_sdk_python-0.6.0 → yicloud_sdk_python-0.6.1}/yicloud/services/job/models.py +32 -11
  12. {yicloud_sdk_python-0.6.0 → yicloud_sdk_python-0.6.1}/yicloud/services/mc/__init__.py +28 -0
  13. {yicloud_sdk_python-0.6.0 → yicloud_sdk_python-0.6.1}/yicloud/services/mc/actions.py +192 -12
  14. {yicloud_sdk_python-0.6.0 → yicloud_sdk_python-0.6.1}/yicloud/services/mc/models.py +194 -5
  15. {yicloud_sdk_python-0.6.0 → yicloud_sdk_python-0.6.1}/yicloud/services/ray/actions.py +2 -2
  16. {yicloud_sdk_python-0.6.0 → yicloud_sdk_python-0.6.1}/yicloud/services/ray/models.py +14 -5
  17. {yicloud_sdk_python-0.6.0 → yicloud_sdk_python-0.6.1}/yicloud/services/service/__init__.py +53 -23
  18. {yicloud_sdk_python-0.6.0 → yicloud_sdk_python-0.6.1}/yicloud/services/service/actions.py +150 -0
  19. {yicloud_sdk_python-0.6.0 → yicloud_sdk_python-0.6.1}/yicloud/services/service/models.py +380 -191
  20. {yicloud_sdk_python-0.6.0 → yicloud_sdk_python-0.6.1}/yicloud/services/volume/models.py +1 -1
  21. {yicloud_sdk_python-0.6.0 → yicloud_sdk_python-0.6.1}/yicloud/services/workspace/__init__.py +7 -0
  22. {yicloud_sdk_python-0.6.0 → yicloud_sdk_python-0.6.1}/yicloud/services/workspace/models.py +91 -7
  23. {yicloud_sdk_python-0.6.0 → yicloud_sdk_python-0.6.1}/yicloud_sdk_python.egg-info/PKG-INFO +4 -4
  24. {yicloud_sdk_python-0.6.0 → yicloud_sdk_python-0.6.1}/LICENSE +0 -0
  25. {yicloud_sdk_python-0.6.0 → yicloud_sdk_python-0.6.1}/setup.cfg +0 -0
  26. {yicloud_sdk_python-0.6.0 → yicloud_sdk_python-0.6.1}/yicloud/base/__init__.py +0 -0
  27. {yicloud_sdk_python-0.6.0 → yicloud_sdk_python-0.6.1}/yicloud/base/auth/__init__.py +0 -0
  28. {yicloud_sdk_python-0.6.0 → yicloud_sdk_python-0.6.1}/yicloud/base/auth/credential.py +0 -0
  29. {yicloud_sdk_python-0.6.0 → yicloud_sdk_python-0.6.1}/yicloud/base/auth/sign.py +0 -0
  30. {yicloud_sdk_python-0.6.0 → yicloud_sdk_python-0.6.1}/yicloud/base/client.py +0 -0
  31. {yicloud_sdk_python-0.6.0 → yicloud_sdk_python-0.6.1}/yicloud/base/config.py +0 -0
  32. {yicloud_sdk_python-0.6.0 → yicloud_sdk_python-0.6.1}/yicloud/base/errs/__init__.py +0 -0
  33. {yicloud_sdk_python-0.6.0 → yicloud_sdk_python-0.6.1}/yicloud/base/log/__init__.py +0 -0
  34. {yicloud_sdk_python-0.6.0 → yicloud_sdk_python-0.6.1}/yicloud/base/log/logger.py +0 -0
  35. {yicloud_sdk_python-0.6.0 → yicloud_sdk_python-0.6.1}/yicloud/base/log/std.py +0 -0
  36. {yicloud_sdk_python-0.6.0 → yicloud_sdk_python-0.6.1}/yicloud/base/msgs/__init__.py +0 -0
  37. {yicloud_sdk_python-0.6.0 → yicloud_sdk_python-0.6.1}/yicloud/base/utils/__init__.py +0 -0
  38. {yicloud_sdk_python-0.6.0 → yicloud_sdk_python-0.6.1}/yicloud/base/utils/helps.py +0 -0
  39. {yicloud_sdk_python-0.6.0 → yicloud_sdk_python-0.6.1}/yicloud/base/utils/retry/__init__.py +0 -0
  40. {yicloud_sdk_python-0.6.0 → yicloud_sdk_python-0.6.1}/yicloud/base/utils/retry/retry.py +0 -0
  41. {yicloud_sdk_python-0.6.0 → yicloud_sdk_python-0.6.1}/yicloud/services/__init__.py +0 -0
  42. {yicloud_sdk_python-0.6.0 → yicloud_sdk_python-0.6.1}/yicloud/services/bc/__init__.py +0 -0
  43. {yicloud_sdk_python-0.6.0 → yicloud_sdk_python-0.6.1}/yicloud/services/bc/actions.py +0 -0
  44. {yicloud_sdk_python-0.6.0 → yicloud_sdk_python-0.6.1}/yicloud/services/bc/client.py +0 -0
  45. {yicloud_sdk_python-0.6.0 → yicloud_sdk_python-0.6.1}/yicloud/services/bc/models.py +0 -0
  46. {yicloud_sdk_python-0.6.0 → yicloud_sdk_python-0.6.1}/yicloud/services/dataset/__init__.py +0 -0
  47. {yicloud_sdk_python-0.6.0 → yicloud_sdk_python-0.6.1}/yicloud/services/dataset/actions.py +0 -0
  48. {yicloud_sdk_python-0.6.0 → yicloud_sdk_python-0.6.1}/yicloud/services/dataset/client.py +0 -0
  49. {yicloud_sdk_python-0.6.0 → yicloud_sdk_python-0.6.1}/yicloud/services/dataset/models.py +0 -0
  50. {yicloud_sdk_python-0.6.0 → yicloud_sdk_python-0.6.1}/yicloud/services/evaluation/__init__.py +0 -0
  51. {yicloud_sdk_python-0.6.0 → yicloud_sdk_python-0.6.1}/yicloud/services/evaluation/actions.py +0 -0
  52. {yicloud_sdk_python-0.6.0 → yicloud_sdk_python-0.6.1}/yicloud/services/evaluation/client.py +0 -0
  53. {yicloud_sdk_python-0.6.0 → yicloud_sdk_python-0.6.1}/yicloud/services/evaluation/models.py +0 -0
  54. {yicloud_sdk_python-0.6.0 → yicloud_sdk_python-0.6.1}/yicloud/services/fs/__init__.py +0 -0
  55. {yicloud_sdk_python-0.6.0 → yicloud_sdk_python-0.6.1}/yicloud/services/fs/actions.py +0 -0
  56. {yicloud_sdk_python-0.6.0 → yicloud_sdk_python-0.6.1}/yicloud/services/fs/client.py +0 -0
  57. {yicloud_sdk_python-0.6.0 → yicloud_sdk_python-0.6.1}/yicloud/services/fs/models.py +0 -0
  58. {yicloud_sdk_python-0.6.0 → yicloud_sdk_python-0.6.1}/yicloud/services/iam/__init__.py +0 -0
  59. {yicloud_sdk_python-0.6.0 → yicloud_sdk_python-0.6.1}/yicloud/services/iam/actions.py +0 -0
  60. {yicloud_sdk_python-0.6.0 → yicloud_sdk_python-0.6.1}/yicloud/services/iam/client.py +0 -0
  61. {yicloud_sdk_python-0.6.0 → yicloud_sdk_python-0.6.1}/yicloud/services/iam/models.py +0 -0
  62. {yicloud_sdk_python-0.6.0 → yicloud_sdk_python-0.6.1}/yicloud/services/inferset/client.py +0 -0
  63. {yicloud_sdk_python-0.6.0 → yicloud_sdk_python-0.6.1}/yicloud/services/job/client.py +0 -0
  64. {yicloud_sdk_python-0.6.0 → yicloud_sdk_python-0.6.1}/yicloud/services/mc/client.py +0 -0
  65. {yicloud_sdk_python-0.6.0 → yicloud_sdk_python-0.6.1}/yicloud/services/modelrepo/__init__.py +0 -0
  66. {yicloud_sdk_python-0.6.0 → yicloud_sdk_python-0.6.1}/yicloud/services/modelrepo/actions.py +0 -0
  67. {yicloud_sdk_python-0.6.0 → yicloud_sdk_python-0.6.1}/yicloud/services/modelrepo/client.py +0 -0
  68. {yicloud_sdk_python-0.6.0 → yicloud_sdk_python-0.6.1}/yicloud/services/modelrepo/models.py +0 -0
  69. {yicloud_sdk_python-0.6.0 → yicloud_sdk_python-0.6.1}/yicloud/services/monitor/__init__.py +0 -0
  70. {yicloud_sdk_python-0.6.0 → yicloud_sdk_python-0.6.1}/yicloud/services/monitor/actions.py +0 -0
  71. {yicloud_sdk_python-0.6.0 → yicloud_sdk_python-0.6.1}/yicloud/services/monitor/client.py +0 -0
  72. {yicloud_sdk_python-0.6.0 → yicloud_sdk_python-0.6.1}/yicloud/services/monitor/models.py +0 -0
  73. {yicloud_sdk_python-0.6.0 → yicloud_sdk_python-0.6.1}/yicloud/services/monitor/v1alpha1/__init__.py +0 -0
  74. {yicloud_sdk_python-0.6.0 → yicloud_sdk_python-0.6.1}/yicloud/services/monitor/v1alpha1/actions.py +0 -0
  75. {yicloud_sdk_python-0.6.0 → yicloud_sdk_python-0.6.1}/yicloud/services/monitor/v1alpha1/client.py +0 -0
  76. {yicloud_sdk_python-0.6.0 → yicloud_sdk_python-0.6.1}/yicloud/services/monitor/v1alpha1/models.py +0 -0
  77. {yicloud_sdk_python-0.6.0 → yicloud_sdk_python-0.6.1}/yicloud/services/oss/__init__.py +0 -0
  78. {yicloud_sdk_python-0.6.0 → yicloud_sdk_python-0.6.1}/yicloud/services/oss/actions.py +0 -0
  79. {yicloud_sdk_python-0.6.0 → yicloud_sdk_python-0.6.1}/yicloud/services/oss/client.py +0 -0
  80. {yicloud_sdk_python-0.6.0 → yicloud_sdk_python-0.6.1}/yicloud/services/oss/models.py +0 -0
  81. {yicloud_sdk_python-0.6.0 → yicloud_sdk_python-0.6.1}/yicloud/services/ray/__init__.py +0 -0
  82. {yicloud_sdk_python-0.6.0 → yicloud_sdk_python-0.6.1}/yicloud/services/ray/client.py +0 -0
  83. {yicloud_sdk_python-0.6.0 → yicloud_sdk_python-0.6.1}/yicloud/services/registry/__init__.py +0 -0
  84. {yicloud_sdk_python-0.6.0 → yicloud_sdk_python-0.6.1}/yicloud/services/registry/actions.py +0 -0
  85. {yicloud_sdk_python-0.6.0 → yicloud_sdk_python-0.6.1}/yicloud/services/registry/client.py +0 -0
  86. {yicloud_sdk_python-0.6.0 → yicloud_sdk_python-0.6.1}/yicloud/services/registry/models.py +0 -0
  87. {yicloud_sdk_python-0.6.0 → yicloud_sdk_python-0.6.1}/yicloud/services/sandbox/__init__.py +0 -0
  88. {yicloud_sdk_python-0.6.0 → yicloud_sdk_python-0.6.1}/yicloud/services/sandbox/actions.py +0 -0
  89. {yicloud_sdk_python-0.6.0 → yicloud_sdk_python-0.6.1}/yicloud/services/sandbox/client.py +0 -0
  90. {yicloud_sdk_python-0.6.0 → yicloud_sdk_python-0.6.1}/yicloud/services/sandbox/models.py +0 -0
  91. {yicloud_sdk_python-0.6.0 → yicloud_sdk_python-0.6.1}/yicloud/services/service/client.py +0 -0
  92. {yicloud_sdk_python-0.6.0 → yicloud_sdk_python-0.6.1}/yicloud/services/volume/__init__.py +0 -0
  93. {yicloud_sdk_python-0.6.0 → yicloud_sdk_python-0.6.1}/yicloud/services/volume/actions.py +0 -0
  94. {yicloud_sdk_python-0.6.0 → yicloud_sdk_python-0.6.1}/yicloud/services/volume/client.py +0 -0
  95. {yicloud_sdk_python-0.6.0 → yicloud_sdk_python-0.6.1}/yicloud/services/workspace/actions.py +0 -0
  96. {yicloud_sdk_python-0.6.0 → yicloud_sdk_python-0.6.1}/yicloud/services/workspace/client.py +0 -0
  97. {yicloud_sdk_python-0.6.0 → yicloud_sdk_python-0.6.1}/yicloud_sdk_python.egg-info/SOURCES.txt +0 -0
  98. {yicloud_sdk_python-0.6.0 → yicloud_sdk_python-0.6.1}/yicloud_sdk_python.egg-info/dependency_links.txt +0 -0
  99. {yicloud_sdk_python-0.6.0 → yicloud_sdk_python-0.6.1}/yicloud_sdk_python.egg-info/not-zip-safe +0 -0
  100. {yicloud_sdk_python-0.6.0 → yicloud_sdk_python-0.6.1}/yicloud_sdk_python.egg-info/requires.txt +0 -0
  101. {yicloud_sdk_python-0.6.0 → yicloud_sdk_python-0.6.1}/yicloud_sdk_python.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: yicloud-sdk-python
3
- Version: 0.6.0
3
+ Version: 0.6.1
4
4
  Summary: YiCloud OpenAPI SDK for Python
5
5
  Author: YiCloud
6
6
  Project-URL: Homepage, https://gitee.com/yicloud-team/openapi-sdk-python
@@ -114,16 +114,16 @@ except base.exc.YiCloudException as e:
114
114
  | Evaluation | `yicloud.services.evaluation` | 9 | 模型评测 EVALUATION |
115
115
  | FS | `yicloud.services.fs` | 10 | 文件系统 FS |
116
116
  | IAM | `yicloud.services.iam` | 13 | 访问控制 IAM |
117
- | Inferset | `yicloud.services.inferset` | 26 | 模型推理服务 INFERSET |
117
+ | Inferset | `yicloud.services.inferset` | 30 | 模型推理服务 INFERSET |
118
118
  | JOB | `yicloud.services.job` | 15 | 训练任务 JOB |
119
- | MC | `yicloud.services.mc` | 47 | 管理中心 MC |
119
+ | MC | `yicloud.services.mc` | 53 | 管理中心 MC |
120
120
  | Modelrepo | `yicloud.services.modelrepo` | 11 | 模型仓库 OpenAPI |
121
121
  | Monitor | `yicloud.services.monitor` | 3 | 监控中心 MONITOR |
122
122
  | OSS | `yicloud.services.oss` | 7 | 对象存储OSS |
123
123
  | RAY | `yicloud.services.ray` | 9 | 分布式计算 Ray |
124
124
  | Registry | `yicloud.services.registry` | 9 | 镜像仓库 REGISTRY |
125
125
  | Sandbox | `yicloud.services.sandbox` | 24 | 沙盒 SANDBOX |
126
- | Service | `yicloud.services.service` | 11 | 容器应用 SERVICE |
126
+ | Service | `yicloud.services.service` | 16 | 容器应用 SERVICE |
127
127
  | Volume | `yicloud.services.volume` | 12 | 云盘管理 Volume |
128
128
  | Workspace | `yicloud.services.workspace` | 34 | 开发机 WS |
129
129
 
@@ -75,16 +75,16 @@ except base.exc.YiCloudException as e:
75
75
  | Evaluation | `yicloud.services.evaluation` | 9 | 模型评测 EVALUATION |
76
76
  | FS | `yicloud.services.fs` | 10 | 文件系统 FS |
77
77
  | IAM | `yicloud.services.iam` | 13 | 访问控制 IAM |
78
- | Inferset | `yicloud.services.inferset` | 26 | 模型推理服务 INFERSET |
78
+ | Inferset | `yicloud.services.inferset` | 30 | 模型推理服务 INFERSET |
79
79
  | JOB | `yicloud.services.job` | 15 | 训练任务 JOB |
80
- | MC | `yicloud.services.mc` | 47 | 管理中心 MC |
80
+ | MC | `yicloud.services.mc` | 53 | 管理中心 MC |
81
81
  | Modelrepo | `yicloud.services.modelrepo` | 11 | 模型仓库 OpenAPI |
82
82
  | Monitor | `yicloud.services.monitor` | 3 | 监控中心 MONITOR |
83
83
  | OSS | `yicloud.services.oss` | 7 | 对象存储OSS |
84
84
  | RAY | `yicloud.services.ray` | 9 | 分布式计算 Ray |
85
85
  | Registry | `yicloud.services.registry` | 9 | 镜像仓库 REGISTRY |
86
86
  | Sandbox | `yicloud.services.sandbox` | 24 | 沙盒 SANDBOX |
87
- | Service | `yicloud.services.service` | 11 | 容器应用 SERVICE |
87
+ | Service | `yicloud.services.service` | 16 | 容器应用 SERVICE |
88
88
  | Volume | `yicloud.services.volume` | 12 | 云盘管理 Volume |
89
89
  | Workspace | `yicloud.services.workspace` | 34 | 开发机 WS |
90
90
 
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "yicloud-sdk-python"
7
- version = "0.6.0"
7
+ version = "0.6.1"
8
8
  description = "YiCloud OpenAPI SDK for Python"
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.7"
@@ -1,4 +1,4 @@
1
- __version__ = "0.6.0"
1
+ __version__ = "0.6.1"
2
2
 
3
3
 
4
4
  def Version() -> str:
@@ -4,4 +4,4 @@ YiCloud Python SDK
4
4
  A Python SDK for the YiCloud OpenAPI service.
5
5
  """
6
6
 
7
- __version__ = "0.6.0"
7
+ __version__ = "0.6.1"
@@ -5,12 +5,15 @@ from . import actions, models
5
5
 
6
6
  # Re-export action functions
7
7
  from .actions import (
8
+ change_inference_audit_bucket,
8
9
  create_inferset,
9
10
  create_inferset_scale_object,
10
11
  delete_inferset,
11
12
  delete_inferset_pod,
12
13
  delete_inferset_scale_object,
14
+ disable_inference_audit,
13
15
  download_inferset_logs,
16
+ enable_inference_audit,
14
17
  get_inferset,
15
18
  get_inferset_logs_query_range,
16
19
  get_inferset_logs_tail,
@@ -18,6 +21,7 @@ from .actions import (
18
21
  get_inferset_scale_object,
19
22
  get_inferset_terminal,
20
23
  get_inferset_traffic,
24
+ get_inference_audit,
21
25
  list_inferset,
22
26
  list_inferset_replica,
23
27
  list_model_skus,
@@ -31,12 +35,15 @@ from .actions import (
31
35
  list_metrics,
32
36
  list_platform_model_skus,
33
37
  validate_cron_overlap,
38
+ change_inference_audit_bucket_async,
34
39
  create_inferset_async,
35
40
  create_inferset_scale_object_async,
36
41
  delete_inferset_async,
37
42
  delete_inferset_pod_async,
38
43
  delete_inferset_scale_object_async,
44
+ disable_inference_audit_async,
39
45
  download_inferset_logs_async,
46
+ enable_inference_audit_async,
40
47
  get_inferset_async,
41
48
  get_inferset_logs_query_range_async,
42
49
  get_inferset_logs_tail_async,
@@ -44,6 +51,7 @@ from .actions import (
44
51
  get_inferset_scale_object_async,
45
52
  get_inferset_terminal_async,
46
53
  get_inferset_traffic_async,
54
+ get_inference_audit_async,
47
55
  list_inferset_async,
48
56
  list_inferset_replica_async,
49
57
  list_model_skus_async,
@@ -97,6 +105,7 @@ from .models import (
97
105
  CreateInferSetScaleObjectReqAutoScalingTriggerMetrics,
98
106
  UpdateInferSetReqAutoScalingTriggerMetrics,
99
107
  UpdateInferSetScaleObjectReqAutoScalingTriggerMetrics,
108
+ ChangeInferenceAuditBucketReq,
100
109
  ConfigMapKeyRef,
101
110
  CreateInferSetReqConfigMapKeyRef,
102
111
  UpdateInferSetReqConfigMapKeyRef,
@@ -109,6 +118,7 @@ from .models import (
109
118
  DeleteInferSetPodReq,
110
119
  DeleteInferSetReq,
111
120
  DeleteInferSetScaleObjectReq,
121
+ EnableInferenceAuditReq,
112
122
  EnvironmentVar,
113
123
  CreateInferSetReqEnvironmentVar,
114
124
  UpdateInferSetReqEnvironmentVar,
@@ -132,6 +142,9 @@ from .models import (
132
142
  CreateInferSetData,
133
143
  UpdateInferSetReplicaTrafficData,
134
144
  GetInferSetTrafficData,
145
+ ChangeInferenceAuditBucketData,
146
+ DisableInferenceAuditReq,
147
+ GetInferenceAuditData,
135
148
  InstanceType,
136
149
  CreateInferSetReqInstanceType,
137
150
  UpdateInferSetReqInstanceType,
@@ -213,10 +226,13 @@ from .models import (
213
226
  GetInferSetScaleObjectReq,
214
227
  GetInferSetTerminalReq,
215
228
  GetInferSetTrafficReq,
229
+ GetInferenceAuditReq,
216
230
  ListInferSetReq,
217
231
  ListInferSetReplicaReq,
218
232
  ListMetricsReq,
219
233
  ListPlatformModelSkusReq,
234
+ DisableInferenceAuditData,
235
+ EnableInferenceAuditData,
220
236
  GetInferSetData,
221
237
  UpdateInferSetData,
222
238
  GetInferSetScaleObjectData,
@@ -9,6 +9,34 @@ _PRODUCT_CODE = "inferset"
9
9
  _LAST_VERSION = "v1alpha1"
10
10
 
11
11
 
12
+ def change_inference_audit_bucket(ctx: Optional[dict], req: models.ChangeInferenceAuditBucketReq) -> models.ChangeInferenceAuditBucketData:
13
+ """Change inference audit bucket
14
+ POST /inferset/v1alpha1/ChangeInferenceAuditBucket
15
+ Action: ChangeInferenceAuditBucket
16
+
17
+ Returns ChangeInferenceAuditBucketData on success.
18
+ Raises YiCloudException on error.
19
+ """
20
+ path = f"/{_PRODUCT_CODE}/{_LAST_VERSION}/ChangeInferenceAuditBucket"
21
+ rsp = msgs.Rsp[models.ChangeInferenceAuditBucketData]()
22
+ client.base.post(ctx, path, {k: v for k, v in req.__dict__.items() if v is not None}, rsp)
23
+ return rsp.get_typed_data()
24
+
25
+
26
+ async def change_inference_audit_bucket_async(ctx: Optional[dict], req: models.ChangeInferenceAuditBucketReq) -> models.ChangeInferenceAuditBucketData:
27
+ """Change inference audit bucket(异步)
28
+ POST /inferset/v1alpha1/ChangeInferenceAuditBucket
29
+ Action: ChangeInferenceAuditBucket
30
+
31
+ Returns ChangeInferenceAuditBucketData on success.
32
+ Raises YiCloudException on error.
33
+ """
34
+ path = f"/{_PRODUCT_CODE}/{_LAST_VERSION}/ChangeInferenceAuditBucket"
35
+ rsp = msgs.Rsp[models.ChangeInferenceAuditBucketData]()
36
+ await client.base.post_async(ctx, path, {k: v for k, v in req.__dict__.items() if v is not None}, rsp)
37
+ return rsp.get_typed_data()
38
+
39
+
12
40
  def create_inferset(ctx: Optional[dict], req: models.CreateInferSetReq) -> models.CreateInferSetData:
13
41
  """创建 InferSet
14
42
  创建一个新的 InferSet 推理服务
@@ -153,6 +181,34 @@ async def delete_inferset_scale_object_async(ctx: Optional[dict], req: models.De
153
181
  await client.base.post_async(ctx, path, {k: v for k, v in req.__dict__.items() if v is not None}, rsp)
154
182
 
155
183
 
184
+ def disable_inference_audit(ctx: Optional[dict], req: models.DisableInferenceAuditReq) -> models.DisableInferenceAuditData:
185
+ """Disable inference audit
186
+ POST /inferset/v1alpha1/DisableInferenceAudit
187
+ Action: DisableInferenceAudit
188
+
189
+ Returns DisableInferenceAuditData on success.
190
+ Raises YiCloudException on error.
191
+ """
192
+ path = f"/{_PRODUCT_CODE}/{_LAST_VERSION}/DisableInferenceAudit"
193
+ rsp = msgs.Rsp[models.DisableInferenceAuditData]()
194
+ client.base.post(ctx, path, {k: v for k, v in req.__dict__.items() if v is not None}, rsp)
195
+ return rsp.get_typed_data()
196
+
197
+
198
+ async def disable_inference_audit_async(ctx: Optional[dict], req: models.DisableInferenceAuditReq) -> models.DisableInferenceAuditData:
199
+ """Disable inference audit(异步)
200
+ POST /inferset/v1alpha1/DisableInferenceAudit
201
+ Action: DisableInferenceAudit
202
+
203
+ Returns DisableInferenceAuditData on success.
204
+ Raises YiCloudException on error.
205
+ """
206
+ path = f"/{_PRODUCT_CODE}/{_LAST_VERSION}/DisableInferenceAudit"
207
+ rsp = msgs.Rsp[models.DisableInferenceAuditData]()
208
+ await client.base.post_async(ctx, path, {k: v for k, v in req.__dict__.items() if v is not None}, rsp)
209
+ return rsp.get_typed_data()
210
+
211
+
156
212
  def download_inferset_logs(ctx: Optional[dict], req: models.DownloadInferSetLogsReq):
157
213
  """下载 InferSet 日志
158
214
  下载指定 InferSet 的日志文件(ZIP格式)
@@ -181,6 +237,34 @@ async def download_inferset_logs_async(ctx: Optional[dict], req: models.Download
181
237
  await client.base.get_async(ctx, path, req, rsp)
182
238
 
183
239
 
240
+ def enable_inference_audit(ctx: Optional[dict], req: models.EnableInferenceAuditReq) -> models.EnableInferenceAuditData:
241
+ """Enable inference audit
242
+ POST /inferset/v1alpha1/EnableInferenceAudit
243
+ Action: EnableInferenceAudit
244
+
245
+ Returns EnableInferenceAuditData on success.
246
+ Raises YiCloudException on error.
247
+ """
248
+ path = f"/{_PRODUCT_CODE}/{_LAST_VERSION}/EnableInferenceAudit"
249
+ rsp = msgs.Rsp[models.EnableInferenceAuditData]()
250
+ client.base.post(ctx, path, {k: v for k, v in req.__dict__.items() if v is not None}, rsp)
251
+ return rsp.get_typed_data()
252
+
253
+
254
+ async def enable_inference_audit_async(ctx: Optional[dict], req: models.EnableInferenceAuditReq) -> models.EnableInferenceAuditData:
255
+ """Enable inference audit(异步)
256
+ POST /inferset/v1alpha1/EnableInferenceAudit
257
+ Action: EnableInferenceAudit
258
+
259
+ Returns EnableInferenceAuditData on success.
260
+ Raises YiCloudException on error.
261
+ """
262
+ path = f"/{_PRODUCT_CODE}/{_LAST_VERSION}/EnableInferenceAudit"
263
+ rsp = msgs.Rsp[models.EnableInferenceAuditData]()
264
+ await client.base.post_async(ctx, path, {k: v for k, v in req.__dict__.items() if v is not None}, rsp)
265
+ return rsp.get_typed_data()
266
+
267
+
184
268
  def get_inferset(ctx: Optional[dict], req: models.GetInferSetReq) -> models.GetInferSetData:
185
269
  """获取 InferSet 详情
186
270
  根据 ID 获取单个 InferSet 的详细信息
@@ -387,6 +471,34 @@ async def get_inferset_traffic_async(ctx: Optional[dict], req: models.GetInferSe
387
471
  return rsp.get_typed_data()
388
472
 
389
473
 
474
+ def get_inference_audit(ctx: Optional[dict], req: models.GetInferenceAuditReq) -> models.GetInferenceAuditData:
475
+ """Get inference audit policy
476
+ GET /inferset/v1alpha1/GetInferenceAudit
477
+ Action: GetInferenceAudit
478
+
479
+ Returns GetInferenceAuditData on success.
480
+ Raises YiCloudException on error.
481
+ """
482
+ path = f"/{_PRODUCT_CODE}/{_LAST_VERSION}/GetInferenceAudit"
483
+ rsp = msgs.Rsp[models.GetInferenceAuditData]()
484
+ client.base.get(ctx, path, req, rsp)
485
+ return rsp.get_typed_data()
486
+
487
+
488
+ async def get_inference_audit_async(ctx: Optional[dict], req: models.GetInferenceAuditReq) -> models.GetInferenceAuditData:
489
+ """Get inference audit policy(异步)
490
+ GET /inferset/v1alpha1/GetInferenceAudit
491
+ Action: GetInferenceAudit
492
+
493
+ Returns GetInferenceAuditData on success.
494
+ Raises YiCloudException on error.
495
+ """
496
+ path = f"/{_PRODUCT_CODE}/{_LAST_VERSION}/GetInferenceAudit"
497
+ rsp = msgs.Rsp[models.GetInferenceAuditData]()
498
+ await client.base.get_async(ctx, path, req, rsp)
499
+ return rsp.get_typed_data()
500
+
501
+
390
502
  def list_inferset(ctx: Optional[dict], req: models.ListInferSetReq) -> models.ListInferSetData:
391
503
  """列出 InferSet
392
504
  获取 InferSet 列表,支持分页、搜索和排序
@@ -234,6 +234,12 @@ class UpdateInferSetScaleObjectReqAutoScalingTriggerMetrics:
234
234
  Threshold: Optional[str] = None # 触发阈值 json:"Threshold,omitempty"
235
235
  Type: Optional[str] = None # 指标类型 json:"Type,omitempty"
236
236
 
237
+ @dataclass
238
+ class ChangeInferenceAuditBucketReq:
239
+ Bucket: str # json:"Bucket"
240
+ ID: str # json:"ID"
241
+ Project: str # json:"Project"
242
+
237
243
  @dataclass
238
244
  class ConfigMapKeyRef:
239
245
  Key: Optional[str] = "" # json:"Key,omitempty"
@@ -353,6 +359,12 @@ class DeleteInferSetScaleObjectReq:
353
359
  ID: str # InferSet ID json:"ID"
354
360
  Project: str # 项目标识 json:"Project"
355
361
 
362
+ @dataclass
363
+ class EnableInferenceAuditReq:
364
+ ID: str # json:"ID"
365
+ Project: str # json:"Project"
366
+ Bucket: Optional[str] = None # json:"Bucket,omitempty"
367
+
356
368
  @dataclass
357
369
  class EnvironmentVar:
358
370
  Key: Optional[str] = "" # 环境变量名 json:"Key,omitempty"
@@ -545,6 +557,29 @@ class GetInferSetTrafficData:
545
557
  Replicas: Optional[List[UpdateInferSetReplicaTrafficData]] = None # 当前各实例的流量调度状态(不含 epp 调度器 Pod) json:"Replicas,omitempty"
546
558
  TrafficExclusions: Optional[List[str]] = None # 流量隔离列表(Pod 名),可能包含已不存在实例的陈旧条目 json:"TrafficExclusions,omitempty"
547
559
 
560
+ @dataclass
561
+ class ChangeInferenceAuditBucketData:
562
+ AuditEnabled: Optional[bool] = False # json:"AuditEnabled,omitempty"
563
+ Bucket: Optional[str] = "" # json:"Bucket,omitempty"
564
+ Id: Optional[str] = "" # json:"Id,omitempty"
565
+ UpdatedAt: Optional[str] = "" # json:"UpdatedAt,omitempty"
566
+ UpdatedBy: Optional[str] = "" # json:"UpdatedBy,omitempty"
567
+
568
+ @dataclass
569
+ class DisableInferenceAuditReq:
570
+ ID: str # json:"ID"
571
+ Project: str # json:"Project"
572
+
573
+ @dataclass
574
+ class GetInferenceAuditData:
575
+ AuditEnabled: Optional[bool] = False # json:"AuditEnabled,omitempty"
576
+ Bucket: Optional[str] = "" # json:"Bucket,omitempty"
577
+ BucketCapacity: Optional[str] = "" # json:"BucketCapacity,omitempty"
578
+ BucketUsed: Optional[str] = "" # json:"BucketUsed,omitempty"
579
+ Id: Optional[str] = "" # json:"Id,omitempty"
580
+ UpdatedAt: Optional[str] = "" # json:"UpdatedAt,omitempty"
581
+ UpdatedBy: Optional[str] = "" # json:"UpdatedBy,omitempty"
582
+
548
583
  @dataclass
549
584
  class InstanceType:
550
585
  CpuCount: Optional[int] = 0 # CPU核心数 json:"CpuCount,omitempty"
@@ -935,46 +970,74 @@ class UpdateInferSetReqRollingUpdateConfig:
935
970
 
936
971
  @dataclass
937
972
  class GetInferSetRoutingPolicyData:
938
- ScorerWeights: Optional[RoutingScorerWeights] = None # 自定义评分权重(仅 custom 类型生效) json:"ScorerWeights,omitempty"
973
+ DecodeScorerWeights: Optional[RoutingScorerWeights] = None # D 侧评分权重(PD custom 时必填) json:"DecodeScorerWeights,omitempty"
974
+ PrefillScorerWeights: Optional[RoutingScorerWeights] = None # P 侧评分权重(PD custom 时必填) json:"PrefillScorerWeights,omitempty"
975
+ ScorerWeights: Optional[RoutingScorerWeights] = None # 自定义评分权重(非 PD custom 时必填) json:"ScorerWeights,omitempty"
939
976
  Type: Optional[str] = None # 策略类型 SDK常量: RoutingPolicyDefault, RoutingPolicyRandom, RoutingPolicyLoadAware, RoutingPolicyCacheAware, RoutingPolicyCustom json:"Type,omitempty"
940
977
 
941
978
  @dataclass
942
979
  class CreateInferSetReqRoutingPolicy:
943
- ScorerWeights: Optional[CreateInferSetReqRoutingScorerWeights] = None # 自定义评分权重(仅 custom 类型生效) json:"ScorerWeights,omitempty"
980
+ DecodeScorerWeights: Optional[CreateInferSetReqRoutingScorerWeights] = None # D 侧评分权重(PD custom 时必填) json:"DecodeScorerWeights,omitempty"
981
+ PrefillScorerWeights: Optional[CreateInferSetReqRoutingScorerWeights] = None # P 侧评分权重(PD custom 时必填) json:"PrefillScorerWeights,omitempty"
982
+ ScorerWeights: Optional[CreateInferSetReqRoutingScorerWeights] = None # 自定义评分权重(非 PD custom 时必填) json:"ScorerWeights,omitempty"
944
983
  Type: Optional[str] = None # 策略类型 SDK常量: RoutingPolicyDefault, RoutingPolicyRandom, RoutingPolicyLoadAware, RoutingPolicyCacheAware, RoutingPolicyCustom json:"Type,omitempty"
945
984
 
946
985
  @dataclass
947
986
  class UpdateInferSetReqRoutingPolicy:
948
- ScorerWeights: Optional[UpdateInferSetReqRoutingScorerWeights] = None # 自定义评分权重(仅 custom 类型生效) json:"ScorerWeights,omitempty"
987
+ DecodeScorerWeights: Optional[UpdateInferSetReqRoutingScorerWeights] = None # D 侧评分权重(PD custom 时必填) json:"DecodeScorerWeights,omitempty"
988
+ PrefillScorerWeights: Optional[UpdateInferSetReqRoutingScorerWeights] = None # P 侧评分权重(PD custom 时必填) json:"PrefillScorerWeights,omitempty"
989
+ ScorerWeights: Optional[UpdateInferSetReqRoutingScorerWeights] = None # 自定义评分权重(非 PD custom 时必填) json:"ScorerWeights,omitempty"
949
990
  Type: Optional[str] = None # 策略类型 SDK常量: RoutingPolicyDefault, RoutingPolicyRandom, RoutingPolicyLoadAware, RoutingPolicyCacheAware, RoutingPolicyCustom json:"Type,omitempty"
950
991
 
951
992
  @dataclass
952
993
  class UpdateInferSetRoutingPolicyReqRoutingPolicy:
953
- ScorerWeights: Optional[UpdateInferSetRoutingPolicyReqRoutingScorerWeights] = None # 自定义评分权重(仅 custom 类型生效) json:"ScorerWeights,omitempty"
994
+ DecodeScorerWeights: Optional[UpdateInferSetRoutingPolicyReqRoutingScorerWeights] = None # D 侧评分权重(PD custom 时必填) json:"DecodeScorerWeights,omitempty"
995
+ PrefillScorerWeights: Optional[UpdateInferSetRoutingPolicyReqRoutingScorerWeights] = None # P 侧评分权重(PD custom 时必填) json:"PrefillScorerWeights,omitempty"
996
+ ScorerWeights: Optional[UpdateInferSetRoutingPolicyReqRoutingScorerWeights] = None # 自定义评分权重(非 PD custom 时必填) json:"ScorerWeights,omitempty"
954
997
  Type: Optional[str] = None # 策略类型 SDK常量: RoutingPolicyDefault, RoutingPolicyRandom, RoutingPolicyLoadAware, RoutingPolicyCacheAware, RoutingPolicyCustom json:"Type,omitempty"
955
998
 
956
999
  @dataclass
957
1000
  class RoutingScorerWeights:
1001
+ KvCacheUtilization: Optional[int] = 0 # KV缓存利用率评分权重 json:"KvCacheUtilization,omitempty"
1002
+ Latency: Optional[int] = 0 # 延迟评分权重 json:"Latency,omitempty"
958
1003
  LoadAware: Optional[int] = 0 # 负载感知评分权重 json:"LoadAware,omitempty"
1004
+ LoraAffinity: Optional[int] = 0 # LoRA亲和性评分权重 json:"LoraAffinity,omitempty"
1005
+ NoHitLru: Optional[int] = 0 # 无命中LRU评分权重 json:"NoHitLru,omitempty"
959
1006
  PrefixCache: Optional[int] = 0 # 前缀缓存命中评分权重 json:"PrefixCache,omitempty"
1007
+ QueueScore: Optional[int] = 0 # 队列深度评分权重 json:"QueueScore,omitempty"
960
1008
  RunningRequestsSize: Optional[int] = 0 # 运行中请求量评分权重 json:"RunningRequestsSize,omitempty"
961
1009
 
962
1010
  @dataclass
963
1011
  class CreateInferSetReqRoutingScorerWeights:
1012
+ KvCacheUtilization: Optional[int] = None # KV缓存利用率评分权重 json:"KvCacheUtilization,omitempty"
1013
+ Latency: Optional[int] = None # 延迟评分权重 json:"Latency,omitempty"
964
1014
  LoadAware: Optional[int] = None # 负载感知评分权重 json:"LoadAware,omitempty"
1015
+ LoraAffinity: Optional[int] = None # LoRA亲和性评分权重 json:"LoraAffinity,omitempty"
1016
+ NoHitLru: Optional[int] = None # 无命中LRU评分权重 json:"NoHitLru,omitempty"
965
1017
  PrefixCache: Optional[int] = None # 前缀缓存命中评分权重 json:"PrefixCache,omitempty"
1018
+ QueueScore: Optional[int] = None # 队列深度评分权重 json:"QueueScore,omitempty"
966
1019
  RunningRequestsSize: Optional[int] = None # 运行中请求量评分权重 json:"RunningRequestsSize,omitempty"
967
1020
 
968
1021
  @dataclass
969
1022
  class UpdateInferSetReqRoutingScorerWeights:
1023
+ KvCacheUtilization: Optional[int] = None # KV缓存利用率评分权重 json:"KvCacheUtilization,omitempty"
1024
+ Latency: Optional[int] = None # 延迟评分权重 json:"Latency,omitempty"
970
1025
  LoadAware: Optional[int] = None # 负载感知评分权重 json:"LoadAware,omitempty"
1026
+ LoraAffinity: Optional[int] = None # LoRA亲和性评分权重 json:"LoraAffinity,omitempty"
1027
+ NoHitLru: Optional[int] = None # 无命中LRU评分权重 json:"NoHitLru,omitempty"
971
1028
  PrefixCache: Optional[int] = None # 前缀缓存命中评分权重 json:"PrefixCache,omitempty"
1029
+ QueueScore: Optional[int] = None # 队列深度评分权重 json:"QueueScore,omitempty"
972
1030
  RunningRequestsSize: Optional[int] = None # 运行中请求量评分权重 json:"RunningRequestsSize,omitempty"
973
1031
 
974
1032
  @dataclass
975
1033
  class UpdateInferSetRoutingPolicyReqRoutingScorerWeights:
1034
+ KvCacheUtilization: Optional[int] = None # KV缓存利用率评分权重 json:"KvCacheUtilization,omitempty"
1035
+ Latency: Optional[int] = None # 延迟评分权重 json:"Latency,omitempty"
976
1036
  LoadAware: Optional[int] = None # 负载感知评分权重 json:"LoadAware,omitempty"
1037
+ LoraAffinity: Optional[int] = None # LoRA亲和性评分权重 json:"LoraAffinity,omitempty"
1038
+ NoHitLru: Optional[int] = None # 无命中LRU评分权重 json:"NoHitLru,omitempty"
977
1039
  PrefixCache: Optional[int] = None # 前缀缓存命中评分权重 json:"PrefixCache,omitempty"
1040
+ QueueScore: Optional[int] = None # 队列深度评分权重 json:"QueueScore,omitempty"
978
1041
  RunningRequestsSize: Optional[int] = None # 运行中请求量评分权重 json:"RunningRequestsSize,omitempty"
979
1042
 
980
1043
  @dataclass
@@ -1052,6 +1115,7 @@ class UpdateInferSetReq:
1052
1115
  DedicatedGatewayID: Optional[str] = None # 专属网关绑定。本期不支持修改:值与原绑定不同时 Vortex 拒绝,相同则视为幂等回显。 字段必须声明,否则 JSON 反序列化会静默丢弃,调用方会误以为修改成功。 json:"DedicatedGatewayID,omitempty"
1053
1116
  Description: Optional[str] = None # InferSet描述 json:"Description,omitempty"
1054
1117
  Distributed: Optional[bool] = None # 是否开启分布式推理 json:"Distributed,omitempty"
1118
+ Engine: Optional[str] = None # 推理引擎:vllm / vllm-omni / sglang;nil=不修改 json:"Engine,omitempty"
1055
1119
  EnvVars: Optional[List[UpdateInferSetReqEnvironmentVar]] = None # 环境变量列表 json:"EnvVars,omitempty"
1056
1120
  GPFSMounts: Optional[List[UpdateInferSetReqGPFSMount]] = None # GPFS挂载列表 json:"GPFSMounts,omitempty"
1057
1121
  GatewayConfig: Optional[UpdateInferSetReqGatewayConfig] = None # 网关配置 json:"GatewayConfig,omitempty"
@@ -1181,6 +1245,11 @@ class GetInferSetTrafficReq:
1181
1245
  ID: str # InferSet ID query:"ID"
1182
1246
  Project: str # 项目 ID query:"Project"
1183
1247
 
1248
+ @dataclass
1249
+ class GetInferenceAuditReq:
1250
+ ID: str # InferSet ID query:"ID"
1251
+ Project: str # project query:"Project"
1252
+
1184
1253
  @dataclass
1185
1254
  class ListInferSetReq:
1186
1255
  Engine: Optional[str] = None # Inference engine filter query:"Engine,omitempty"
@@ -1217,6 +1286,8 @@ class ListPlatformModelSkusReq:
1217
1286
  ZoneId: Optional[str] = None # Availability zone query:"ZoneId,omitempty"
1218
1287
 
1219
1288
 
1289
+ DisableInferenceAuditData = ChangeInferenceAuditBucketData
1290
+ EnableInferenceAuditData = ChangeInferenceAuditBucketData
1220
1291
  GetInferSetData = CreateInferSetData
1221
1292
  GetInferSetScaleObjectData = CreateInferSetScaleObjectData
1222
1293
  ListInferSetData = GetInferSetLogsQueryRangeData
@@ -43,6 +43,8 @@ from .models import (
43
43
  Mode,
44
44
  Operation,
45
45
  Phase,
46
+ PrecheckStatus,
47
+ ResourceSource,
46
48
  RestartPolicy,
47
49
  RetryScope,
48
50
  Status,
@@ -11,7 +11,12 @@ _LAST_VERSION = "v1alpha1"
11
11
 
12
12
  def list_jobs(ctx: Optional[dict], req: models.ListJobsReq) -> models.ListJobsData:
13
13
  """获取 Job 列表
14
- 分页获取 Job 列表,支持按名称、状态、创建者、配额组、资源池等条件过滤
14
+ 分页获取 Job 列表。服务端在调用者有权访问的任务集合上按 ZoneId 等条件过滤、排序和分页:
15
+ Total 为过滤后的总数,Offset/Limit 在过滤后的集合上生效。
16
+ 默认不返回微调任务。
17
+ 可见范围:租户管理员/租户操作员为本租户全部任务;项目管理员/项目操作员为其项目内全部任务;
18
+ 普通用户仅为自己创建的任务。过滤条件不会扩大可见范围。
19
+
15
20
  GET /job/v1alpha1/ListJobs
16
21
  Action: ListJobs
17
22
 
@@ -26,7 +31,12 @@ def list_jobs(ctx: Optional[dict], req: models.ListJobsReq) -> models.ListJobsDa
26
31
 
27
32
  async def list_jobs_async(ctx: Optional[dict], req: models.ListJobsReq) -> models.ListJobsData:
28
33
  """获取 Job 列表(异步)
29
- 分页获取 Job 列表,支持按名称、状态、创建者、配额组、资源池等条件过滤
34
+ 分页获取 Job 列表。服务端在调用者有权访问的任务集合上按 ZoneId 等条件过滤、排序和分页:
35
+ Total 为过滤后的总数,Offset/Limit 在过滤后的集合上生效。
36
+ 默认不返回微调任务。
37
+ 可见范围:租户管理员/租户操作员为本租户全部任务;项目管理员/项目操作员为其项目内全部任务;
38
+ 普通用户仅为自己创建的任务。过滤条件不会扩大可见范围。
39
+
30
40
  GET /job/v1alpha1/ListJobs
31
41
  Action: ListJobs
32
42
 
@@ -116,14 +126,12 @@ def create_job(ctx: Optional[dict], req: models.CreateJobReq) -> models.CreateJo
116
126
 
117
127
  | 输入标签 | 节点 label key | 节点 label value | 说明 |
118
128
  | --- | --- | --- | --- |
119
- | a100 | GPUType | A100-SXM4-80GB、A100-SXM4-40GB | 简写展开;多个型号为同一 In/NotIn 表达式的 Values |
120
- | zhi200 | GPUType | H200 | 已配置的脱敏名还原为真实卡型 |
121
- | H200 | GPUType | H200 | 未命中简写映射时按原字符串匹配;其他未识别的普通字符串同理 |
122
- | node/lg-cmc-infra-gpu-0015.host.shzhisuan.com | kubernetes.io/hostname | lg-cmc-infra-gpu-0015.host.shzhisuan.com | 按节点名匹配 |
123
- | feature/nvidia-driver=535 | feature.brainpp.cn/nvidia-driver | 535 | 名称和值会转小写,始终为硬约束 |
129
+ | 服务端配置的卡型标签 | GPUType | 服务端映射的节点标签值 | 简写或别名按服务端配置展开;多个值为同一 In/NotIn 表达式的 Values,未命中映射时按原字符串匹配 |
130
+ | node/worker-01 | kubernetes.io/hostname | worker-01 | 按节点名匹配 |
131
+ | feature/<名称>=<值> | feature.brainpp.cn/<名称> | <值> | 名称和值会转小写,始终为硬约束;实际名称和值以节点配置为准 |
124
132
  | ssd、hdd、nvme | LocalStorageType | SSD、HDD、NVME(分别对应) | 仅正向标签生成本地盘类型 In;负向本地盘标签不会生成 NotIn |
125
133
 
126
- 例如下方请求样例的 PositiveTags=[a100,node/lg-cmc-infra-gpu-0015.host.shzhisuan.com] 分别要求 GPUType In [A100-SXM4-80GB,A100-SXM4-40GB] 和 kubernetes.io/hostname In [lg-cmc-infra-gpu-0015.host.shzhisuan.com];NegativeTags=[H200] 要求 GPUType NotIn [H200]。不同 key 的条件同时满足;SKU 配置也可能额外追加正向标签。
134
+ 例如下方请求样例的 PositiveTags=[node/worker-01] 要求 kubernetes.io/hostname In [worker-01];NegativeTags=[node/worker-02] 要求 kubernetes.io/hostname NotIn [worker-02]。节点名仅用于演示,调用时须替换为实际节点名。不同 key 的条件同时满足;SKU 配置也可能额外追加正向标签。卡型标签及其映射以服务端实际配置为准。
127
135
  POST /job/v1alpha1/CreateJob
128
136
  Action: CreateJob
129
137
 
@@ -145,14 +153,12 @@ async def create_job_async(ctx: Optional[dict], req: models.CreateJobReq) -> mod
145
153
 
146
154
  | 输入标签 | 节点 label key | 节点 label value | 说明 |
147
155
  | --- | --- | --- | --- |
148
- | a100 | GPUType | A100-SXM4-80GB、A100-SXM4-40GB | 简写展开;多个型号为同一 In/NotIn 表达式的 Values |
149
- | zhi200 | GPUType | H200 | 已配置的脱敏名还原为真实卡型 |
150
- | H200 | GPUType | H200 | 未命中简写映射时按原字符串匹配;其他未识别的普通字符串同理 |
151
- | node/lg-cmc-infra-gpu-0015.host.shzhisuan.com | kubernetes.io/hostname | lg-cmc-infra-gpu-0015.host.shzhisuan.com | 按节点名匹配 |
152
- | feature/nvidia-driver=535 | feature.brainpp.cn/nvidia-driver | 535 | 名称和值会转小写,始终为硬约束 |
156
+ | 服务端配置的卡型标签 | GPUType | 服务端映射的节点标签值 | 简写或别名按服务端配置展开;多个值为同一 In/NotIn 表达式的 Values,未命中映射时按原字符串匹配 |
157
+ | node/worker-01 | kubernetes.io/hostname | worker-01 | 按节点名匹配 |
158
+ | feature/<名称>=<值> | feature.brainpp.cn/<名称> | <值> | 名称和值会转小写,始终为硬约束;实际名称和值以节点配置为准 |
153
159
  | ssd、hdd、nvme | LocalStorageType | SSD、HDD、NVME(分别对应) | 仅正向标签生成本地盘类型 In;负向本地盘标签不会生成 NotIn |
154
160
 
155
- 例如下方请求样例的 PositiveTags=[a100,node/lg-cmc-infra-gpu-0015.host.shzhisuan.com] 分别要求 GPUType In [A100-SXM4-80GB,A100-SXM4-40GB] 和 kubernetes.io/hostname In [lg-cmc-infra-gpu-0015.host.shzhisuan.com];NegativeTags=[H200] 要求 GPUType NotIn [H200]。不同 key 的条件同时满足;SKU 配置也可能额外追加正向标签。
161
+ 例如下方请求样例的 PositiveTags=[node/worker-01] 要求 kubernetes.io/hostname In [worker-01];NegativeTags=[node/worker-02] 要求 kubernetes.io/hostname NotIn [worker-02]。节点名仅用于演示,调用时须替换为实际节点名。不同 key 的条件同时满足;SKU 配置也可能额外追加正向标签。卡型标签及其映射以服务端实际配置为准。
156
162
  POST /job/v1alpha1/CreateJob
157
163
  Action: CreateJob
158
164