@zhuoyuezs/ml-platform 0.1.17 → 0.1.18
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 +28 -28
- package/package.json +1 -1
- package/release.json +13 -13
- package/runtime/business-client/README.md +15 -1
- package/runtime/business-client/package-lock.json +2 -2
- package/runtime/business-client/package.json +1 -1
- package/runtime/business-client/src/cli.js +9 -4
- package/skills/feature-management/SKILL.md +19 -5
- package/skills/feature-management/references/commands.md +4 -2
- package/skills/feature-management/references/contracts.md +6 -0
- package/skills/model-deployment-management/SKILL.md +6 -0
- package/skills/model-deployment-management/references/contracts.md +32 -5
- package/skills/model-deployment-management/references/operations.md +33 -0
- package/skills/model-deployment-management/references/troubleshooting.md +19 -0
- package/skills/model-lifecycle-management/SKILL.md +1 -0
- package/skills/model-lifecycle-management/references/packaging.md +16 -0
- package/skills/model-lifecycle-management/references/training-contracts.md +16 -4
- package/skills/model-lifecycle-management/references/training.md +9 -6
package/checksums.json
CHANGED
|
@@ -2,17 +2,17 @@
|
|
|
2
2
|
"files": [
|
|
3
3
|
{
|
|
4
4
|
"path": "runtime/business-client/README.md",
|
|
5
|
-
"sha256": "sha256:
|
|
6
|
-
"size_bytes":
|
|
5
|
+
"sha256": "sha256:69a21686d3b27682ad9864646f59353ca188454851941e63a88175951f516450",
|
|
6
|
+
"size_bytes": 7326
|
|
7
7
|
},
|
|
8
8
|
{
|
|
9
9
|
"path": "runtime/business-client/package-lock.json",
|
|
10
|
-
"sha256": "sha256:
|
|
10
|
+
"sha256": "sha256:386e8b46ae8e6d7fd83e247b0412560710bee263c2545b593c5442b8f1363765",
|
|
11
11
|
"size_bytes": 381
|
|
12
12
|
},
|
|
13
13
|
{
|
|
14
14
|
"path": "runtime/business-client/package.json",
|
|
15
|
-
"sha256": "sha256:
|
|
15
|
+
"sha256": "sha256:83e60780d91abc78420a533ba0f8ea184f31886f963ca6f1554da819530a6335",
|
|
16
16
|
"size_bytes": 501
|
|
17
17
|
},
|
|
18
18
|
{
|
|
@@ -22,8 +22,8 @@
|
|
|
22
22
|
},
|
|
23
23
|
{
|
|
24
24
|
"path": "runtime/business-client/src/cli.js",
|
|
25
|
-
"sha256": "sha256:
|
|
26
|
-
"size_bytes":
|
|
25
|
+
"sha256": "sha256:566ce8f224b74f03fcf168f5f2c8102505f1041b85862e8c407ce9103c96424f",
|
|
26
|
+
"size_bytes": 53638
|
|
27
27
|
},
|
|
28
28
|
{
|
|
29
29
|
"path": "runtime/business-client/src/config.js",
|
|
@@ -37,8 +37,8 @@
|
|
|
37
37
|
},
|
|
38
38
|
{
|
|
39
39
|
"path": "skills/feature-management/SKILL.md",
|
|
40
|
-
"sha256": "sha256:
|
|
41
|
-
"size_bytes":
|
|
40
|
+
"sha256": "sha256:88898ea83ff339512d5512537db485a2764420abb67afceb9dd090cc780c00e0",
|
|
41
|
+
"size_bytes": 33021
|
|
42
42
|
},
|
|
43
43
|
{
|
|
44
44
|
"path": "skills/feature-management/agents/openai.yaml",
|
|
@@ -92,13 +92,13 @@
|
|
|
92
92
|
},
|
|
93
93
|
{
|
|
94
94
|
"path": "skills/feature-management/references/commands.md",
|
|
95
|
-
"sha256": "sha256:
|
|
96
|
-
"size_bytes":
|
|
95
|
+
"sha256": "sha256:ffd106cd785fe0d07ee20f51b7f55ca520da2fc6367bc5bc1ec0218600146d6e",
|
|
96
|
+
"size_bytes": 13905
|
|
97
97
|
},
|
|
98
98
|
{
|
|
99
99
|
"path": "skills/feature-management/references/contracts.md",
|
|
100
|
-
"sha256": "sha256:
|
|
101
|
-
"size_bytes":
|
|
100
|
+
"sha256": "sha256:ef582d4ee9ade16de2a5f97b8bf9546969b6f2859eb020986bf25952993df402",
|
|
101
|
+
"size_bytes": 30483
|
|
102
102
|
},
|
|
103
103
|
{
|
|
104
104
|
"path": "skills/feature-management/references/operator-authoring.md",
|
|
@@ -117,8 +117,8 @@
|
|
|
117
117
|
},
|
|
118
118
|
{
|
|
119
119
|
"path": "skills/model-deployment-management/SKILL.md",
|
|
120
|
-
"sha256": "sha256:
|
|
121
|
-
"size_bytes":
|
|
120
|
+
"sha256": "sha256:a78f492b95258e2111e8f410f4bf731cb2fa71997f39d236d9bf75dda3e0ad18",
|
|
121
|
+
"size_bytes": 3082
|
|
122
122
|
},
|
|
123
123
|
{
|
|
124
124
|
"path": "skills/model-deployment-management/agents/openai.yaml",
|
|
@@ -127,23 +127,23 @@
|
|
|
127
127
|
},
|
|
128
128
|
{
|
|
129
129
|
"path": "skills/model-deployment-management/references/contracts.md",
|
|
130
|
-
"sha256": "sha256:
|
|
131
|
-
"size_bytes":
|
|
130
|
+
"sha256": "sha256:49a2595106b9b0cb5a305acbd285cdccad2bf4aa7627d6fb6b966783372ea724",
|
|
131
|
+
"size_bytes": 3543
|
|
132
132
|
},
|
|
133
133
|
{
|
|
134
134
|
"path": "skills/model-deployment-management/references/operations.md",
|
|
135
|
-
"sha256": "sha256:
|
|
136
|
-
"size_bytes":
|
|
135
|
+
"sha256": "sha256:4407d87c1debbc865095b2857a6ece7a728d04b25fd8772d4a79a0361b0724ea",
|
|
136
|
+
"size_bytes": 3474
|
|
137
137
|
},
|
|
138
138
|
{
|
|
139
139
|
"path": "skills/model-deployment-management/references/troubleshooting.md",
|
|
140
|
-
"sha256": "sha256:
|
|
141
|
-
"size_bytes":
|
|
140
|
+
"sha256": "sha256:fcdd4b244d670513fe14a3f343af2074a24cac0e3b07645ad455658564314e95",
|
|
141
|
+
"size_bytes": 2852
|
|
142
142
|
},
|
|
143
143
|
{
|
|
144
144
|
"path": "skills/model-lifecycle-management/SKILL.md",
|
|
145
|
-
"sha256": "sha256:
|
|
146
|
-
"size_bytes":
|
|
145
|
+
"sha256": "sha256:61a89145ef33a2d58c58d8f352006590a47cf9587705568dec1c8ffe7ed8938e",
|
|
146
|
+
"size_bytes": 4014
|
|
147
147
|
},
|
|
148
148
|
{
|
|
149
149
|
"path": "skills/model-lifecycle-management/agents/openai.yaml",
|
|
@@ -162,18 +162,18 @@
|
|
|
162
162
|
},
|
|
163
163
|
{
|
|
164
164
|
"path": "skills/model-lifecycle-management/references/packaging.md",
|
|
165
|
-
"sha256": "sha256:
|
|
166
|
-
"size_bytes":
|
|
165
|
+
"sha256": "sha256:ad4e519f895d121202f99ed038a0ac6a6db3d97bdf95473e942399163d7062a3",
|
|
166
|
+
"size_bytes": 5640
|
|
167
167
|
},
|
|
168
168
|
{
|
|
169
169
|
"path": "skills/model-lifecycle-management/references/training-contracts.md",
|
|
170
|
-
"sha256": "sha256:
|
|
171
|
-
"size_bytes":
|
|
170
|
+
"sha256": "sha256:28fe32b2673db8f6cb1e02053bf5709826786e48dbe9951eac7bb4d98368d0c4",
|
|
171
|
+
"size_bytes": 12644
|
|
172
172
|
},
|
|
173
173
|
{
|
|
174
174
|
"path": "skills/model-lifecycle-management/references/training.md",
|
|
175
|
-
"sha256": "sha256:
|
|
176
|
-
"size_bytes":
|
|
175
|
+
"sha256": "sha256:97c20f02b1179dc7b7527cb7b5e11978778ccb8b76cdf88c229bcfdb5786f045",
|
|
176
|
+
"size_bytes": 5629
|
|
177
177
|
}
|
|
178
178
|
],
|
|
179
179
|
"schema_version": "data_platform.ml_platform_checksums/v1"
|
package/package.json
CHANGED
package/release.json
CHANGED
|
@@ -13,8 +13,8 @@
|
|
|
13
13
|
"entrypoint": "src/cli.js",
|
|
14
14
|
"name": "ml-platform",
|
|
15
15
|
"path": "runtime/business-client",
|
|
16
|
-
"sha256": "sha256:
|
|
17
|
-
"version": "0.7.
|
|
16
|
+
"sha256": "sha256:4304c1a26444c60408541217bc252e871a2950d1e3d6259dc0bf6b27d294bf09",
|
|
17
|
+
"version": "0.7.8"
|
|
18
18
|
},
|
|
19
19
|
"policy_sha256": "sha256:02fbde0134696b78c0c365d6e0b76c9814227208da5b2b3d4e5dbd82dc4a3606",
|
|
20
20
|
"public_schema_versions": [
|
|
@@ -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.1.
|
|
28
|
+
"release_version": "0.1.18",
|
|
29
29
|
"runtime_requirements": {
|
|
30
30
|
"node": ">=18",
|
|
31
31
|
"os": [
|
|
@@ -37,22 +37,22 @@
|
|
|
37
37
|
"skills": {
|
|
38
38
|
"feature-management": {
|
|
39
39
|
"path": "skills/feature-management",
|
|
40
|
-
"requires_cli": ">=0.7.
|
|
41
|
-
"revision": "0.1.
|
|
42
|
-
"sha256": "sha256:
|
|
40
|
+
"requires_cli": ">=0.7.8 <0.8.0",
|
|
41
|
+
"revision": "0.1.18",
|
|
42
|
+
"sha256": "sha256:d32f0306f129d7bf76eb037fe239c84dd3c29c64b61600799d6e40320784bb10"
|
|
43
43
|
},
|
|
44
44
|
"model-deployment-management": {
|
|
45
45
|
"path": "skills/model-deployment-management",
|
|
46
|
-
"requires_cli": ">=0.7.
|
|
47
|
-
"revision": "0.1.
|
|
48
|
-
"sha256": "sha256:
|
|
46
|
+
"requires_cli": ">=0.7.8 <0.8.0",
|
|
47
|
+
"revision": "0.1.18",
|
|
48
|
+
"sha256": "sha256:b09f84d5270406d918cb5fe5818f84424ff41c1167c1b18f8d2b18f2e9b4a047"
|
|
49
49
|
},
|
|
50
50
|
"model-lifecycle-management": {
|
|
51
51
|
"path": "skills/model-lifecycle-management",
|
|
52
|
-
"requires_cli": ">=0.7.
|
|
53
|
-
"revision": "0.1.
|
|
54
|
-
"sha256": "sha256:
|
|
52
|
+
"requires_cli": ">=0.7.8 <0.8.0",
|
|
53
|
+
"revision": "0.1.18",
|
|
54
|
+
"sha256": "sha256:7c79a6393e302579e2aa48c6e20754aa992776d0f8936f897bb0feeafc84e508"
|
|
55
55
|
}
|
|
56
56
|
},
|
|
57
|
-
"source_commit": "
|
|
57
|
+
"source_commit": "ec29c26"
|
|
58
58
|
}
|
|
@@ -22,8 +22,15 @@ ml-platform get-dataset <dataset_id> <dataset_version> --project <project>
|
|
|
22
22
|
ml-platform resolve-dataset <dataset_id> <dataset_version> --project <project>
|
|
23
23
|
ml-platform build-registered-dataset <dataset_id> <dataset_version> \
|
|
24
24
|
--project <project> --wait
|
|
25
|
+
ml-platform register-model-artifact <artifact_id> --evaluation-id <evaluation_result_or_summary_id>
|
|
25
26
|
```
|
|
26
27
|
|
|
28
|
+
`resolve-dataset` 返回两个不同的身份:`manifest_hash` 是解析后的 DatasetArtifact
|
|
29
|
+
缓存/构建键,`registered_manifest_hash` 是注册 DatasetManifest 的 canonical 契约哈希。
|
|
30
|
+
构造 `FeatureRetrievalSpec.manifest.manifest_hash` 时必须使用后者;客户端不需要、也不应
|
|
31
|
+
自行复算 Python canonical hash。模型评估结果通过 `register-model-artifact` 交给服务端治理
|
|
32
|
+
校验后注册,不要绕过 CLI 直接调用 HTTP 注册接口。
|
|
33
|
+
|
|
27
34
|
`resolve-manifest` 和 `build-dataset <manifest.json>` 仍用于尚未注册的本地契约。Catalog
|
|
28
35
|
normalizer 保留并校验非默认 `project`;`apply --project` 与 Catalog 内项目不一致时拒绝执行。
|
|
29
36
|
|
|
@@ -69,9 +76,16 @@ ml-platform get-deployment-events <deployment-id> --limit 100 --offset 0
|
|
|
69
76
|
ml-platform predict-deployment <deployment-id> /absolute/path/to/request.json
|
|
70
77
|
```
|
|
71
78
|
|
|
79
|
+
部署文件可用 `inference_policy` 配置默认执行 horizon 和半开输出窗口。例如 15 分钟频率、
|
|
80
|
+
当天 00:00 cutoff、只返回次日全天时,配置 `horizon=2d` 和 `[1d,2d)`;模型必须具备
|
|
81
|
+
192 点输出能力,响应返回 96 点。请求可省略 `horizon` 和 `output_window` 使用部署默认值,
|
|
82
|
+
也可携带其中任意一项覆盖;覆盖值仍受模型长度、频率和窗口边界校验。
|
|
83
|
+
|
|
72
84
|
直接访问已知外部 Serving URL 时仍可使用 `predict-model`。Chronos-2 v2 的
|
|
73
85
|
`known_future` 协变量放在 inline 请求的 `inputs.future_covariates` 中;每个预测步一行,
|
|
74
|
-
行数必须等于模型的 `prediction_length
|
|
86
|
+
行数必须等于模型的 `prediction_length`。`feature_lookup` 模式不得传该字段;Serving 会从
|
|
87
|
+
部署绑定的 FeatureSet 在线读取完整未来 Feature 窗口,并只使用
|
|
88
|
+
`available_at <= cutoff_time` 的修订。下例为 15 分钟频率、预测 30 分钟;预测明天时
|
|
75
89
|
同样提供整天的所有未来步:
|
|
76
90
|
|
|
77
91
|
```json
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zhuoyuezs/ml-platform-business-client",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.8",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "@zhuoyuezs/ml-platform-business-client",
|
|
9
|
-
"version": "0.7.
|
|
9
|
+
"version": "0.7.8",
|
|
10
10
|
"license": "UNLICENSED",
|
|
11
11
|
"bin": {
|
|
12
12
|
"ml-platform": "src/cli.js"
|
|
@@ -34,7 +34,7 @@ const BUSINESS_COMMANDS = new Set([
|
|
|
34
34
|
"register-executable-package", "verify-executable-package", "publish-executable-package",
|
|
35
35
|
"validate-evaluation-run", "submit-evaluation", "get-evaluation-run", "get-evaluation-job", "retry-evaluation-job", "cancel-evaluation-job", "list-evaluation-attempts",
|
|
36
36
|
"get-evaluation-result", "get-evaluation-result-metrics", "get-evaluation-result-artifacts", "summarize-evaluation-run", "get-evaluation-summary",
|
|
37
|
-
"create-model-package", "get-model-package", "cancel-model-package", "validate-model-artifact",
|
|
37
|
+
"create-model-package", "get-model-package", "cancel-model-package", "validate-model-artifact", "register-model-artifact",
|
|
38
38
|
"list-deployment-targets", "validate-deployment", "create-deployment", "list-deployments",
|
|
39
39
|
"get-deployment", "wait-deployment", "reconcile-deployment", "approve-deployment",
|
|
40
40
|
"promote-deployment", "rollback-deployment", "suspend-deployment", "resume-deployment",
|
|
@@ -142,6 +142,7 @@ const COMMAND_USAGE = {
|
|
|
142
142
|
"get-model-package": "get-model-package PACKAGE_ID [--package-version VERSION]",
|
|
143
143
|
"cancel-model-package": "cancel-model-package PACKAGE_ID [--package-version VERSION]",
|
|
144
144
|
"validate-model-artifact": "validate-model-artifact ARTIFACT_ID",
|
|
145
|
+
"register-model-artifact": "register-model-artifact ARTIFACT_ID --evaluation-id EVALUATION_ID",
|
|
145
146
|
"list-deployment-targets": "list-deployment-targets",
|
|
146
147
|
"validate-deployment": "validate-deployment SPEC_JSON --evaluation-id ID",
|
|
147
148
|
"create-deployment": "create-deployment SPEC_JSON --evaluation-id ID",
|
|
@@ -431,9 +432,8 @@ async function runBusinessCli(argv) {
|
|
|
431
432
|
const out = take(rest, "--out");
|
|
432
433
|
if (out) { const target = resolvedPath(out); fs.mkdirSync(path.dirname(target), { recursive: true }); fs.writeFileSync(target, `${JSON.stringify(result, null, 2)}\n`); }
|
|
433
434
|
} else if (options.command === "resolve-dataset") {
|
|
434
|
-
const datasetId = positional(rest, "dataset id"); const datasetVersion = positional(rest, "dataset version"); const project = take(rest, "--project", "default");
|
|
435
|
-
|
|
436
|
-
result = await api.post("/datasets/resolve", manifest);
|
|
435
|
+
const datasetId = positional(rest, "dataset id"); const datasetVersion = positional(rest, "dataset version"); const project = take(rest, "--project", "default");
|
|
436
|
+
result = await client(options).post(`/datasets/${encodeURIComponent(project)}/${encodeURIComponent(datasetId)}/${encodeURIComponent(datasetVersion)}/resolve`);
|
|
437
437
|
const out = take(rest, "--out");
|
|
438
438
|
if (out) { const target = resolvedPath(out); fs.mkdirSync(path.dirname(target), { recursive: true }); fs.writeFileSync(target, `${JSON.stringify(result, null, 2)}\n`); }
|
|
439
439
|
} else if (options.command === "build-dataset") {
|
|
@@ -632,6 +632,11 @@ async function runBusinessCli(argv) {
|
|
|
632
632
|
const name = positional(rest, "package name"); const version = positional(rest, "package version"); const action = options.command.split("-")[0];
|
|
633
633
|
result = await client(options).post(`/executable-packages/${encodeURIComponent(name)}/${encodeURIComponent(version)}/${action}`);
|
|
634
634
|
} else if (options.command === "validate-model-artifact") result = await client(options).get(`/model-artifacts/${encodeURIComponent(positional(rest, "model artifact id"))}/validate`);
|
|
635
|
+
else if (options.command === "register-model-artifact") {
|
|
636
|
+
const artifactId = positional(rest, "model artifact id"); const evaluationId = take(rest, "--evaluation-id");
|
|
637
|
+
if (!evaluationId) throw new Error("--evaluation-id is required");
|
|
638
|
+
result = await client(options).post(`/models/${encodeURIComponent(artifactId)}/register`, { evaluation_id: evaluationId });
|
|
639
|
+
}
|
|
635
640
|
else if (/^(get|cancel)-model-package$/.test(options.command)) {
|
|
636
641
|
const packageId = positional(rest, "model package id"); const params = { package_version: take(rest, "--package-version") }; const endpoint = `/model-packages/${encodeURIComponent(packageId)}`;
|
|
637
642
|
result = options.command === "get-model-package" ? await client(options).get(endpoint, params) : await client(options).post(`${endpoint}/cancel`, undefined, params);
|
|
@@ -205,11 +205,14 @@ platform source checkout or a local Catalog directory for a matching JSON file.
|
|
|
205
205
|
target from a similar local filename.
|
|
206
206
|
4. Run `get-dataset <dataset_id> <dataset_version> --project <project>` and
|
|
207
207
|
inspect the returned registered contract.
|
|
208
|
-
5. Run `resolve-dataset` for a read-only dependency and
|
|
208
|
+
5. Run `resolve-dataset` for a read-only dependency and identity check. Use its
|
|
209
|
+
`registered_manifest_hash` for `FeatureRetrievalSpec.manifest.manifest_hash`;
|
|
210
|
+
use its `manifest_hash` only as the resolved DatasetArtifact/build key.
|
|
209
211
|
6. Submit exactly one `build-registered-dataset ... --wait` only after the user
|
|
210
212
|
authorizes that exact registered version.
|
|
211
|
-
7. Use the returned Job ID with `get-job`, then use the
|
|
212
|
-
with `get-dataset-artifact` after success.
|
|
213
|
+
7. Use the returned Job ID with `get-job`, then use the resolved `manifest_hash`
|
|
214
|
+
with `get-dataset-artifact` after success. Keep the separate
|
|
215
|
+
`registered_manifest_hash` for FeatureRetrievalSpec binding.
|
|
213
216
|
|
|
214
217
|
Local `resolve-manifest` and `build-dataset <file>` remain authoring tools for a
|
|
215
218
|
new or changed Catalog contract before it is registered. They are not required
|
|
@@ -419,6 +422,17 @@ replayable `as_of` manifest; when an online source override is active, `replay.s
|
|
|
419
422
|
must be false because the offline manifest cannot reproduce that source. Report
|
|
420
423
|
tolerated missing or gap-filled inputs as degraded freshness, not as a normal read.
|
|
421
424
|
|
|
425
|
+
Model-serving `feature_lookup` may additionally request declared known-future
|
|
426
|
+
Features from the same FeatureSet. Do not emulate that by passing model inputs
|
|
427
|
+
through this Skill. Author their Parameters with trustworthy availability
|
|
428
|
+
evidence: future event times are valid, but only revisions with
|
|
429
|
+
`available_at <= cutoff_time` may be used. `available_at` may therefore be
|
|
430
|
+
earlier than `event_time` for forecasts and schedules. The platform reads only
|
|
431
|
+
the requested known-future Features and their Parameter dependency closure;
|
|
432
|
+
unrelated historical Parameters in the same DatasetManifest do not need a
|
|
433
|
+
future-visibility contract. Every Parameter inside the requested closure still
|
|
434
|
+
fails closed when trustworthy availability is absent.
|
|
435
|
+
|
|
422
436
|
## Verify The Artifact
|
|
423
437
|
|
|
424
438
|
Treat Registry metadata inspection and downloaded-file inspection as separate
|
|
@@ -461,7 +475,7 @@ Require all of the following before reporting success:
|
|
|
461
475
|
windows tiling the fetch range, and any retries are accounted for;
|
|
462
476
|
- missing values and warnings are reported, not silently repaired.
|
|
463
477
|
|
|
464
|
-
The
|
|
478
|
+
The `manifest_hash` returned by `resolve-manifest` or `resolve-dataset` is the artifact key: it stays
|
|
465
479
|
the same after the build, so it is usable for cache reuse and polling before
|
|
466
480
|
submission. Distinguish the two lookup failures rather than treating both as "not
|
|
467
481
|
ready" — `422` with `invalid_artifact_key` means the key can never name an
|
|
@@ -480,7 +494,7 @@ new / unchanged assets by type
|
|
|
480
494
|
planned versus resolved dependency versions and any explicitly retained old versions
|
|
481
495
|
Operator package filename and SHA-256
|
|
482
496
|
FeatureSet and ordered feature count
|
|
483
|
-
dataset id, version, manifest hash, and Job id
|
|
497
|
+
dataset id, version, resolved manifest hash, registered manifest hash when applicable, and Job id
|
|
484
498
|
row and column counts
|
|
485
499
|
rowset candidate / policy-applied / eligible / ineligible counts when endpoint_policy is declared
|
|
486
500
|
validation status, warnings, and missing-data summary
|
|
@@ -220,7 +220,8 @@ DatasetManifest hash. The initial implementation is sequential, so keep
|
|
|
220
220
|
`--max-parallelism 1`. Completed partitions are checkpointed and resumed by
|
|
221
221
|
default; use `--no-resume` only to force a clean execution.
|
|
222
222
|
|
|
223
|
-
Record the returned `job_id`, `dataset_id`, and `manifest_hash
|
|
223
|
+
Record the returned `job_id`, `dataset_id`, and resolved `manifest_hash`; for a registered Dataset
|
|
224
|
+
also retain `registered_manifest_hash` for FeatureRetrievalSpec binding. If a separate wait is needed:
|
|
224
225
|
|
|
225
226
|
```bash
|
|
226
227
|
ml-platform --profile server wait-job <job_id>
|
|
@@ -266,7 +267,8 @@ ml-platform --profile server fetch-inference-context /tmp/inference-context.json
|
|
|
266
267
|
```
|
|
267
268
|
|
|
268
269
|
The `FeatureRetrievalSpec` must bind an existing inference-mode DatasetManifest
|
|
269
|
-
by project, dataset id, version, and
|
|
270
|
+
by project, dataset id, version, and the `registered_manifest_hash` returned by
|
|
271
|
+
`resolve-dataset`; its FeatureSet and contract
|
|
270
272
|
signature must match the resolved online contract. Context mode also fixes
|
|
271
273
|
`context_length`, `frequency`, `context_end`, `stride`, input-adapter hash, and
|
|
272
274
|
temporal-binding hash. Do not replace these immutable deployment bindings with
|
|
@@ -138,6 +138,12 @@ supported field.
|
|
|
138
138
|
当前严格 `as_of` 只接受 `exact` 或有合同支撑的 `upper_bound`;修改这些语义需要发布
|
|
139
139
|
新的 Parameter 业务版本。
|
|
140
140
|
|
|
141
|
+
未来预报、排程、日历等 known-future 数据允许 `available_at < event_time`。这不是时钟错误:
|
|
142
|
+
`event_time` 是未来目标时刻,`available_at` 是该修订何时已可读取。模型
|
|
143
|
+
`feature_lookup` 会读取 cutoff 后的未来事件窗口,但仍严格过滤
|
|
144
|
+
`available_at <= cutoff_time`。因此这类 Parameter 应优先使用能表达预报签发时间或计划发布
|
|
145
|
+
时间的 `source_field`,不能用事后实测值替代,也不能用调用方请求绕过 availability 合同。
|
|
146
|
+
|
|
141
147
|
An optional `rounding` section states the fixed-point precision the platform
|
|
142
148
|
enforces at the Parameter boundary:
|
|
143
149
|
|
|
@@ -28,6 +28,12 @@ deployment does not reach `READY` or an operation is rejected.
|
|
|
28
28
|
`ml-platform --profile server health` before control-plane work.
|
|
29
29
|
- Use only a `READY` ModelPackage image with an immutable `@sha256:` digest and
|
|
30
30
|
the package-bound FeatureRetrievalSpec and smoke request.
|
|
31
|
+
- When `DeploymentSpec.inference_policy` is configured, treat its horizon and
|
|
32
|
+
half-open output window as request defaults. Prediction requests may omit or
|
|
33
|
+
override `horizon` and `output_window`; every effective combination must fit
|
|
34
|
+
the model capacity and sampling grid. In `feature_lookup` mode, never send
|
|
35
|
+
`future_covariates`; the platform retrieves the complete known-future Feature
|
|
36
|
+
window visible at the cutoff. Inline mode still supplies those rows in inputs.
|
|
31
37
|
- Run `validate-deployment` before `create-deployment`. Validation is read-only
|
|
32
38
|
and does not authorize creation.
|
|
33
39
|
- Obtain explicit authorization for the exact deployment and operation before
|
|
@@ -17,6 +17,11 @@ load-bearing fields:
|
|
|
17
17
|
"image": "registry.example/model-serving@sha256:<64-hex>",
|
|
18
18
|
"target": {"type": "kubernetes", "namespace": "itsmp-model-serving"},
|
|
19
19
|
"feature_retrieval": {},
|
|
20
|
+
"inference_policy": {
|
|
21
|
+
"horizon": {"duration": "2d"},
|
|
22
|
+
"output_window": {"start_offset": "1d", "end_offset": "2d"},
|
|
23
|
+
"allow_request_override": true
|
|
24
|
+
},
|
|
20
25
|
"replicas": 1,
|
|
21
26
|
"resources": {},
|
|
22
27
|
"rollout": {"strategy": "canary", "traffic_percent": 10},
|
|
@@ -29,15 +34,37 @@ They must match the registered artifact lineage and the tested ModelPackage.
|
|
|
29
34
|
The server normalizes an omitted lookup test from the package during
|
|
30
35
|
validation and creation.
|
|
31
36
|
|
|
37
|
+
`inference_policy` is optional. When present, its horizon and offsets must be
|
|
38
|
+
whole-minute durations aligned to the model sampling frequency. The half-open
|
|
39
|
+
window `[cutoff+start_offset, cutoff+end_offset)` must be non-empty, end within
|
|
40
|
+
the configured horizon, and fit the model's maximum sequence output. A 15-minute
|
|
41
|
+
model using `horizon=2d` and `[1d,2d)` therefore needs at least 192 output steps
|
|
42
|
+
and returns 96 steps. This is a response projection, not extra model capacity.
|
|
43
|
+
|
|
44
|
+
The deployment values are defaults. Calls may omit `horizon` and
|
|
45
|
+
`output_window`, override either one, or override both. Serving validates the
|
|
46
|
+
effective values again; an output window must remain non-empty, aligned, inside
|
|
47
|
+
the effective horizon, and within model capacity. Set
|
|
48
|
+
`allow_request_override=false` only when the endpoint must reject non-equivalent
|
|
49
|
+
request values.
|
|
50
|
+
|
|
51
|
+
Known-future covariates still cover the model's complete prediction length,
|
|
52
|
+
including points outside a shorter returned window. In `feature_lookup` mode,
|
|
53
|
+
Serving requests those Feature columns from the deployment-bound FeatureSet;
|
|
54
|
+
the platform permits future event times only when `available_at <= cutoff_time`.
|
|
55
|
+
The prediction caller must not send top-level `future_covariates`. Inline mode
|
|
56
|
+
continues to carry them in `inputs.future_covariates`.
|
|
57
|
+
|
|
32
58
|
The first deployment starts at `staging`. A replacement for an existing
|
|
33
59
|
service/environment declares the active leaf in `previous_deployment_id`.
|
|
34
60
|
Production is reached only by staging to canary to production promotion.
|
|
35
61
|
|
|
36
62
|
## Revision State
|
|
37
63
|
|
|
38
|
-
`DeploymentSpec` is immutable.
|
|
39
|
-
|
|
40
|
-
|
|
64
|
+
`DeploymentSpec` is immutable. Its inference policy and full deployment contract
|
|
65
|
+
hash are copied into each immutable revision. Promotion, rollback, suspension,
|
|
66
|
+
resumption, and undeploy append revisions that retain that policy. Reconcile
|
|
67
|
+
writes mutable observed state separately.
|
|
41
68
|
|
|
42
69
|
`READY` requires all three current-revision conditions:
|
|
43
70
|
|
|
@@ -51,5 +78,5 @@ when rollout hostname metadata exists. `available=true` means the current
|
|
|
51
78
|
revision passed all READY gates.
|
|
52
79
|
|
|
53
80
|
Successful smoke verification is cached durably by revision, image digest,
|
|
54
|
-
contract hash, and frozen lookup-test
|
|
55
|
-
must run smoke again.
|
|
81
|
+
FeatureRetrieval contract hash, deployment contract hash, and frozen lookup-test
|
|
82
|
+
hash. A new revision or changed identity must run smoke again.
|
|
@@ -68,6 +68,39 @@ history; it is not equivalent to resume.
|
|
|
68
68
|
|
|
69
69
|
## Prediction
|
|
70
70
|
|
|
71
|
+
With a deployment-level inference policy, the request may use both deployment
|
|
72
|
+
defaults by omitting `horizon` and `output_window`:
|
|
73
|
+
|
|
74
|
+
```json
|
|
75
|
+
{
|
|
76
|
+
"input_mode": "feature_lookup",
|
|
77
|
+
"cutoff_time": "2026-09-14T00:00:00+08:00",
|
|
78
|
+
"entity": {}
|
|
79
|
+
}
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
To override the revision defaults, add either or both fields. This example keeps
|
|
83
|
+
the deployment horizon but returns its first day:
|
|
84
|
+
|
|
85
|
+
```json
|
|
86
|
+
{
|
|
87
|
+
"input_mode": "feature_lookup",
|
|
88
|
+
"cutoff_time": "2026-09-14T00:00:00+08:00",
|
|
89
|
+
"entity": {},
|
|
90
|
+
"output_window": {"start_offset": "0min", "end_offset": "1d"}
|
|
91
|
+
}
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
Do not send `future_covariates` in `feature_lookup` mode. Serving derives the
|
|
95
|
+
declared known-future columns and full model prediction length from the
|
|
96
|
+
ModelArtifact, then the platform retrieves visible future Feature revisions.
|
|
97
|
+
Only those Features and their Parameter dependency closure are read; unrelated
|
|
98
|
+
historical Parameters in the same inference Manifest are not evaluated as
|
|
99
|
+
future inputs. Requested future Parameters must still provide trustworthy
|
|
100
|
+
`available_at <= cutoff_time` evidence.
|
|
101
|
+
For inline mode only, supply one row per model prediction step in
|
|
102
|
+
`inputs.future_covariates`.
|
|
103
|
+
|
|
71
104
|
```bash
|
|
72
105
|
ml-platform --profile server predict-deployment <deployment-id> \
|
|
73
106
|
/absolute/path/request.json
|
|
@@ -16,6 +16,25 @@ Interpret conditions before considering a reconcile:
|
|
|
16
16
|
revision, or the endpoint is unavailable.
|
|
17
17
|
- `SmokePredictionPassed=false`: preserve the frozen package smoke request and
|
|
18
18
|
error. Do not replace it with a current-time request to force success.
|
|
19
|
+
- `request horizon cannot override deployment inference_policy` or
|
|
20
|
+
`request output_window cannot override deployment inference_policy`: the
|
|
21
|
+
revision has `allow_request_override=false`; use equivalent values or create
|
|
22
|
+
a reviewed revision whose policy permits the required request behavior.
|
|
23
|
+
- `inference_policy output window must end within the configured horizon`:
|
|
24
|
+
override `horizon` and `output_window` together, or keep the deployment
|
|
25
|
+
defaults. A shorter horizon cannot retain a later default window.
|
|
26
|
+
- `feature_lookup obtains known future covariates from online retrieval`: remove
|
|
27
|
+
top-level `future_covariates`. Verify the columns belong to the bound
|
|
28
|
+
FeatureSet and their Parameters provide trustworthy `available_at` values.
|
|
29
|
+
- `availability_not_supported` or `available_at_missing` during future lookup:
|
|
30
|
+
publish a corrected Parameter/Feature dependency version with a source-field
|
|
31
|
+
or justified upper-bound availability contract; do not substitute caller data.
|
|
32
|
+
- `inference_policy horizon exceeds model maximum prediction length`: retrain
|
|
33
|
+
or select a model artifact with enough sequence steps. For `[1d,2d)` at
|
|
34
|
+
15-minute frequency, the model needs 192 steps, not only the returned 96.
|
|
35
|
+
- An unexpected output point count usually indicates frequency/target-time
|
|
36
|
+
drift or an incomplete runtime trajectory. Inspect `output_window.boundary`,
|
|
37
|
+
UTC `start_time`/`end_time`, `point_count`, and the model sampling interval.
|
|
19
38
|
- `SUPERSEDED`: operate on the active deployment leaf.
|
|
20
39
|
- `SUSPENDED`: resume only with explicit authorization and a reason.
|
|
21
40
|
- `UNDEPLOYED`: create a governed deployment or rollback as supported; resume
|
|
@@ -32,6 +32,7 @@ to discover fields. Preserve release/error evidence when deployment differs.
|
|
|
32
32
|
- Before submission, show the exact JSON path, immutable identities, expected workload, and target API. Obtain explicit authorization. Retry and cancel require separate authorization for the exact Job.
|
|
33
33
|
- Never use `latest` image tags. During development TrainerDefinition stays at `v1`; rebinding it follows the reviewed release procedure and requires confirming no active Job references the old definition.
|
|
34
34
|
- A succeeded Job is insufficient evidence. Training requires a valid ModelArtifact and signature; evaluation requires immutable Result/Summary evidence and coverage; packaging requires `READY`, an immutable image digest, manifest, and passing test report.
|
|
35
|
+
- Register a ModelArtifact through `register-model-artifact` only after a platform-generated PASS evaluation/result or summary has complete evidence; do not bypass the CLI with a direct registration HTTP request.
|
|
35
36
|
- Do not register caller-computed evaluation results. Workers produce predictions, metrics, decisions, and summaries from frozen DatasetArtifact rowsets.
|
|
36
37
|
- Keep credentials, registry secrets, Kubernetes details, and model binaries out of request JSON and reports.
|
|
37
38
|
|
|
@@ -31,6 +31,17 @@ runtime. `feature_lookup` still requires artifact lineage
|
|
|
31
31
|
signature. Do not infer either capability from training success.
|
|
32
32
|
Omit rather than use an empty list to request default inline behavior.
|
|
33
33
|
|
|
34
|
+
Register a validated artifact only after a platform-generated evaluation result or
|
|
35
|
+
summary is `PASS`, `COMPLETE`, and belongs to the same artifact:
|
|
36
|
+
|
|
37
|
+
```bash
|
|
38
|
+
ml-platform --profile server register-model-artifact <artifact-id> \
|
|
39
|
+
--evaluation-id <evaluation-result-or-summary-id>
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
The API performs the complete registration gate. Do not replace this command with
|
|
43
|
+
a direct `POST /models/{artifact_id}/register` request.
|
|
44
|
+
|
|
34
45
|
For `feature_lookup`, the package request must bind both the exact retrieval
|
|
35
46
|
contract and a sanitized real lookup test. They are immutable package identity,
|
|
36
47
|
not namespace Secret/ConfigMap settings:
|
|
@@ -74,6 +85,11 @@ not namespace Secret/ConfigMap settings:
|
|
|
74
85
|
The inference DatasetManifest must exist with the supplied hash and use
|
|
75
86
|
`mode=inference`. Its FeatureSet, stable contract signature, adapter/temporal
|
|
76
87
|
hashes, entity keys, and row/context parameters must match the ModelArtifact.
|
|
88
|
+
The package-bound signature remains the Serving binding identity. Online fetch
|
|
89
|
+
responses may also report an independently resolved execution signature for
|
|
90
|
+
diagnostics; database principals are excluded from new stable signatures, so
|
|
91
|
+
credential rotation or distinct read-only workload accounts do not alter the
|
|
92
|
+
model data contract.
|
|
77
93
|
The test cutoff must include a timezone. A legacy feature-lookup package missing
|
|
78
94
|
either package-bound field remains readable but cannot be rerun or deployed;
|
|
79
95
|
create a new package version.
|
|
@@ -169,10 +169,12 @@ and `data.labels` must use that same output-label order:
|
|
|
169
169
|
Every target and covariate must be a numeric Feature. `past_only` is available
|
|
170
170
|
only through the cutoff. `known_future` must be represented in training by the
|
|
171
171
|
forecast or schedule available at that historic cutoff, never by a later actual
|
|
172
|
-
observation. At runtime callers provide one finite numeric value for
|
|
173
|
-
`known_future` column and every prediction step.
|
|
174
|
-
|
|
175
|
-
|
|
172
|
+
observation. At runtime inline callers provide one finite numeric value for
|
|
173
|
+
every `known_future` column and every model prediction step. In
|
|
174
|
+
`feature_lookup` mode, callers provide none: Serving requests the declared
|
|
175
|
+
Feature columns from the deployment-bound FeatureSet, and the platform selects
|
|
176
|
+
future event rows whose revisions satisfy `available_at <= cutoff_time`.
|
|
177
|
+
Retain forecast issue/availability lineage in the upstream Feature data.
|
|
176
178
|
|
|
177
179
|
## TrainingJobRequest and identity propagation
|
|
178
180
|
|
|
@@ -243,6 +245,16 @@ aligned horizons up to that maximum and returns the corresponding trajectory
|
|
|
243
245
|
prefix; it rejects unaligned or longer horizons. A one-step model remains a
|
|
244
246
|
scalar response.
|
|
245
247
|
|
|
248
|
+
When a deployment must use cutoff at today's 00:00 and return only tomorrow's
|
|
249
|
+
00:00 through the following 00:00, train for the complete interval from cutoff
|
|
250
|
+
to the output end. At 15-minute frequency, deployment horizon `2d` means
|
|
251
|
+
`prediction_length=192`; output window `[1d,2d)` then projects the second 96
|
|
252
|
+
points. Chronos-2 known-future covariates must still contain all 192 rows. In
|
|
253
|
+
`feature_lookup` mode the platform retrieves those rows even when the request
|
|
254
|
+
overrides the returned window; inline requests must still carry them. A
|
|
255
|
+
150-step artifact cannot serve this contract and must be retrained rather than
|
|
256
|
+
having its response window stretched at deployment time.
|
|
257
|
+
|
|
246
258
|
`gap_policy=fill` requires `padding_policy=edge` or `zero`; non-fill requires
|
|
247
259
|
`padding_policy=none`. Filling changes model inputs and needs an intended
|
|
248
260
|
business policy. `skip` and padding are not automatic fixes for rejected grids.
|
|
@@ -93,15 +93,18 @@ the ordered target/output-label pairs; see [training-contracts.md](training-cont
|
|
|
93
93
|
for the complete JSON fragment.
|
|
94
94
|
|
|
95
95
|
Training records must contain the forecast that was available at each historic
|
|
96
|
-
cutoff, not actual weather observed later.
|
|
97
|
-
|
|
96
|
+
cutoff, not actual weather observed later. Invoke the Serving runtime, not
|
|
97
|
+
`fetch-inference-data`:
|
|
98
98
|
|
|
99
99
|
```bash
|
|
100
100
|
ml-platform predict-model /absolute/path/to/inference-request.json \
|
|
101
101
|
--serving-url https://storage-forecast.example
|
|
102
102
|
```
|
|
103
103
|
|
|
104
|
-
For `input_mode=inline`, put
|
|
105
|
-
`
|
|
106
|
-
|
|
107
|
-
|
|
104
|
+
For `input_mode=inline`, put one row per trained prediction step in
|
|
105
|
+
`inputs.future_covariates`; names must exactly match the adapter's
|
|
106
|
+
`known_future` columns. For `input_mode=feature_lookup`, do not send future
|
|
107
|
+
rows. Serving asks the platform for the declared columns and full
|
|
108
|
+
`prediction_length`; the Features must belong to the deployment-bound
|
|
109
|
+
FeatureSet, and their source revisions must satisfy
|
|
110
|
+
`available_at <= cutoff_time` even though their event times are later.
|