@zhuoyuezs/ml-platform 0.2.9 → 0.2.10
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.
- package/checksums.json +56 -36
- package/package.json +1 -1
- package/release.json +13 -13
- package/runtime/business-client/src/cli.js +87 -1
- package/skills/data-source-exploration/SKILL.md +12 -1
- package/skills/data-source-exploration/agents/openai.yaml +2 -2
- package/skills/data-source-exploration/references/data-platform.md +83 -0
- package/skills/feature-management/SKILL.md +12 -4
- package/skills/feature-management/agents/openai.yaml +2 -2
- package/skills/feature-management/references/commands.md +14 -0
- package/skills/feature-management/references/data-platform-mapping.md +104 -0
- package/skills/feature-management/references/platform-capability-guide.md +6 -0
- package/skills/feature-management/references/supervised-datasets.md +13 -0
- package/skills/model-deployment-management/SKILL.md +4 -0
- package/skills/model-deployment-management/references/contracts.md +6 -0
- package/skills/model-deployment-management/references/operations.md +14 -0
- package/skills/model-deployment-management/references/troubleshooting.md +8 -0
- package/skills/model-lifecycle-management/SKILL.md +11 -5
- package/skills/model-lifecycle-management/agents/openai.yaml +2 -2
- package/skills/model-lifecycle-management/references/ablation.md +111 -0
- package/skills/model-lifecycle-management/references/evaluation.md +55 -1
- package/skills/model-lifecycle-management/references/experiment-runs.md +59 -0
- package/skills/model-lifecycle-management/references/model-comparison.md +11 -9
- package/skills/model-lifecycle-management/references/training.md +34 -0
- package/skills/prediction-report-management/SKILL.md +3 -0
package/checksums.json
CHANGED
|
@@ -27,8 +27,8 @@
|
|
|
27
27
|
},
|
|
28
28
|
{
|
|
29
29
|
"path": "runtime/business-client/src/cli.js",
|
|
30
|
-
"sha256": "sha256:
|
|
31
|
-
"size_bytes":
|
|
30
|
+
"sha256": "sha256:143ce6e82d861fae647384e3617ec0f0222fef7c8e7b546ca67393fba8bd08b5",
|
|
31
|
+
"size_bytes": 85198
|
|
32
32
|
},
|
|
33
33
|
{
|
|
34
34
|
"path": "runtime/business-client/src/config.js",
|
|
@@ -42,23 +42,28 @@
|
|
|
42
42
|
},
|
|
43
43
|
{
|
|
44
44
|
"path": "skills/data-source-exploration/SKILL.md",
|
|
45
|
-
"sha256": "sha256:
|
|
46
|
-
"size_bytes":
|
|
45
|
+
"sha256": "sha256:63086689eac598ba9683d8dc63921b6ce13780973870e5ec346f69918892c5ed",
|
|
46
|
+
"size_bytes": 6260
|
|
47
47
|
},
|
|
48
48
|
{
|
|
49
49
|
"path": "skills/data-source-exploration/agents/openai.yaml",
|
|
50
|
-
"sha256": "sha256:
|
|
51
|
-
"size_bytes":
|
|
50
|
+
"sha256": "sha256:15c93196536ff0eef2cf63940bee5eee852c9ccd55f394253fd98647f235b2eb",
|
|
51
|
+
"size_bytes": 348
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
"path": "skills/data-source-exploration/references/data-platform.md",
|
|
55
|
+
"sha256": "sha256:f65ff27fcd3f2e18baa34ae103984bc3a0adbf9fbbcf28d652ed41f89c11e44a",
|
|
56
|
+
"size_bytes": 5865
|
|
52
57
|
},
|
|
53
58
|
{
|
|
54
59
|
"path": "skills/feature-management/SKILL.md",
|
|
55
|
-
"sha256": "sha256:
|
|
56
|
-
"size_bytes":
|
|
60
|
+
"sha256": "sha256:f7777f43adf83cf4ee663c1e993f2f3d6221054f02e3cdcd24e65db36990141e",
|
|
61
|
+
"size_bytes": 36116
|
|
57
62
|
},
|
|
58
63
|
{
|
|
59
64
|
"path": "skills/feature-management/agents/openai.yaml",
|
|
60
|
-
"sha256": "sha256:
|
|
61
|
-
"size_bytes":
|
|
65
|
+
"sha256": "sha256:db2a9ebc7926370264e06b8e5767105415bb8a09a2dda08a7cf418a6e3b39bb0",
|
|
66
|
+
"size_bytes": 366
|
|
62
67
|
},
|
|
63
68
|
{
|
|
64
69
|
"path": "skills/feature-management/assets/catalog-template/catalog.json",
|
|
@@ -107,14 +112,19 @@
|
|
|
107
112
|
},
|
|
108
113
|
{
|
|
109
114
|
"path": "skills/feature-management/references/commands.md",
|
|
110
|
-
"sha256": "sha256:
|
|
111
|
-
"size_bytes":
|
|
115
|
+
"sha256": "sha256:248721ee995ebb20ea44a263f528e1af6004f7af55d31503185f6269744dee8d",
|
|
116
|
+
"size_bytes": 18829
|
|
112
117
|
},
|
|
113
118
|
{
|
|
114
119
|
"path": "skills/feature-management/references/contracts.md",
|
|
115
120
|
"sha256": "sha256:717b81364f8508cd73d52f18d7b5dd012a3f3638921a8a5a93c41991a4f27998",
|
|
116
121
|
"size_bytes": 38182
|
|
117
122
|
},
|
|
123
|
+
{
|
|
124
|
+
"path": "skills/feature-management/references/data-platform-mapping.md",
|
|
125
|
+
"sha256": "sha256:fef06e1e1918132336789aa6d430a501324fc3f3f2241817322740a8dd20054a",
|
|
126
|
+
"size_bytes": 7421
|
|
127
|
+
},
|
|
118
128
|
{
|
|
119
129
|
"path": "skills/feature-management/references/operator-authoring.md",
|
|
120
130
|
"sha256": "sha256:68ec5861800a6623db8e3cfae8e3363493c54772c4719d60dc66e4f4f0d3a347",
|
|
@@ -122,18 +132,18 @@
|
|
|
122
132
|
},
|
|
123
133
|
{
|
|
124
134
|
"path": "skills/feature-management/references/platform-capability-guide.md",
|
|
125
|
-
"sha256": "sha256:
|
|
126
|
-
"size_bytes":
|
|
135
|
+
"sha256": "sha256:64874764924929421c294e7a421d546aba245d8f8bc40caba32d889f557c1906",
|
|
136
|
+
"size_bytes": 4850
|
|
127
137
|
},
|
|
128
138
|
{
|
|
129
139
|
"path": "skills/feature-management/references/supervised-datasets.md",
|
|
130
|
-
"sha256": "sha256:
|
|
131
|
-
"size_bytes":
|
|
140
|
+
"sha256": "sha256:a12ef5c26bc206507679e60fbecfa8bc1f5cfeb357e428b9dc8d1cdac6458a8a",
|
|
141
|
+
"size_bytes": 10886
|
|
132
142
|
},
|
|
133
143
|
{
|
|
134
144
|
"path": "skills/model-deployment-management/SKILL.md",
|
|
135
|
-
"sha256": "sha256:
|
|
136
|
-
"size_bytes":
|
|
145
|
+
"sha256": "sha256:5e1f92a03584df4631e896754b9b91012678b2358c1df7df55aa610fd527bf1d",
|
|
146
|
+
"size_bytes": 5505
|
|
137
147
|
},
|
|
138
148
|
{
|
|
139
149
|
"path": "skills/model-deployment-management/agents/openai.yaml",
|
|
@@ -142,28 +152,33 @@
|
|
|
142
152
|
},
|
|
143
153
|
{
|
|
144
154
|
"path": "skills/model-deployment-management/references/contracts.md",
|
|
145
|
-
"sha256": "sha256:
|
|
146
|
-
"size_bytes":
|
|
155
|
+
"sha256": "sha256:10a86a5f0ba36546c8487ea0bf78366f9034c9f713b80bb76a4fdb39aed67957",
|
|
156
|
+
"size_bytes": 7178
|
|
147
157
|
},
|
|
148
158
|
{
|
|
149
159
|
"path": "skills/model-deployment-management/references/operations.md",
|
|
150
|
-
"sha256": "sha256:
|
|
151
|
-
"size_bytes":
|
|
160
|
+
"sha256": "sha256:ee98dbd02d84318108c157913e19353d1a6931cbe647af4125cffecbca155fea",
|
|
161
|
+
"size_bytes": 7854
|
|
152
162
|
},
|
|
153
163
|
{
|
|
154
164
|
"path": "skills/model-deployment-management/references/troubleshooting.md",
|
|
155
|
-
"sha256": "sha256:
|
|
156
|
-
"size_bytes":
|
|
165
|
+
"sha256": "sha256:1d727c2e76fdbe361bdd5199bc63377feea9564b6b4d41842250bce1f23447f5",
|
|
166
|
+
"size_bytes": 4331
|
|
157
167
|
},
|
|
158
168
|
{
|
|
159
169
|
"path": "skills/model-lifecycle-management/SKILL.md",
|
|
160
|
-
"sha256": "sha256:
|
|
161
|
-
"size_bytes":
|
|
170
|
+
"sha256": "sha256:099973e2dd334beac12e275ee184d3ce500f6c307ae339e3400e585d8ad88a8e",
|
|
171
|
+
"size_bytes": 7833
|
|
162
172
|
},
|
|
163
173
|
{
|
|
164
174
|
"path": "skills/model-lifecycle-management/agents/openai.yaml",
|
|
165
|
-
"sha256": "sha256:
|
|
166
|
-
"size_bytes":
|
|
175
|
+
"sha256": "sha256:096bb0bca665622326b214a4d88d5b6807b50cf143b8a2e05528256fc3568f58",
|
|
176
|
+
"size_bytes": 258
|
|
177
|
+
},
|
|
178
|
+
{
|
|
179
|
+
"path": "skills/model-lifecycle-management/references/ablation.md",
|
|
180
|
+
"sha256": "sha256:41182c0c356626b04387c4b613cf293528187a98bc7d05b12f3d379ac51ad0ab",
|
|
181
|
+
"size_bytes": 5581
|
|
167
182
|
},
|
|
168
183
|
{
|
|
169
184
|
"path": "skills/model-lifecycle-management/references/discovery.md",
|
|
@@ -172,13 +187,18 @@
|
|
|
172
187
|
},
|
|
173
188
|
{
|
|
174
189
|
"path": "skills/model-lifecycle-management/references/evaluation.md",
|
|
175
|
-
"sha256": "sha256:
|
|
176
|
-
"size_bytes":
|
|
190
|
+
"sha256": "sha256:124c938f8ab633d6851357add501dd8e5defdfa2c81e8305b045f93656e6236e",
|
|
191
|
+
"size_bytes": 18889
|
|
192
|
+
},
|
|
193
|
+
{
|
|
194
|
+
"path": "skills/model-lifecycle-management/references/experiment-runs.md",
|
|
195
|
+
"sha256": "sha256:43360b72f2f9565640241450be01d95b44ebd5750d13c0ea9af47158bda35ccc",
|
|
196
|
+
"size_bytes": 2719
|
|
177
197
|
},
|
|
178
198
|
{
|
|
179
199
|
"path": "skills/model-lifecycle-management/references/model-comparison.md",
|
|
180
|
-
"sha256": "sha256:
|
|
181
|
-
"size_bytes":
|
|
200
|
+
"sha256": "sha256:13eeb1226effffc4eee1cacdb4ea04f4f61bc31874190046b6634e8e7bb49703",
|
|
201
|
+
"size_bytes": 9391
|
|
182
202
|
},
|
|
183
203
|
{
|
|
184
204
|
"path": "skills/model-lifecycle-management/references/packaging.md",
|
|
@@ -192,8 +212,8 @@
|
|
|
192
212
|
},
|
|
193
213
|
{
|
|
194
214
|
"path": "skills/model-lifecycle-management/references/training.md",
|
|
195
|
-
"sha256": "sha256:
|
|
196
|
-
"size_bytes":
|
|
215
|
+
"sha256": "sha256:3ebf309ff7ede6b38dcb5b9afd75d282d29e91d768b9926808687c58434f88c9",
|
|
216
|
+
"size_bytes": 11419
|
|
197
217
|
},
|
|
198
218
|
{
|
|
199
219
|
"path": "skills/model-lifecycle-management/references/zero-shot-inference.md",
|
|
@@ -202,8 +222,8 @@
|
|
|
202
222
|
},
|
|
203
223
|
{
|
|
204
224
|
"path": "skills/prediction-report-management/SKILL.md",
|
|
205
|
-
"sha256": "sha256:
|
|
206
|
-
"size_bytes":
|
|
225
|
+
"sha256": "sha256:e7ad90295929b01dc6640a6a5fe42b0dcbfd56c52fb329a05875bf1a706e7874",
|
|
226
|
+
"size_bytes": 8894
|
|
207
227
|
},
|
|
208
228
|
{
|
|
209
229
|
"path": "skills/prediction-report-management/agents/openai.yaml",
|
package/package.json
CHANGED
package/release.json
CHANGED
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
"entrypoint": "src/cli.js",
|
|
14
14
|
"name": "ml-platform",
|
|
15
15
|
"path": "runtime/business-client",
|
|
16
|
-
"sha256": "sha256:
|
|
16
|
+
"sha256": "sha256:5b83423598eb2c8afae8765e4315a9432cc026d1779348808c6516432820e67e",
|
|
17
17
|
"version": "0.8.7"
|
|
18
18
|
},
|
|
19
19
|
"policy_sha256": "sha256:02fbde0134696b78c0c365d6e0b76c9814227208da5b2b3d4e5dbd82dc4a3606",
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
"ml_data_platform.feature_set/v1",
|
|
26
26
|
"ml_data_platform.dataset_manifest/v1"
|
|
27
27
|
],
|
|
28
|
-
"release_version": "0.2.
|
|
28
|
+
"release_version": "0.2.10",
|
|
29
29
|
"runtime_requirements": {
|
|
30
30
|
"node": ">=18",
|
|
31
31
|
"os": [
|
|
@@ -38,33 +38,33 @@
|
|
|
38
38
|
"data-source-exploration": {
|
|
39
39
|
"path": "skills/data-source-exploration",
|
|
40
40
|
"requires_cli": ">=0.8.7 <0.9.0",
|
|
41
|
-
"revision": "0.2.
|
|
42
|
-
"sha256": "sha256:
|
|
41
|
+
"revision": "0.2.10",
|
|
42
|
+
"sha256": "sha256:9614e6901fcfeac7e0779caee7a8ab1df40b39d08161967e51b459c266b82f90"
|
|
43
43
|
},
|
|
44
44
|
"feature-management": {
|
|
45
45
|
"path": "skills/feature-management",
|
|
46
46
|
"requires_cli": ">=0.8.7 <0.9.0",
|
|
47
|
-
"revision": "0.2.
|
|
48
|
-
"sha256": "sha256:
|
|
47
|
+
"revision": "0.2.10",
|
|
48
|
+
"sha256": "sha256:c2f109d11ddfdfe9deaa2da077cd11f374bc8cef0db6155572fbb24defab39f7"
|
|
49
49
|
},
|
|
50
50
|
"model-deployment-management": {
|
|
51
51
|
"path": "skills/model-deployment-management",
|
|
52
52
|
"requires_cli": ">=0.8.7 <0.9.0",
|
|
53
|
-
"revision": "0.2.
|
|
54
|
-
"sha256": "sha256:
|
|
53
|
+
"revision": "0.2.10",
|
|
54
|
+
"sha256": "sha256:ef13c737a098e9a582dfa6f7c54777c00a9efbc7af894c7aea35b9db4a97aa15"
|
|
55
55
|
},
|
|
56
56
|
"model-lifecycle-management": {
|
|
57
57
|
"path": "skills/model-lifecycle-management",
|
|
58
58
|
"requires_cli": ">=0.8.7 <0.9.0",
|
|
59
|
-
"revision": "0.2.
|
|
60
|
-
"sha256": "sha256:
|
|
59
|
+
"revision": "0.2.10",
|
|
60
|
+
"sha256": "sha256:02fc9451ae888bec7ae1aa38bf51c3c8f657c6f899506ce323f17552b2dd31a0"
|
|
61
61
|
},
|
|
62
62
|
"prediction-report-management": {
|
|
63
63
|
"path": "skills/prediction-report-management",
|
|
64
64
|
"requires_cli": ">=0.8.7 <0.9.0",
|
|
65
|
-
"revision": "0.2.
|
|
66
|
-
"sha256": "sha256:
|
|
65
|
+
"revision": "0.2.10",
|
|
66
|
+
"sha256": "sha256:399e5838604b5ce0248be702b70be2deaaf8f644e5518c91c45d21e0d2f43e53"
|
|
67
67
|
}
|
|
68
68
|
},
|
|
69
|
-
"source_commit": "
|
|
69
|
+
"source_commit": "b9b4ec03474a9ff7b11bae35eacf8302bcb97d0c"
|
|
70
70
|
}
|
|
@@ -7,7 +7,7 @@ const { configPath, expandHome, loadApiUrl, normalizeApiUrl, saveApiUrl } = requ
|
|
|
7
7
|
const { PlatformApiClient } = require("./http");
|
|
8
8
|
const { applyCatalog, loadCatalog, normalizeDataset, normalizeRegistryDataset } = require("./catalog");
|
|
9
9
|
const { version: CLIENT_VERSION } = require("../package.json");
|
|
10
|
-
const LIFECYCLE_COLLECTIONS = new Set(["training-runs", "training-jobs", "model-artifacts", "evaluation-configs", "evaluation-runs", "evaluation-jobs", "metric-definitions", "executable-packages", "model-packages"]);
|
|
10
|
+
const LIFECYCLE_COLLECTIONS = new Set(["training-runs", "training-jobs", "model-artifacts", "evaluation-configs", "evaluation-runs", "evaluation-jobs", "metric-definitions", "executable-packages", "model-packages", "experiment-runs"]);
|
|
11
11
|
const BUSINESS_COMMANDS = new Set([
|
|
12
12
|
...[...LIFECYCLE_COLLECTIONS].map((name) => `list-${name}`),
|
|
13
13
|
"get-model-runtime-release", "get-training-run", "get-model-artifact", "get-executable-package",
|
|
@@ -15,6 +15,9 @@ const BUSINESS_COMMANDS = new Set([
|
|
|
15
15
|
"version", "create-project", "list-projects", "get-project", "delete-project",
|
|
16
16
|
"get-dataset-contract-file", "validate-evaluation-comparison",
|
|
17
17
|
"configure", "show-config", "health",
|
|
18
|
+
"data-platform-status", "list-data-platform-connections", "get-data-platform-connection",
|
|
19
|
+
"list-data-platform-objects", "list-data-platform-mappings", "list-data-platform-query-candidates", "get-data-platform-mapping-revision",
|
|
20
|
+
"bind-data-platform-parameters", "query-data-platform", "get-data-platform-query", "get-data-platform-snapshot",
|
|
18
21
|
"list-datasource-connections", "list-datasource-namespaces", "list-datasource-objects",
|
|
19
22
|
"list-datasource-fields", "query-datasource-object", "create-datasource-connection",
|
|
20
23
|
"get-datasource-connection", "update-datasource-connection", "delete-datasource-connection",
|
|
@@ -34,6 +37,7 @@ const BUSINESS_COMMANDS = new Set([
|
|
|
34
37
|
"get-job", "wait-job", "retry-job", "cancel-job", "get-dataset-artifact", "download-dataset-artifact", "fetch-inference-data", "fetch-inference-context", "predict-model", "apply",
|
|
35
38
|
"list-foundation-models", "get-foundation-model", "predict-foundation", "predict-foundation-csv",
|
|
36
39
|
"list-system-models", "get-system-model", "register-training-run", "validate-training-run", "submit-training-job", "get-training-job", "retry-training-job", "cancel-training-job",
|
|
40
|
+
"create-experiment-run", "validate-experiment-run", "submit-experiment-run", "get-experiment-run", "list-experiment-candidates", "reconcile-experiment-run", "cancel-experiment-run",
|
|
37
41
|
"register-evaluation-config", "get-evaluation-config", "register-metric-definition", "get-metric-definition",
|
|
38
42
|
"register-executable-package", "verify-executable-package", "publish-executable-package",
|
|
39
43
|
"validate-evaluation-run", "submit-evaluation", "get-evaluation-run", "get-evaluation-job", "retry-evaluation-job", "cancel-evaluation-job", "list-evaluation-attempts",
|
|
@@ -62,6 +66,17 @@ const COMMAND_USAGE = {
|
|
|
62
66
|
configure: "configure --api-url URL",
|
|
63
67
|
"show-config": "show-config",
|
|
64
68
|
health: "health",
|
|
69
|
+
"data-platform-status": "data-platform-status",
|
|
70
|
+
"list-data-platform-connections": "list-data-platform-connections",
|
|
71
|
+
"get-data-platform-connection": "get-data-platform-connection CONNECTION_ID",
|
|
72
|
+
"list-data-platform-objects": "list-data-platform-objects CONNECTION_ID",
|
|
73
|
+
"list-data-platform-mappings": "list-data-platform-mappings [--page N] [--page-size N] [--scope-code CODE]",
|
|
74
|
+
"list-data-platform-query-candidates": "list-data-platform-query-candidates",
|
|
75
|
+
"get-data-platform-mapping-revision": "get-data-platform-mapping-revision MAPPING_ID REVISION_ID",
|
|
76
|
+
"bind-data-platform-parameters": "bind-data-platform-parameters SPEC_JSON",
|
|
77
|
+
"query-data-platform": "query-data-platform SPEC_JSON",
|
|
78
|
+
"get-data-platform-query": "get-data-platform-query RUN_ID",
|
|
79
|
+
"get-data-platform-snapshot": "get-data-platform-snapshot SNAPSHOT_ID [--offset N] [--limit N]",
|
|
65
80
|
"list-datasource-connections": "list-datasource-connections [--limit N] [--cursor CURSOR]",
|
|
66
81
|
"list-datasource-namespaces": "list-datasource-namespaces CONNECTION_ID [--limit N] [--cursor CURSOR]",
|
|
67
82
|
"list-datasource-objects": "list-datasource-objects CONNECTION_ID NAMESPACE_ID [--limit N] [--cursor CURSOR]",
|
|
@@ -168,6 +183,13 @@ const COMMAND_USAGE = {
|
|
|
168
183
|
"create-model-package": "create-model-package REQUEST_JSON [--idempotency-key KEY]",
|
|
169
184
|
"get-model-package": "get-model-package PACKAGE_ID [--package-version VERSION]",
|
|
170
185
|
"cancel-model-package": "cancel-model-package PACKAGE_ID [--package-version VERSION]",
|
|
186
|
+
"create-experiment-run": "create-experiment-run SPEC_JSON",
|
|
187
|
+
"validate-experiment-run": "validate-experiment-run RUN_ID",
|
|
188
|
+
"submit-experiment-run": "submit-experiment-run RUN_ID",
|
|
189
|
+
"get-experiment-run": "get-experiment-run RUN_ID",
|
|
190
|
+
"list-experiment-candidates": "list-experiment-candidates RUN_ID [--limit N] [--offset N]",
|
|
191
|
+
"reconcile-experiment-run": "reconcile-experiment-run RUN_ID",
|
|
192
|
+
"cancel-experiment-run": "cancel-experiment-run RUN_ID",
|
|
171
193
|
"validate-model-artifact": "validate-model-artifact ARTIFACT_ID",
|
|
172
194
|
"register-model-artifact": "register-model-artifact ARTIFACT_ID --evaluation-id EVALUATION_ID",
|
|
173
195
|
"list-business-domains": "list-business-domains",
|
|
@@ -490,6 +512,42 @@ async function runBusinessCli(argv, output = { write: text => process.stdout.wri
|
|
|
490
512
|
}
|
|
491
513
|
else if (options.command === "health")
|
|
492
514
|
result = await client(options).get("/health");
|
|
515
|
+
else if (options.command === "data-platform-status")
|
|
516
|
+
result = await client(options).get("/data-platform/status");
|
|
517
|
+
else if (options.command === "list-data-platform-connections")
|
|
518
|
+
result = await client(options).get("/data-platform/connections");
|
|
519
|
+
else if (options.command === "list-data-platform-query-candidates")
|
|
520
|
+
result = await client(options).get("/data-platform/query-candidates");
|
|
521
|
+
else if (["get-data-platform-connection", "list-data-platform-objects"].includes(options.command)) {
|
|
522
|
+
const id = encodeURIComponent(positional(rest, "connection id"));
|
|
523
|
+
const suffix = options.command === "list-data-platform-objects" ? "/objects" : "";
|
|
524
|
+
result = await client(options).get(`/data-platform/connections/${id}${suffix}`);
|
|
525
|
+
}
|
|
526
|
+
else if (options.command === "list-data-platform-mappings") {
|
|
527
|
+
result = await client(options).get("/data-platform/mappings", {
|
|
528
|
+
page: integer(take(rest, "--page", "1"), "page"),
|
|
529
|
+
page_size: integer(take(rest, "--page-size", "50"), "page size"),
|
|
530
|
+
scope_code: take(rest, "--scope-code"),
|
|
531
|
+
});
|
|
532
|
+
}
|
|
533
|
+
else if (options.command === "get-data-platform-mapping-revision") {
|
|
534
|
+
const mappingId = encodeURIComponent(positional(rest, "mapping id"));
|
|
535
|
+
const revisionId = encodeURIComponent(positional(rest, "revision id"));
|
|
536
|
+
result = await client(options).get(`/data-platform/mappings/${mappingId}/revisions/${revisionId}`);
|
|
537
|
+
}
|
|
538
|
+
else if (options.command === "bind-data-platform-parameters")
|
|
539
|
+
result = await client(options).post("/data-platform/parameters", readSpec(positional(rest, "binding spec JSON")));
|
|
540
|
+
else if (options.command === "query-data-platform")
|
|
541
|
+
result = await client(options).post("/data-platform/query-runs", readSpec(positional(rest, "query spec JSON")));
|
|
542
|
+
else if (options.command === "get-data-platform-query")
|
|
543
|
+
result = await client(options).get(`/data-platform/query-runs/${encodeURIComponent(positional(rest, "run id"))}`);
|
|
544
|
+
else if (options.command === "get-data-platform-snapshot") {
|
|
545
|
+
const id = encodeURIComponent(positional(rest, "snapshot id"));
|
|
546
|
+
result = await client(options).get(`/data-platform/snapshots/${id}/rows`, {
|
|
547
|
+
offset: integer(take(rest, "--offset", "0"), "offset"),
|
|
548
|
+
limit: integer(take(rest, "--limit", "200"), "limit"),
|
|
549
|
+
});
|
|
550
|
+
}
|
|
493
551
|
else if (options.command === "list-datasource-connections") {
|
|
494
552
|
result = await client(options).get("/datasource-connections", datasourcePageParams(rest));
|
|
495
553
|
}
|
|
@@ -1051,6 +1109,34 @@ async function runBusinessCli(argv, output = { write: text => process.stdout.wri
|
|
|
1051
1109
|
else if (options.command === "get-model-runtime-release") {
|
|
1052
1110
|
result = await client(options).get("/model-runtime-release");
|
|
1053
1111
|
}
|
|
1112
|
+
else if (options.command === "create-experiment-run") {
|
|
1113
|
+
result = await client(options).post("/experiment-runs", readSpec(positional(rest, "experiment JSON")));
|
|
1114
|
+
}
|
|
1115
|
+
else if (/^(validate|submit|reconcile|cancel)-experiment-run$/.test(options.command)) {
|
|
1116
|
+
const runId = positional(rest, "experiment run id");
|
|
1117
|
+
const action = options.command.split("-")[0];
|
|
1118
|
+
result = await client(options).post(`/experiment-runs/${encodeURIComponent(runId)}/${action}`);
|
|
1119
|
+
}
|
|
1120
|
+
else if (options.command === "get-experiment-run") {
|
|
1121
|
+
result = await client(options).get(`/experiment-runs/${encodeURIComponent(positional(rest, "experiment run id"))}`);
|
|
1122
|
+
}
|
|
1123
|
+
else if (options.command === "list-experiment-candidates") {
|
|
1124
|
+
const runId = positional(rest, "experiment run id");
|
|
1125
|
+
const params = {};
|
|
1126
|
+
const limit = take(rest, "--limit");
|
|
1127
|
+
const offset = take(rest, "--offset");
|
|
1128
|
+
if (limit !== undefined) {
|
|
1129
|
+
params.limit = integer(limit, "--limit");
|
|
1130
|
+
if (params.limit < 1 || params.limit > 500)
|
|
1131
|
+
throw new Error("--limit must be between 1 and 500");
|
|
1132
|
+
}
|
|
1133
|
+
if (offset !== undefined) {
|
|
1134
|
+
params.offset = integer(offset, "--offset");
|
|
1135
|
+
if (params.offset < 0)
|
|
1136
|
+
throw new Error("--offset must be non-negative");
|
|
1137
|
+
}
|
|
1138
|
+
result = await client(options).get(`/experiment-runs/${encodeURIComponent(runId)}/candidates`, params);
|
|
1139
|
+
}
|
|
1054
1140
|
else if (options.command.startsWith("list-") && LIFECYCLE_COLLECTIONS.has(options.command.slice(5))) {
|
|
1055
1141
|
const params = {};
|
|
1056
1142
|
const limit = take(rest, "--limit");
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: data-source-exploration
|
|
3
|
-
description: Discover platform-configured
|
|
3
|
+
description: Discover platform-configured database objects or published external data-platform Mappings, and run bounded structured or Mapping snapshot reads for local data and feature exploration. Use when an algorithm engineer wants to inspect visible sources, Mapping outputs, time coverage or limited rows before defining governed feature assets. Do not use for free-form SQL, bulk export, asset publication, dataset builds, or model training.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Data Source Exploration
|
|
@@ -10,6 +10,15 @@ never request credentials in chat. The platform exposes managed connections and
|
|
|
10
10
|
objects. Connection credentials are write-only control-plane input and are never returned by the
|
|
11
11
|
platform.
|
|
12
12
|
|
|
13
|
+
## External Data Platform
|
|
14
|
+
|
|
15
|
+
For external published mapping discovery and bounded query/snapshot reads, follow
|
|
16
|
+
[the external data platform reference](references/data-platform.md). This includes the complete
|
|
17
|
+
authorized query-candidate catalog, fixed Mapping revisions, asynchronous query runs and paged
|
|
18
|
+
snapshots. Keep that catalog separate from the direct database connections below; it has its own
|
|
19
|
+
IDs, permissions and query semantics. Use `$feature-management` to bind confirmed outputs to
|
|
20
|
+
Parameters and build features; discovery alone does not publish assets.
|
|
21
|
+
|
|
13
22
|
## Manage Connections
|
|
14
23
|
|
|
15
24
|
Datasource connections are business-owned platform resources, not ConfigMap entries. An operator
|
|
@@ -48,6 +57,8 @@ Before discovery, verify the installed client and server target:
|
|
|
48
57
|
|
|
49
58
|
```bash
|
|
50
59
|
command -v ml-platform
|
|
60
|
+
ml-platform version
|
|
61
|
+
ml-platform show-config
|
|
51
62
|
ml-platform health
|
|
52
63
|
```
|
|
53
64
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
interface:
|
|
2
2
|
display_name: "数据源与特征探索"
|
|
3
|
-
short_description: "
|
|
4
|
-
default_prompt: "使用 $data-source-exploration
|
|
3
|
+
short_description: "发现已连接数据源或外部 Mapping,并执行有界查询"
|
|
4
|
+
default_prompt: "使用 $data-source-exploration 发现平台可见库表字段或外部数据平台已发布 Mapping,执行有界查询和快照读取,并整理覆盖率、数据与特征假设。"
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
# Read Published Mappings From The External Data Platform
|
|
2
|
+
|
|
3
|
+
Use this path when the user requests data owned by the external data platform. The modeling
|
|
4
|
+
server holds its login configuration; agents never need its credentials or database DSNs.
|
|
5
|
+
Discover available options with the installed `ml-platform --help`; an older CLI or unconfigured
|
|
6
|
+
server does not imply permission to fall back to a physical database.
|
|
7
|
+
|
|
8
|
+
1. Run `ml-platform data-platform-status` and `ml-platform list-data-platform-connections`.
|
|
9
|
+
2. Inspect connection metadata and objects with `get-data-platform-connection ID` and
|
|
10
|
+
`list-data-platform-objects ID`. These are catalogs, not a physical-query interface.
|
|
11
|
+
3. Prefer `list-data-platform-query-candidates` for model data discovery. It requires the
|
|
12
|
+
integration account's upstream `query:run` capability and returns its complete authorized,
|
|
13
|
+
published, enabled and ready catalog as `candidates`, `complete: true`, and `total`, without
|
|
14
|
+
reading source data. Inspect business names, domains and output labels, keys, units, roles and
|
|
15
|
+
types; filter this complete set locally. It accepts no paging or filter flags. An empty complete
|
|
16
|
+
set is an honest empty result; domains are presentation metadata, not permission grants.
|
|
17
|
+
For an older upstream that lacks this endpoint, use
|
|
18
|
+
`list-data-platform-mappings --page 1 --page-size 50 [--scope-code CODE]`, follow every page
|
|
19
|
+
using `total`, and inspect `lifecycle.run_readiness`. This catalog alone does not prove query
|
|
20
|
+
authorization. Do not fall back on a permission error or to bypass blocked mappings.
|
|
21
|
+
4. Inspect `get-data-platform-mapping-revision MAPPING_ID REVISION_ID`. Confirm output keys,
|
|
22
|
+
units and time semantics. Preserve `active_revision.mapping_revision_id` for reproducibility.
|
|
23
|
+
Execution rechecks authorization and revision state; discovery does not reserve access.
|
|
24
|
+
5. Write a bounded query JSON in the user's workspace, outside the platform repository:
|
|
25
|
+
|
|
26
|
+
```json
|
|
27
|
+
{
|
|
28
|
+
"mapping": {"mapping_revision_id": "33333333-3333-4333-8333-333333333333"},
|
|
29
|
+
"window_start": "2026-10-01T00:00:00+08:00",
|
|
30
|
+
"window_end": "2026-10-01T01:00:00+08:00",
|
|
31
|
+
"max_rows": 100,
|
|
32
|
+
"execution": "async"
|
|
33
|
+
}
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
6. Submit with `ml-platform query-data-platform query.json`. For async submission, poll
|
|
37
|
+
`get-data-platform-query RUN_ID` until terminal. Read `result.snapshot_id` on success;
|
|
38
|
+
a successful HTTP poll alone does not establish successful execution.
|
|
39
|
+
7. Read `get-data-platform-snapshot SNAPSHOT_ID --offset 0 --limit 100`. Advance offset by the
|
|
40
|
+
returned row count until it reaches `captured_rows`. An empty page before that count is an
|
|
41
|
+
incomplete read, not successful completion. Record run ID,
|
|
42
|
+
snapshot ID, mapping revision, columns and their order,
|
|
43
|
+
window, warnings and `completeness`. Partial or truncated results cannot establish complete
|
|
44
|
+
coverage. An empty result is not evidence that the source has no data outside this window.
|
|
45
|
+
|
|
46
|
+
Do not resubmit uncertain POSTs automatically. Keep the returned run ID; after a timeout or
|
|
47
|
+
connection failure, inspect actual task state in the data platform before another submission.
|
|
48
|
+
For `SOURCE_SCHEMA_DRIFT`, ask the data owner to repair/revalidate the source mapping; never
|
|
49
|
+
bypass that gate with a physical ReadSpec or SQL.
|
|
50
|
+
|
|
51
|
+
For training or realtime inference, hand off confirmed outputs to `$feature-management` and its
|
|
52
|
+
Mapping binding workflow. `bind-data-platform-parameters SPEC_JSON` creates/reuses ordinary immutable
|
|
53
|
+
Parameters; exploration alone does not authorize that write. The adapter accepts single published
|
|
54
|
+
structured, unaggregated series, or SQL ReadSpecs, with no inputs/expressions composition. SQL remains
|
|
55
|
+
executed upstream. Mapping output contracts, coverage and causal semantics still require validation;
|
|
56
|
+
SQL-derived values do not prove historical visibility. Duplicate event times and partial snapshots fail.
|
|
57
|
+
|
|
58
|
+
Use the facade query commands for discovery and inspection. Use the Parameter adapter for dataset
|
|
59
|
+
builds and realtime reads; do not copy snapshot rows into catalogs or commit credentials.
|
|
60
|
+
|
|
61
|
+
## Coverage, Visibility And Failure Evidence
|
|
62
|
+
|
|
63
|
+
Start with a short business-relevant window, then expand within the approved query scope when
|
|
64
|
+
checking history coverage. The query facade accepts `max_rows` up to 10000 and snapshot pages up
|
|
65
|
+
to 1000 rows. If a result is partial or truncated, split the time window rather than using the
|
|
66
|
+
captured subset as a complete dataset. Keep the same fixed revision and inspect every window's
|
|
67
|
+
warnings: source SQL may impose its own historical limit even when the snapshot is marked complete.
|
|
68
|
+
Check the requested time grid, first/last timestamps, missingness, duplicates and values; a small
|
|
69
|
+
successful sample does not prove the larger training window is usable.
|
|
70
|
+
|
|
71
|
+
Query/read timestamps describe when data was retrieved. They do not establish when each source row
|
|
72
|
+
first became available. Record whether the Mapping actually publishes a trustworthy availability
|
|
73
|
+
field, and hand this evidence to `$feature-management`; do not invent it from event time or query
|
|
74
|
+
completion time. Ordinary snapshot exploration can proceed without such a field, while strict
|
|
75
|
+
historical `as_of` correctness remains unproven.
|
|
76
|
+
|
|
77
|
+
Distinguish release/configuration failures from empty data. A missing CLI command requires checking
|
|
78
|
+
the installed release; a missing route requires checking the deployed API. A `503` with
|
|
79
|
+
`DATA_PLATFORM_NOT_CONFIGURED` means the server lacks integration configuration. Permission or
|
|
80
|
+
schema-drift failures need resolution in the upstream account/Mapping. Timeouts and disconnected
|
|
81
|
+
POSTs leave submission uncertain; inspect run state before retrying. API health alone does not prove
|
|
82
|
+
upstream authentication or dataset-build Worker support. Report the failed checkpoint and target
|
|
83
|
+
without exposing passwords, cookies, CSRF tokens or Secret contents.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: feature-management
|
|
3
|
-
description: Manage projects, versioned business feature assets and their lifecycle, dataset rowsets and endpoint eligibility, and causal realtime row or sequence-context reads through the deployed ML Platform API using the ml-platform CLI installed with the same release. Use when a business user asks an agent to manage an empty Project, define or change Parameter source contracts, author/package/register an Operator wheel, define single-column Features, order a FeatureSet, create a DatasetManifest or catalog, inspect references, soft-delete or restore a Parameter/Feature/FeatureSet version, configure training/validation/test rowsets or abnormal-data endpoint exclusion, configure realtime freshness policy, run catalog dry-run/apply, build a dataset, fetch inference data, or inspect an artifact without downloading the platform source repository. Do not use for model training, Operator/Dataset deletion, image builds, or Kubernetes deployment.
|
|
3
|
+
description: Manage projects, versioned business feature assets and their lifecycle, dataset rowsets and endpoint eligibility, and causal realtime row or sequence-context reads through the deployed ML Platform API using the ml-platform CLI installed with the same release. Use when a business user asks an agent to manage an empty Project, define or change Parameter source contracts, bind published external data-platform Mapping outputs to Parameters, author/package/register an Operator wheel, define single-column Features, order a FeatureSet, create a DatasetManifest or catalog, inspect references, soft-delete or restore a Parameter/Feature/FeatureSet version, configure training/validation/test rowsets or abnormal-data endpoint exclusion, configure realtime freshness policy, run catalog dry-run/apply, build a dataset, fetch inference data, or inspect an artifact without downloading the platform source repository. Do not use for model training, Operator/Dataset deletion, image builds, or Kubernetes deployment.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Feature Management
|
|
@@ -52,7 +52,8 @@ Keep these evidence rules active in every workflow:
|
|
|
52
52
|
4. Read [references/operator-authoring.md](references/operator-authoring.md) whenever creating or changing Operator code or a wheel.
|
|
53
53
|
5. Read [references/commands.md](references/commands.md) immediately before a platform CLI action: discovery, validation, publication, build, realtime fetch, or artifact download. A local-only draft that is forbidden to call the CLI does not need this reference.
|
|
54
54
|
6. Use [assets/catalog-template](assets/catalog-template) as a copyable starting point for a new end-to-end catalog. Rename every `example_*` identifier and update every referenced path before validation.
|
|
55
|
-
7. Read [references/platform-
|
|
55
|
+
7. Read [references/data-platform-mapping.md](references/data-platform-mapping.md) when binding published external data-platform Mapping outputs to Parameters.
|
|
56
|
+
8. Read [references/platform-capability-guide.md](references/platform-capability-guide.md) only when selecting an asset type or explaining a platform capability. Do not load it merely to write a confirmed local draft; it is never evidence for unresolved business semantics.
|
|
56
57
|
|
|
57
58
|
## Initialize The Client
|
|
58
59
|
|
|
@@ -110,7 +111,8 @@ Confirm:
|
|
|
110
111
|
- the target project (namespace) for the assets; use the built-in `default` only when the user has no dedicated project. After the target is confirmed, write its explicit `project` field in every Parameter, Operator, Feature, FeatureSet and DatasetManifest draft; never rely on the schema default. Reads and filters use the `--project` command option;
|
|
111
112
|
- business meaning, stable asset names, owner, and intended consumers;
|
|
112
113
|
- Parameter source adapter (`postgresql_direct`, `mysql_direct`,
|
|
113
|
-
`sqlserver_direct`, or `
|
|
114
|
+
`sqlserver_direct`, `influxdb_direct`, or `data_platform_mapping`) and credential-free
|
|
115
|
+
source mapping; for external Mappings, confirm the published revision and output keys;
|
|
114
116
|
- feature formula, exact Parameter dependencies, windows, inclusion rules, rounding, null behavior, and output dtype;
|
|
115
117
|
- whether an approved Operator already implements the formula;
|
|
116
118
|
- FeatureSet column order;
|
|
@@ -264,7 +266,13 @@ unit, time/availability semantics and missing policy in the semantic review.
|
|
|
264
266
|
Never infer a source table, column, measurement, tag, unit or timezone from a
|
|
265
267
|
Parameter name.
|
|
266
268
|
|
|
267
|
-
Create one stable, versioned source contract for each independently readable value. Keep credentials out of JSON.
|
|
269
|
+
Create one stable, versioned source contract for each independently readable value. Keep credentials out of JSON. Direct database sources use `postgresql_direct`, `mysql_direct`, `sqlserver_direct`, or `influxdb_direct` and explicit source identity. For PostgreSQL, keep `source.adapter=postgresql_direct` and put the configured alias in `source.connection_id` (for example `postgresql_bf_monitoring`); never put the connection alias in `source.adapter`. The server supplies database DSNs from managed Secrets; never add them to CLI arguments or Catalog JSON. A missing `connection_id` on a historical PostgreSQL Parameter uses the compatibility default `postgresql`. Put source data validity in `quality_rules`; put dataset-specific transformations in preprocess Operators.
|
|
270
|
+
|
|
271
|
+
For an approved external Mapping, use `bind-data-platform-parameters` to create or reuse
|
|
272
|
+
`data_platform_mapping` Parameters and retain the returned Feature input references. Follow
|
|
273
|
+
[the Mapping reference](references/data-platform-mapping.md) for revision pinning, visibility,
|
|
274
|
+
read budgets and Worker acceptance. The Mapping owns its database connection and SQL; do not
|
|
275
|
+
copy them into the Parameter or add a second public binding resource.
|
|
268
276
|
|
|
269
277
|
When historical and live systems expose the same value, keep one Parameter and add an optional
|
|
270
278
|
`online_source`. Batch/as-of reads always use `source`; realtime causal reads use `online_source`
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
interface:
|
|
2
2
|
display_name: "特征与实时取数管理"
|
|
3
|
-
short_description: "
|
|
4
|
-
default_prompt: "Use $feature-management to manage versioned feature assets, build datasets, or fetch
|
|
3
|
+
short_description: "绑定外部 Mapping,管理特征、数据集与实时推理取数"
|
|
4
|
+
default_prompt: "Use $feature-management to bind published external Mapping outputs to Parameters, manage versioned feature assets, build datasets, or fetch causal realtime inference data through the platform API."
|
|
@@ -436,3 +436,17 @@ Use a structured Parquet reader for schema, row count, column order, and missing
|
|
|
436
436
|
- Do not claim a successful publication from `--dry-run` output.
|
|
437
437
|
- Do not claim Chronon compile/backfill from a successful first-phase Operator build.
|
|
438
438
|
- Do not use `build-dataset` to serve a single realtime inference cutoff.
|
|
439
|
+
|
|
440
|
+
## Bind Published Data Platform Outputs
|
|
441
|
+
|
|
442
|
+
When source semantics and publication are confirmed, use the existing external Mapping directly.
|
|
443
|
+
This creates ordinary immutable Parameters; it does not publish Mapping assets or execute a dataset
|
|
444
|
+
build:
|
|
445
|
+
|
|
446
|
+
```bash
|
|
447
|
+
ml-platform bind-data-platform-parameters --help
|
|
448
|
+
ml-platform bind-data-platform-parameters binding.json
|
|
449
|
+
```
|
|
450
|
+
|
|
451
|
+
See [data-platform-mapping.md](data-platform-mapping.md) for the request, returned Feature input
|
|
452
|
+
references, visibility requirements, Worker requirements and acceptance checks.
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
# Bind And Build From External Data Platform Mappings
|
|
2
|
+
|
|
3
|
+
Use after the user has authorized publishing confirmed source contracts. Discovery remains in
|
|
4
|
+
`data-source-exploration`; this workflow writes existing Parameter resources through the modeling API.
|
|
5
|
+
Verify the installed CLI and configured API using the main Skill, then inspect command help.
|
|
6
|
+
|
|
7
|
+
1. Discover a ready published Mapping with `list-data-platform-query-candidates`, then inspect
|
|
8
|
+
its pinned `active_revision.mapping_revision_id` with
|
|
9
|
+
`get-data-platform-mapping-revision ID REVISION`. Discovery returns the complete catalog
|
|
10
|
+
authorized for the integration account; it does not prove data coverage or reserve query access.
|
|
11
|
+
For older upstreams, follow the discovery reference's paged Mapping workflow.
|
|
12
|
+
2. Confirm numeric value output keys, the unique event-time output, units, source timezone,
|
|
13
|
+
frequency, precision, entity scope and historical coverage. Do not treat Mapping readiness or a
|
|
14
|
+
complete snapshot as proof of causal correctness. SQL may already compute values or limit history.
|
|
15
|
+
3. Write a binding JSON outside the platform repository:
|
|
16
|
+
|
|
17
|
+
```json
|
|
18
|
+
{
|
|
19
|
+
"project": "default",
|
|
20
|
+
"mapping_id": "11111111-1111-4111-8111-111111111111",
|
|
21
|
+
"mapping_revision_id": "22222222-2222-4222-8222-222222222222",
|
|
22
|
+
"output_keys": ["out_value"],
|
|
23
|
+
"expected_frequency": "10min",
|
|
24
|
+
"event_time_precision": "s"
|
|
25
|
+
}
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
Substitute confirmed IDs and settings. `output_keys` contains value outputs only. Source timezone
|
|
29
|
+
comes from the ReadSpec; if missing, supply `time_semantics`. Optional `time_semantics`,
|
|
30
|
+
`quality_rules`, `owner`, `partition_seconds`, `max_rows`, `timeout_seconds` follow the existing
|
|
31
|
+
contracts. Never infer availability from request time. Strict `as_of` requires the Mapping to
|
|
32
|
+
expose the trustworthy availability field declared in `time_semantics.availability`.
|
|
33
|
+
4. Run `ml-platform bind-data-platform-parameters binding.json`. Preserve each returned `reference`
|
|
34
|
+
as a Feature input (`project`, `parameter`, `version`). The response also contains the full
|
|
35
|
+
Parameter. Do not manually recreate its source, SQL, credentials or version.
|
|
36
|
+
5. Continue normal Operator → Feature → FeatureSet → DatasetManifest publication. Operator history
|
|
37
|
+
requirements govern source lookback; binding does not add a shared fixed window. Build and realtime
|
|
38
|
+
reads use `source_mode=direct`.
|
|
39
|
+
6. For a DatasetManifest build, distinguish CLI submission from Worker execution. Inspect `get-job`
|
|
40
|
+
until a terminal status, then retrieve the DatasetArtifact. Confirm row and column counts against
|
|
41
|
+
the requested grid, Parquet column order, missing values, time coverage, and source-read evidence
|
|
42
|
+
(`mapping_revision_id`, `run_id`, `snapshot_id`, plan/window and actual read times) before handing
|
|
43
|
+
the dataset to model training. A submitted or running Kubernetes Job is not build evidence.
|
|
44
|
+
|
|
45
|
+
Repeated identical binding requests reuse deterministic Parameter identities. Changed Mapping revision
|
|
46
|
+
or effective configuration creates a new immutable version. Existing manually named Parameters are not
|
|
47
|
+
searched or merged. Multiple outputs are validated before writing, but each Parameter persists
|
|
48
|
+
independently; there is no cross-resource transaction. After an uncertain response, repeating the same
|
|
49
|
+
binding safely converges to the same Parameter contents. This does not mean uncertain upstream query
|
|
50
|
+
POSTs may be retried: inspect those runs separately.
|
|
51
|
+
|
|
52
|
+
Supported sources are single structured, unaggregated series, or SQL ReadSpecs without composed
|
|
53
|
+
inputs/expressions. SQL executes in the data platform. Ambiguous duplicate event times, partial snapshots and
|
|
54
|
+
revision/window mismatches fail. The adapter preserves source warnings, run, snapshot, Mapping
|
|
55
|
+
revision, plan, window and actual read times. Fixed definitions do not freeze mutable upstream rows
|
|
56
|
+
or make expiring snapshots permanent.
|
|
57
|
+
|
|
58
|
+
`read_started_at`/`read_finished_at` record when the adapter performed this read. They are audit
|
|
59
|
+
metadata, not per-row source availability evidence. A Mapping without a trustworthy published
|
|
60
|
+
availability output can be used for ordinary snapshot reads, but it cannot establish strict
|
|
61
|
+
historical `as_of` visibility. Do not substitute request/read time, event time, or `ingested_at`
|
|
62
|
+
for `available_at` unless the Parameter contract explicitly identifies that source field as the
|
|
63
|
+
trusted availability boundary. A complete snapshot proves transfer completeness, not historical
|
|
64
|
+
visibility or business coverage.
|
|
65
|
+
|
|
66
|
+
Mapping reads bypass ITSMP source cache so each read retains its upstream snapshot lineage.
|
|
67
|
+
`partition_seconds` defaults to 86400 (range 1–86400); each partition's `max_rows` defaults to and
|
|
68
|
+
cannot exceed 10000. One source read accepts at most 1024 partitions. `timeout_seconds` defaults
|
|
69
|
+
to 180 and accepts at most 600; it is checked between HTTP calls, whose own client timeout also
|
|
70
|
+
applies. These are source-adapter budgets, separate from Dataset build execution partitions.
|
|
71
|
+
If coverage exceeds a budget, choose a justified source partition or build window; never accept
|
|
72
|
+
truncation or remove required Operator history to make a read succeed. The adapter converts
|
|
73
|
+
upstream half-open windows into the closed source observation boundary, including its end instant;
|
|
74
|
+
the Dataset target grid remains half-open.
|
|
75
|
+
|
|
76
|
+
## Worker Runtime Requirements And Failures
|
|
77
|
+
|
|
78
|
+
The business CLI does not configure Kubernetes, publish images or mount credentials. The platform
|
|
79
|
+
operator must configure the modeling API with the upstream integration Secret and configure the
|
|
80
|
+
dataset-build Job template to mount that Secret read-only and set
|
|
81
|
+
`DATA_PLATFORM_UPSTREAM_CONFIG_FILE`. Build Workers must receive the updated dataset-build image
|
|
82
|
+
containing the `data_platform_mapping` source adapter; changing only the API image is insufficient.
|
|
83
|
+
The API and Worker must use compatible platform code, but training and serving images do not need
|
|
84
|
+
this data-source adapter unless they themselves read Mapping data.
|
|
85
|
+
|
|
86
|
+
After catalog publication and build submission:
|
|
87
|
+
|
|
88
|
+
- On terminal success, inspect and download the artifact before reporting data success.
|
|
89
|
+
- If the job is accepted but remains queued, check Worker scheduling, quotas and active Jobs with
|
|
90
|
+
the platform operator; do not resubmit while its durable state is uncertain.
|
|
91
|
+
- If the Worker reports `unsupported source adapter` for `data_platform_mapping`, verify the
|
|
92
|
+
deployed dataset-build image includes the adapter. A healthy API or successful catalog `apply`
|
|
93
|
+
does not prove the Worker image was updated.
|
|
94
|
+
- If the Worker cannot load `DATA_PLATFORM_UPSTREAM_CONFIG_FILE`, or upstream authentication/network
|
|
95
|
+
fails, have the platform operator verify the Secret key/path, read-only mount, Worker namespace,
|
|
96
|
+
egress and integration-account permissions. Never copy credentials into the Parameter, Manifest,
|
|
97
|
+
CLI arguments or logs.
|
|
98
|
+
- For an uncertain query POST, inspect the upstream run before retrying. For a failed build, inspect
|
|
99
|
+
the durable Job and Worker logs, correct the identified cause, and submit a new attempt only after
|
|
100
|
+
confirming the previous attempt is terminal; do not blindly repeat the same request.
|
|
101
|
+
|
|
102
|
+
The Skill can guide asset authoring and API/CLI evidence collection, but it cannot diagnose container
|
|
103
|
+
exit causes from `get-job` alone or safely change the cluster. Keep Kubernetes events, pod reason,
|
|
104
|
+
container exit code and log tail as separate operational evidence.
|
|
@@ -14,6 +14,12 @@ replay metadata, and data Job execution. This Skill covers that data subsystem;
|
|
|
14
14
|
use the separate model lifecycle Skill for training, evaluation and packaging.
|
|
15
15
|
Model serving, source-table creation and Kubernetes administration are outside
|
|
16
16
|
this Skill's scope. Do not present a Skill boundary as a platform capability gap.
|
|
17
|
+
Parameters may read through the platform's direct database adapters or a pinned,
|
|
18
|
+
published external data-platform Mapping. Mapping discovery and source query
|
|
19
|
+
semantics remain owned by `$data-source-exploration`; binding its approved outputs
|
|
20
|
+
to ordinary Parameters is documented in
|
|
21
|
+
[data-platform-mapping.md](data-platform-mapping.md). Kubernetes Worker image and
|
|
22
|
+
Secret configuration remain platform-operator responsibilities.
|
|
17
23
|
|
|
18
24
|
The following distinctions are part of the platform contract:
|
|
19
25
|
|
|
@@ -151,6 +151,19 @@ For a manifest split named `train`, use `["train"]`. Hand off the exact artifact
|
|
|
151
151
|
identity, DataSchema hash, FeatureSet order, label/temporal contracts, observed
|
|
152
152
|
split counts and binding together.
|
|
153
153
|
|
|
154
|
+
When the same immutable DatasetArtifact must be evaluated with different date
|
|
155
|
+
boundaries, use the TrainingRun level derived binding instead of rebuilding the
|
|
156
|
+
artifact. The supported forms are `mode: derived`, with `strategy: time_range`
|
|
157
|
+
or `chronological_ratio`. Time ranges use timezone aware half open
|
|
158
|
+
ranges for `train`, `validation` and optional `test`. The resolver freezes row identities and uses
|
|
159
|
+
the prediction time column as the sample start. It removes rows whose
|
|
160
|
+
`label_time` crosses that role's end boundary and reports the count; it never
|
|
161
|
+
moves or rewrites the label. `test` remains an independent evaluation role,
|
|
162
|
+
`chronological_ratio` keeps equal prediction timestamps together. Actual counts
|
|
163
|
+
can differ from requested ratios. The ordinary
|
|
164
|
+
`assignment_column` form remains the compatibility path for artifacts that
|
|
165
|
+
already contain a split column.
|
|
166
|
+
|
|
154
167
|
## Evidence checkpoints
|
|
155
168
|
|
|
156
169
|
SQL-source `verifiable=false` means the automatic clock analysis could not
|
|
@@ -46,6 +46,10 @@ deployment does not reach `READY` or an operation is rejected.
|
|
|
46
46
|
returned an ambiguous result.
|
|
47
47
|
- Treat `READY` as valid only when `ReplicasReady`, `ArtifactsVerified`, and
|
|
48
48
|
`SmokePredictionPassed` are all true for the current revision.
|
|
49
|
+
- A READY staging revision can use unified prediction and scheduled reporting.
|
|
50
|
+
Do not promote merely to enable either workflow. Promote only when the user
|
|
51
|
+
requests routed canary/production traffic; unified prediction selects the
|
|
52
|
+
deployment's current revision and does not split traffic by canary weight.
|
|
49
53
|
- Use `predict-deployment` for governed deployment verification. Do not infer
|
|
50
54
|
Kubernetes Service names from a deployment ID.
|
|
51
55
|
- Treat every prediction response `target_time` as China Standard Time in RFC
|
|
@@ -72,6 +72,12 @@ continues to carry them in `inputs.future_covariates`.
|
|
|
72
72
|
The first deployment starts at `staging`. A replacement for an existing
|
|
73
73
|
service/environment declares the active leaf in `previous_deployment_id`.
|
|
74
74
|
Production is reached only by staging to canary to production promotion.
|
|
75
|
+
This stage sequence governs routed rollout, not eligibility for unified prediction
|
|
76
|
+
or reporting: a READY staging revision is sufficient for those workflows.
|
|
77
|
+
New promotion requires `service_exposure.type=Ingress` or an explicit
|
|
78
|
+
`rollout.gateway_name`. NodePort alone does not provide weighted routing.
|
|
79
|
+
The server checks routing prerequisites before persisting the promoted revision;
|
|
80
|
+
a rejected preflight preserves the existing revision and its READY state.
|
|
75
81
|
|
|
76
82
|
`service_exposure` is optional and defaults to `{"type":"ClusterIP"}`. Set
|
|
77
83
|
`type=NodePort` only when direct node access is required. `node_port` is
|
|
@@ -78,6 +78,20 @@ exposure mode.
|
|
|
78
78
|
|
|
79
79
|
## Promotion And Approval
|
|
80
80
|
|
|
81
|
+
Skip this step for ordinary unified prediction or scheduled reports on a READY
|
|
82
|
+
staging deployment. For weighted traffic, use an environment's existing
|
|
83
|
+
ingress-nginx with `service_exposure.type=Ingress`, or an explicitly bound,
|
|
84
|
+
ready Gateway via `rollout.gateway_name`. Inspect the immutable DeploymentSpec
|
|
85
|
+
first; changing exposure requires a reviewed replacement deployment. Do not
|
|
86
|
+
install a Gateway merely because the default ClusterIP or NodePort deployment
|
|
87
|
+
cannot be promoted.
|
|
88
|
+
|
|
89
|
+
Promotion performs Kubernetes routing dry-run admission before saving a new
|
|
90
|
+
revision. This checks API permissions and admission, not live ingress-controller
|
|
91
|
+
health or end-to-end reachability. Continue observing reconciliation and READY
|
|
92
|
+
conditions after an accepted promotion. Canary weights apply to the routed
|
|
93
|
+
entrypoint; `predict-deployment` directly verifies the selected revision.
|
|
94
|
+
|
|
81
95
|
```bash
|
|
82
96
|
ml-platform --profile server promote-deployment <deployment-id> \
|
|
83
97
|
--stage canary --actor <actor> --reason <reason>
|
|
@@ -10,6 +10,14 @@ ml-platform --profile server get-deployment-events <deployment-id> \
|
|
|
10
10
|
|
|
11
11
|
Interpret conditions before considering a reconcile:
|
|
12
12
|
|
|
13
|
+
- A rejected promotion mentioning `rollout.gateway_name`, Gateway HTTP status,
|
|
14
|
+
or routing RBAC leaves the current revision unchanged. Check it with
|
|
15
|
+
`get-deployment`; if staging is READY, unified prediction and reporting remain
|
|
16
|
+
usable. Use existing Ingress for intentional canary traffic, or correct the
|
|
17
|
+
explicit Gateway binding and permissions. Do not repeatedly promote to make
|
|
18
|
+
ordinary prediction work. Historical FAILED promotion revisions are not
|
|
19
|
+
automatically repaired by this guard; inspect the active replacement before
|
|
20
|
+
planning recovery.
|
|
13
21
|
- `ReplicasReady=false`: inspect scheduler, image pull, resource quota, and Pod
|
|
14
22
|
readiness through the platform/cluster diagnostic boundary.
|
|
15
23
|
- `ArtifactsVerified=false`: the Serving `/model` identity does not match the
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: model-lifecycle-management
|
|
3
|
-
description: Manage ITSMP system-model discovery, model training, evaluation, immutable model packaging, and contract-bound inference requests. Use when a user asks to inspect platform-owned SystemModels and runtime bindings, validate or submit a training run, inspect/retry/cancel training jobs, configure or run governed evaluation, inspect evaluation evidence, validate a ModelArtifact, create and inspect a ModelPackage, or invoke a deployed model. Do not use for feature catalog authoring, dataset builds, model deployment, Kubernetes administration, or image release engineering.
|
|
3
|
+
description: Manage ITSMP system-model discovery, model training, evaluation, controlled model comparison and feature/input ablation, immutable model packaging, and contract-bound inference requests. Use when a user asks to inspect platform-owned SystemModels and runtime bindings, validate or submit a training run, run a baseline/variant ablation experiment, inspect/retry/cancel training jobs, configure or run governed evaluation, inspect evaluation evidence, validate a ModelArtifact, create and inspect a ModelPackage, or invoke a deployed model. Do not use for feature catalog authoring, dataset builds, model deployment, Kubernetes administration, or image release engineering.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Model Lifecycle Management
|
|
@@ -31,10 +31,16 @@ resources or selecting runtime bindings. It also defines Job/package preflight
|
|
|
31
31
|
and version-skew handling.
|
|
32
32
|
|
|
33
33
|
For multiple-model experiments or iterative optimization, read
|
|
34
|
-
[references/model-comparison.md](references/model-comparison.md)
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
34
|
+
[references/model-comparison.md](references/model-comparison.md) and
|
|
35
|
+
[references/experiment-runs.md](references/experiment-runs.md). Use the
|
|
36
|
+
platform's durable `ExperimentRun` to associate candidates and reconcile jobs.
|
|
37
|
+
The method still comes from this Skill; ExperimentRun does not select a winner
|
|
38
|
+
or deploy a model.
|
|
39
|
+
|
|
40
|
+
For feature or input ablation experiments, also read
|
|
41
|
+
[references/ablation.md](references/ablation.md). Ablation is a comparison
|
|
42
|
+
protocol represented by `ExperimentRun` and linked to ordinary TrainingRun and
|
|
43
|
+
EvaluationRun resources; there is no separate `AblationRun` API.
|
|
38
44
|
|
|
39
45
|
For unsupervised clustering (`task.kind=clustering`, for example
|
|
40
46
|
`kmeans_clusterer` or `gaussian_mixture_clusterer`), read the clustering
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
interface:
|
|
2
2
|
display_name: "模型训练、评估与打包"
|
|
3
|
-
short_description: "管理 ITSMP
|
|
4
|
-
default_prompt: "使用 $model-lifecycle-management
|
|
3
|
+
short_description: "管理 ITSMP 模型训练、评估、比较与消融实验"
|
|
4
|
+
default_prompt: "使用 $model-lifecycle-management 管理模型训练、评估、比较或消融实验流程。"
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
# Feature and input ablation
|
|
2
|
+
|
|
3
|
+
Use this method when the question is whether a feature, feature group,
|
|
4
|
+
covariate, input channel or preprocessing input contributes to a model result.
|
|
5
|
+
It is a controlled comparison protocol represented by an `ExperimentRun`. The
|
|
6
|
+
run links existing `TrainingRun`, `ModelArtifact`, `EvaluationRun` and
|
|
7
|
+
`EvaluationResult` facts. Read [experiment-runs.md](experiment-runs.md) for
|
|
8
|
+
execution and [model-comparison.md](model-comparison.md) for evidence rules.
|
|
9
|
+
|
|
10
|
+
## Freeze the baseline scope
|
|
11
|
+
|
|
12
|
+
Define one baseline candidate with the complete approved input FeatureSet and
|
|
13
|
+
freeze these values for the whole ablation round:
|
|
14
|
+
|
|
15
|
+
- the exact `DatasetArtifact` and `manifest_hash`;
|
|
16
|
+
- DataSchema, label columns, prediction/label time semantics and series keys;
|
|
17
|
+
- train/validation/test assignment and rowset population;
|
|
18
|
+
- evaluation config, metric versions, calculation space and slices;
|
|
19
|
+
- SystemModel, runtime release, reproducibility settings and execution policy.
|
|
20
|
+
|
|
21
|
+
The baseline is the full input set for the hypothesis being tested. A model
|
|
22
|
+
name, FeatureSet name or metric value is not enough to identify it. Store the
|
|
23
|
+
baseline and variants in one immutable ExperimentRun spec.
|
|
24
|
+
|
|
25
|
+
## Define variants
|
|
26
|
+
|
|
27
|
+
Create one candidate per removal or replacement under test. Prefer one-factor
|
|
28
|
+
variants:
|
|
29
|
+
|
|
30
|
+
```text
|
|
31
|
+
baseline: [load, temperature, pressure, calendar]
|
|
32
|
+
remove_load: [temperature, pressure, calendar]
|
|
33
|
+
remove_weather: [load, pressure, calendar]
|
|
34
|
+
remove_calendar: [load, temperature, pressure]
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
Keep the retained columns in their declared order. Give every candidate a
|
|
38
|
+
stable candidate ID, a short hypothesis, the exact removed input keys and the
|
|
39
|
+
parent baseline candidate ID in the ExperimentRun spec. Do not change hyperparameters,
|
|
40
|
+
labels, splits or evaluation policy at the same time as the ablated input.
|
|
41
|
+
If several inputs must be removed together for a single hypothesis, name that
|
|
42
|
+
group explicitly and do not interpret the result as the contribution of each
|
|
43
|
+
member separately.
|
|
44
|
+
|
|
45
|
+
For a feature-only ablation, bind each candidate to an immutable registered
|
|
46
|
+
FeatureSet that is an allowed subset/order projection of the same artifact.
|
|
47
|
+
The wide DatasetArtifact normally does not need rebuilding. Use
|
|
48
|
+
`$feature-management` to create or discover those FeatureSet versions; do not
|
|
49
|
+
edit an existing FeatureSet in place. If the hypothesis changes source data,
|
|
50
|
+
operator logic, label materialization, row membership, or feature values in
|
|
51
|
+
the artifact, create a new DatasetArtifact and start a separate comparison
|
|
52
|
+
scope instead of calling it a feature ablation.
|
|
53
|
+
|
|
54
|
+
## Execute the round
|
|
55
|
+
|
|
56
|
+
1. Create one ExperimentRun with the immutable dataset identity, evaluation
|
|
57
|
+
contract, baseline candidate and variants. Use
|
|
58
|
+
[experiment-runs.md](experiment-runs.md) for the JSON shape.
|
|
59
|
+
2. Validate all candidates before submitting any Job. Validation must show each
|
|
60
|
+
candidate FeatureSet, projected input columns, schema hash and runtime
|
|
61
|
+
identity. Validation has no training side effects.
|
|
62
|
+
3. Submit only within the user's authorized training scope. Reconcile the
|
|
63
|
+
ExperimentRun after uncertain responses; never create a replacement run to
|
|
64
|
+
retry an unknown candidate submission.
|
|
65
|
+
4. Observe every Job and validate its ModelArtifact. A failed or infrastructure
|
|
66
|
+
Job has no model-quality score and must be reported separately.
|
|
67
|
+
5. Evaluate every successful artifact on the same frozen validation rowset with
|
|
68
|
+
the same EvaluationConfig. Inspect coverage, required decisions and result
|
|
69
|
+
hashes; do not compute replacement metrics locally.
|
|
70
|
+
6. Inspect the ExperimentRun comparison on complete, comparable results. Use
|
|
71
|
+
the baseline as the reference and report absolute and relative metric
|
|
72
|
+
deltas. For metrics where lower is better, a positive candidate-minus-
|
|
73
|
+
baseline delta is degradation; follow the MetricDefinition rather than
|
|
74
|
+
assuming direction.
|
|
75
|
+
|
|
76
|
+
Example comparison request:
|
|
77
|
+
|
|
78
|
+
```json
|
|
79
|
+
{
|
|
80
|
+
"schema_version": "ml_data_platform.evaluation_result_comparison_request/v1",
|
|
81
|
+
"comparison_type": "model",
|
|
82
|
+
"result_ids": ["baseline_result", "remove_load_result"],
|
|
83
|
+
"metrics": ["regression.mae", "regression.rmse"],
|
|
84
|
+
"sort_direction": "ascending"
|
|
85
|
+
}
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
Do not rank candidates with different rowsets, labels, horizons, metric
|
|
89
|
+
definitions or incomplete coverage. A candidate that fails because of a
|
|
90
|
+
runtime, image or contract problem is inconclusive about the ablated input.
|
|
91
|
+
|
|
92
|
+
## Interpret and close the round
|
|
93
|
+
|
|
94
|
+
Report, for every candidate, the baseline/variant FeatureSet identities, exact
|
|
95
|
+
removed inputs, TrainingRun/Job/ModelArtifact IDs, EvaluationResult IDs,
|
|
96
|
+
coverage, metrics, deltas and failure evidence. A small metric difference is
|
|
97
|
+
not proof that an input is useless; state the observed tolerance and whether
|
|
98
|
+
the experiment had repeated seeds or uncertainty estimates. If the result is
|
|
99
|
+
inconclusive, keep the input undecided rather than deleting it.
|
|
100
|
+
|
|
101
|
+
Only after validation comparison selects a candidate may the normal held-out
|
|
102
|
+
test procedure in `model-comparison.md` be used. The test result validates the
|
|
103
|
+
locked candidate and must not be used to choose another ablation. Packaging,
|
|
104
|
+
registration and deployment remain separate authorized gates.
|
|
105
|
+
|
|
106
|
+
The round is complete only when every submitted candidate is accounted for as
|
|
107
|
+
complete, failed, pending, unknown or skipped with a reason. Stop when the
|
|
108
|
+
declared ablation set is covered, the authorized training scope is exhausted,
|
|
109
|
+
or a shared data/runtime defect blocks the round. Do not add an automatic
|
|
110
|
+
feature deletion threshold; business owners decide the practical impact and
|
|
111
|
+
tradeoff after reviewing comparable evidence.
|
|
@@ -51,6 +51,43 @@ Inspect `get-metric-definition regression.mae v1` before relying on this metric.
|
|
|
51
51
|
Release mode additionally requires at least one required validation rule with a
|
|
52
52
|
business-approved threshold; do not invent thresholds to obtain PASS.
|
|
53
53
|
|
|
54
|
+
`regression.hit_rate:v1` is available for point-prediction regression metrics.
|
|
55
|
+
Set `parameters.tolerance` in the metric entry; tolerance is a finite,
|
|
56
|
+
nonnegative absolute error in the target's units, and equality counts as a hit:
|
|
57
|
+
|
|
58
|
+
```json
|
|
59
|
+
{
|
|
60
|
+
"name": "regression.hit_rate", "version": "v1",
|
|
61
|
+
"targets": ["future_pressure"], "calculation_space": "business",
|
|
62
|
+
"parameters": {"tolerance": 5.0}
|
|
63
|
+
}
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
The result is the fraction of valid rows whose absolute prediction error is at
|
|
67
|
+
most the tolerance. The resolved tolerance is recorded in each MetricResult and
|
|
68
|
+
must match when results are summarized or compared. It is an absolute threshold,
|
|
69
|
+
not a percentage; choose it using the target's unit and business acceptance
|
|
70
|
+
criteria.
|
|
71
|
+
|
|
72
|
+
To calculate per-day metrics on China Standard Time dates, add the time bucket
|
|
73
|
+
contract to the registered EvaluationConfig:
|
|
74
|
+
|
|
75
|
+
```json
|
|
76
|
+
{
|
|
77
|
+
"time_buckets": {
|
|
78
|
+
"width": "1d",
|
|
79
|
+
"timezone": "Asia/Shanghai",
|
|
80
|
+
"alignment": "left"
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
`timezone` accepts IANA timezone names and defaults to `UTC`. Daily buckets use
|
|
86
|
+
local calendar midnights and half-open intervals, so a bucket is keyed by the
|
|
87
|
+
local date; use `dimension: "time_bucket"` when creating an analysis view from
|
|
88
|
+
the resulting EvaluationResult IDs. The configured timezone is part of the
|
|
89
|
+
immutable EvaluationConfig identity.
|
|
90
|
+
|
|
54
91
|
For a fixed-length multi-step forecast, `regression.mae` and
|
|
55
92
|
`regression.rmse` cover only the terminal point at the maximum trained horizon.
|
|
56
93
|
Use `regression.trajectory_mae` and `regression.trajectory_rmse` for a release
|
|
@@ -237,7 +274,7 @@ Training feedback (`cluster_count`, `min_cluster_share`,
|
|
|
237
274
|
| Symptom | Actual check and next action |
|
|
238
275
|
| --- | --- |
|
|
239
276
|
| `requires a named split` | Inherited TrainingRun `data.splits` is not a dictionary and requested rowset is not `all`. Inspect the original training request, not only manifest/resolved/Parquet splits. This check has no horizon-zero branch. |
|
|
240
|
-
| `rowset is not declared` | Inspect `data.splits` role keys (`train`, `validation`, `test`), nonempty value arrays, assignment column and observed values. Manifest `training` can map to consumer role `train`. |
|
|
277
|
+
| `rowset is not declared` | Inspect `data.splits` role keys (`train`, `validation`, `test`). For an ordinary binding, check nonempty value arrays, assignment column and observed values. For `mode: derived`, check the timezone-aware `strategy: time_range` ranges and the resolved row counts. Manifest `training` can map to consumer role `train`. |
|
|
241
278
|
| DataSchema mismatch | Compare the full schema with the trained Job's hash, including split columns, roles and dtypes. Do not remove columns or falsify hashes to pass. |
|
|
242
279
|
| Label leakage | Materialize label columns separately from FeatureSet order; input selection alone cannot repair the contract. |
|
|
243
280
|
| Chronos-2 runtime unavailable | Record executor, error stage/Job, runtime identity and Worker image evidence. The prediction plugin cannot load a dependency; request runtime support from the platform owner. New dataset/model versions do not install dependencies. |
|
|
@@ -315,6 +352,23 @@ ml-platform --profile server publish-executable-package <name> <version>
|
|
|
315
352
|
|
|
316
353
|
Custom metric packages must be deterministic, digest-bound, network-restricted, verified, and separately authorized for publication.
|
|
317
354
|
|
|
355
|
+
The published wheel entrypoint is called as `entrypoint(inputs, context)` in an
|
|
356
|
+
isolated evaluation worker. `inputs` contains only the declared arrays (for
|
|
357
|
+
example `label`, `prediction`, `probability`, and `weight`). `context` contains
|
|
358
|
+
the frozen metric identity and the resolved parameters for this evaluation under
|
|
359
|
+
`context["parameters"]`; read that mapping instead of relying on package or
|
|
360
|
+
process globals. Parameter validation happens when the EvaluationConfig is
|
|
361
|
+
resolved, and the resolved values are persisted in the MetricResult and its
|
|
362
|
+
comparison/summary evidence. A package metric that declares no parameter schema
|
|
363
|
+
must reject supplied parameters.
|
|
364
|
+
|
|
365
|
+
```python
|
|
366
|
+
def score(inputs, context):
|
|
367
|
+
tolerance = float(context["parameters"]["tolerance"])
|
|
368
|
+
error = abs(inputs["prediction"] - inputs["label"])
|
|
369
|
+
return float((error <= tolerance).mean())
|
|
370
|
+
```
|
|
371
|
+
|
|
318
372
|
```bash
|
|
319
373
|
ml-platform --profile server validate-evaluation-run evaluation-request.json
|
|
320
374
|
ml-platform --profile server submit-evaluation evaluation-request.json
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
# ExperimentRun
|
|
2
|
+
|
|
3
|
+
`ExperimentRun` is the platform control-plane record for a finite comparison
|
|
4
|
+
over one frozen `DatasetArtifact`. It supports model comparison, feature/input
|
|
5
|
+
ablation and a small candidate matrix while reusing existing TrainingRun,
|
|
6
|
+
TrainingJob, ModelArtifact, EvaluationRun, EvaluationResult and
|
|
7
|
+
EvaluationComparison records.
|
|
8
|
+
|
|
9
|
+
It does not implement AutoML, a general DAG engine, automatic model selection,
|
|
10
|
+
packaging or deployment. The Skill owns the modeling method and stopping rules;
|
|
11
|
+
the platform owns durable candidate state and reconciliation.
|
|
12
|
+
|
|
13
|
+
## Lifecycle
|
|
14
|
+
|
|
15
|
+
Use the installed `ml-platform` CLI:
|
|
16
|
+
|
|
17
|
+
```text
|
|
18
|
+
ml-platform create-experiment-run SPEC.json
|
|
19
|
+
ml-platform validate-experiment-run RUN_ID
|
|
20
|
+
ml-platform submit-experiment-run RUN_ID
|
|
21
|
+
ml-platform get-experiment-run RUN_ID
|
|
22
|
+
ml-platform list-experiment-candidates RUN_ID --limit 50 --offset 0
|
|
23
|
+
ml-platform reconcile-experiment-run RUN_ID
|
|
24
|
+
ml-platform cancel-experiment-run RUN_ID
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
Create is idempotent for the same `experiment_run_id` and immutable
|
|
28
|
+
`spec_hash`. Always validate before submit. Validation resolves every candidate's
|
|
29
|
+
TrainingJob snapshot and has no training side effects. Submit is the mutation
|
|
30
|
+
that may create TrainingJob records, subject to `max_parallelism`.
|
|
31
|
+
|
|
32
|
+
## Candidate contract
|
|
33
|
+
|
|
34
|
+
The spec must contain at least two candidates, a baseline candidate, one
|
|
35
|
+
DatasetArtifact identity and one evaluation contract. Each candidate carries a
|
|
36
|
+
complete TrainingRun v4 JSON object, a stable `candidate_id`, an optional
|
|
37
|
+
hypothesis and parent candidate, and an execution policy. Candidate FeatureSets
|
|
38
|
+
may be different exact-version subset/order projections of the same wide
|
|
39
|
+
DatasetArtifact. Labels, split membership, temporal semantics, evaluation
|
|
40
|
+
configuration and comparison population remain shared.
|
|
41
|
+
|
|
42
|
+
## Recovery rules
|
|
43
|
+
|
|
44
|
+
`UNKNOWN` means the platform cannot prove whether a remote submission happened.
|
|
45
|
+
Reconcile first queries the durable TrainingJob/EvaluationRun records. It may
|
|
46
|
+
resume only when the lifecycle record proves no remote submission was reached;
|
|
47
|
+
it never blindly retries an unknown Kubernetes operation. An unknown candidate
|
|
48
|
+
also stops new candidate submissions until it is reconciled. A known terminal
|
|
49
|
+
failure is preserved and does not consume a parallel slot for independent
|
|
50
|
+
candidates.
|
|
51
|
+
|
|
52
|
+
## Completion
|
|
53
|
+
|
|
54
|
+
Every candidate must be `RESULT_READY`, `FAILED`, `SKIPPED` or otherwise
|
|
55
|
+
accounted for. The service calls the existing EvaluationComparison implementation
|
|
56
|
+
only after complete results exist. `COMPLETE` with `ranking_allowed=true` requires
|
|
57
|
+
complete evidence, comparable population and a release-mode EvaluationConfig;
|
|
58
|
+
otherwise the run is `INCONCLUSIVE`. A result never authorizes registration,
|
|
59
|
+
packaging or deployment by itself.
|
|
@@ -1,10 +1,16 @@
|
|
|
1
1
|
# Comparing models within one experiment
|
|
2
2
|
|
|
3
|
+
Feature or input ablation is the controlled one-factor variant of this
|
|
4
|
+
workflow. Read [ablation.md](ablation.md) for the baseline, removal-set and
|
|
5
|
+
round-closeout rules; the comparison gates below still apply.
|
|
6
|
+
|
|
3
7
|
Use one documented goal and user-authorized scope: metric, target, candidate
|
|
4
8
|
constraints and any maximum number of training submissions. Preserve that goal
|
|
5
9
|
when a follow-up changes a constraint or asks for verification. Reuse existing
|
|
6
10
|
authorization when it covers the next action; ask only for missing decisions.
|
|
7
11
|
No TUI, session service, or Runtime-specific tool is required for this method.
|
|
12
|
+
Persist the candidate set and execution links in an `ExperimentRun`; see
|
|
13
|
+
[experiment-runs.md](experiment-runs.md) for its CLI lifecycle.
|
|
8
14
|
|
|
9
15
|
## Shared scope and candidate execution
|
|
10
16
|
|
|
@@ -45,9 +51,8 @@ forecast horizon, and do not let trajectory construction cross split
|
|
|
45
51
|
boundaries. Compare complete platform-produced EvaluationResults only after
|
|
46
52
|
each candidate passes its own TrainingRun and evaluation preflight.
|
|
47
53
|
|
|
48
|
-
For each candidate, record its hypothesis, exact changed inputs
|
|
49
|
-
|
|
50
|
-
directory. Submit within the user's authorization, observe the TrainingJob,
|
|
54
|
+
For each candidate, record its hypothesis, exact changed inputs and parent
|
|
55
|
+
candidate in the ExperimentRun spec. Submit within the user's authorization, observe the TrainingJob,
|
|
51
56
|
validate the resulting ModelArtifact, then submit and inspect governed
|
|
52
57
|
evaluation. Explain the observed result before choosing another candidate.
|
|
53
58
|
Do not resubmit after an unknown outcome: reconcile the existing Job or retry
|
|
@@ -57,12 +62,9 @@ the authorization described in the training reference.
|
|
|
57
62
|
## Rounds, failure evidence and stopping
|
|
58
63
|
|
|
59
64
|
A round groups candidates that test a related hypothesis under the frozen
|
|
60
|
-
comparison scope.
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
status, result IDs, per-candidate reflection and the round's next decision.
|
|
64
|
-
This is an agent work record, not a new platform resource or required tool.
|
|
65
|
-
Update it after submissions and observations so another coding agent can resume.
|
|
65
|
+
comparison scope. ExperimentRun and its candidates are the durable execution
|
|
66
|
+
record. Keep any additional method reflection in the agent's working directory
|
|
67
|
+
without duplicating platform status or IDs.
|
|
66
68
|
|
|
67
69
|
When a candidate fails, inspect the actual Job status, attempts and diagnostic
|
|
68
70
|
evidence. Distinguish a model execution failure from a runtime/infrastructure
|
|
@@ -54,6 +54,40 @@ it does not reconstruct it from manifest `rowset_splits`. Save the submitted
|
|
|
54
54
|
TrainingRun JSON, validation output, Job ID and ModelArtifact ID in the user's
|
|
55
55
|
working directory so later diagnosis needs no source repository.
|
|
56
56
|
|
|
57
|
+
For a second experiment over the same immutable DatasetArtifact, a TrainingRun
|
|
58
|
+
may freeze a time based split without adding a split column to the artifact:
|
|
59
|
+
|
|
60
|
+
```json
|
|
61
|
+
{
|
|
62
|
+
"splits": {
|
|
63
|
+
"mode": "derived",
|
|
64
|
+
"strategy": "time_range",
|
|
65
|
+
"source_rowsets": ["all"],
|
|
66
|
+
"ranges": {
|
|
67
|
+
"train": {"start": "2026-01-01T00:00:00+08:00", "end": "2026-07-01T00:00:00+08:00"},
|
|
68
|
+
"validation": {"start": "2026-07-01T00:00:00+08:00", "end": "2026-08-01T00:00:00+08:00"},
|
|
69
|
+
"test": {"start": "2026-08-01T00:00:00+08:00", "end": "2026-09-01T00:00:00+08:00"}
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
`time_range` uses timezone aware, left closed/right open prediction time
|
|
76
|
+
intervals and requires unique row keys. The platform freezes each role's row
|
|
77
|
+
identity in the resolved TrainingJob and rechecks it in the Worker. Samples
|
|
78
|
+
whose `label_time` reaches or passes their role's end are excluded and counted
|
|
79
|
+
in the validation snapshot; if that leaves no train samples, validation fails.
|
|
80
|
+
Training time evaluation must explicitly use `train` or `validation`; `test`
|
|
81
|
+
is reserved for an independent EvaluationRun. For `chronological_ratio`, provide
|
|
82
|
+
`ratios` with `train`, `validation` and `test` values summing to `1`; equal
|
|
83
|
+
prediction timestamps stay together. Actual counts may differ from requested
|
|
84
|
+
ratios, and the algorithm version and row identities are frozen in the Job
|
|
85
|
+
snapshot. Derived splits currently use all artifact rows as candidates; use
|
|
86
|
+
`assignment_column` for artifacts containing auxiliary history or truth rows.
|
|
87
|
+
Only `time_range` and `chronological_ratio` are supported. Confirm the selected
|
|
88
|
+
training and evaluation Worker images support derived splits before submission.
|
|
89
|
+
Existing `assignment_column` contracts keep their original behavior.
|
|
90
|
+
|
|
57
91
|
## Commands
|
|
58
92
|
|
|
59
93
|
Read [training-contracts.md](training-contracts.md) when authoring a Run or Job
|
|
@@ -28,6 +28,9 @@ schedule request or deployment policy. A clustering deployment (its model
|
|
|
28
28
|
artifact has `output_bindings`) has no horizon: omit `horizon` and
|
|
29
29
|
`output_window`, which are rejected. A report run may be `SKIPPED` when the
|
|
30
30
|
selected revision is not READY.
|
|
31
|
+
A READY staging revision is eligible; reporting does not require canary or
|
|
32
|
+
production promotion, an Ingress, or a Gateway. Do not promote a deployment
|
|
33
|
+
just to enable its report schedule.
|
|
31
34
|
|
|
32
35
|
## Configure a destination
|
|
33
36
|
|