@zhuoyuezs/ml-platform 0.2.2-alpha.2 → 0.2.2-alpha.3

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 CHANGED
@@ -2,8 +2,8 @@
2
2
  "files": [
3
3
  {
4
4
  "path": "runtime/business-client/README.md",
5
- "sha256": "sha256:7e84fad64f8ee6c7aae467b7947123f3a490b799ec5ffa24fd008e0fa37b133e",
6
- "size_bytes": 7898
5
+ "sha256": "sha256:30d921fabf5bc0339eda60169a1865f6007807b1d9a8d3e646b42f68cd563240",
6
+ "size_bytes": 8125
7
7
  },
8
8
  {
9
9
  "path": "runtime/business-client/package-lock.json",
@@ -142,8 +142,8 @@
142
142
  },
143
143
  {
144
144
  "path": "skills/model-lifecycle-management/SKILL.md",
145
- "sha256": "sha256:06307c24ee24ef28978183c9c83a5542fa5b21ec9912e717e84bcede80434cd8",
146
- "size_bytes": 4049
145
+ "sha256": "sha256:4ea40815d73b3a470b2572874dcad63640cbdd53d3c10293d7a5ce8621a13b96",
146
+ "size_bytes": 4272
147
147
  },
148
148
  {
149
149
  "path": "skills/model-lifecycle-management/agents/openai.yaml",
@@ -152,8 +152,8 @@
152
152
  },
153
153
  {
154
154
  "path": "skills/model-lifecycle-management/references/discovery.md",
155
- "sha256": "sha256:b2560e3c79fd309ce15a45d6bc3c30f2206d71f88197403cfa432580f9e4c50e",
156
- "size_bytes": 5075
155
+ "sha256": "sha256:184472a79fb217dd8c74dffab20e75285b0c8f69207dc593ae3099b8a2b6d6d5",
156
+ "size_bytes": 5381
157
157
  },
158
158
  {
159
159
  "path": "skills/model-lifecycle-management/references/evaluation.md",
@@ -167,13 +167,13 @@
167
167
  },
168
168
  {
169
169
  "path": "skills/model-lifecycle-management/references/training-contracts.md",
170
- "sha256": "sha256:06af04539ab8d69467680e4a662595719a40f82e23fac19b9d4460be189201c5",
171
- "size_bytes": 12887
170
+ "sha256": "sha256:4cecf5f90464640d063ca721fded1c27b46bb79daa0f67c78a8fb6b0e3e60b3b",
171
+ "size_bytes": 14747
172
172
  },
173
173
  {
174
174
  "path": "skills/model-lifecycle-management/references/training.md",
175
- "sha256": "sha256:f754b0a7717914b2ac028feac5b1b9ef59ff673e7ffe722f37f5ae3d5e6e0bfd",
176
- "size_bytes": 5686
175
+ "sha256": "sha256:97de7894da24a07b4146d6de5e00a0cf17166654fb219a145f35adff5e8a7f99",
176
+ "size_bytes": 7980
177
177
  }
178
178
  ],
179
179
  "schema_version": "data_platform.ml_platform_checksums/v1"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zhuoyuezs/ml-platform",
3
- "version": "0.2.2-alpha.2",
3
+ "version": "0.2.2-alpha.3",
4
4
  "description": "ML 数据平台 business CLI 与 Agent Skills 管理工具",
5
5
  "bin": {
6
6
  "ml-platform": "scripts/main.js"
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:b439dd6ae614439aca3e812f6e2127f743a7efaf4ffa090886fdebed55c9824d",
16
+ "sha256": "sha256:ceb3fdabf57044a5bf8d54baf04ab10327cb896e4eaff3897c18e08e96e5336a",
17
17
  "version": "0.8.2"
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.2-alpha.2",
28
+ "release_version": "0.2.2-alpha.3",
29
29
  "runtime_requirements": {
30
30
  "node": ">=18",
31
31
  "os": [
@@ -38,21 +38,21 @@
38
38
  "feature-management": {
39
39
  "path": "skills/feature-management",
40
40
  "requires_cli": ">=0.8.2 <0.9.0",
41
- "revision": "0.2.2-alpha.2",
41
+ "revision": "0.2.2-alpha.3",
42
42
  "sha256": "sha256:d32f0306f129d7bf76eb037fe239c84dd3c29c64b61600799d6e40320784bb10"
43
43
  },
44
44
  "model-deployment-management": {
45
45
  "path": "skills/model-deployment-management",
46
46
  "requires_cli": ">=0.8.2 <0.9.0",
47
- "revision": "0.2.2-alpha.2",
47
+ "revision": "0.2.2-alpha.3",
48
48
  "sha256": "sha256:e7d87c272a0dcc028ea628d5e36f5b7e52ed27cb9c1bc17ea76527478e28b46d"
49
49
  },
50
50
  "model-lifecycle-management": {
51
51
  "path": "skills/model-lifecycle-management",
52
52
  "requires_cli": ">=0.8.2 <0.9.0",
53
- "revision": "0.2.2-alpha.2",
54
- "sha256": "sha256:f841821d2ca90198ad07236953a864393cb1e8db51cb349f0ded85190ebc1c10"
53
+ "revision": "0.2.2-alpha.3",
54
+ "sha256": "sha256:ec6ebb2587fd7acd024def75a8c0e9cd94b6cdd8ee6df439609291b496751b91"
55
55
  }
56
56
  },
57
- "source_commit": "378de56c68d4ea525083170cd500eeef01e88bd1"
57
+ "source_commit": "e713953153439c28680b60b56f57d3b9679ff49a"
58
58
  }
@@ -147,6 +147,9 @@ resolve the same contracts as submission without registering or scheduling
147
147
  workloads. Read `submitted=false` and `unchecked`: successful preflight does not
148
148
  verify image pulls, cluster resources or runtime execution. Complete request
149
149
  examples and identity propagation are in the bundled model lifecycle Skill.
150
+ Training Run and Job validation also return `effective_trainer_parameters`;
151
+ for Job preflight it must match `job_spec.trainer_parameters` and represents
152
+ the complete mapping delivered to the Worker after defaults are resolved.
150
153
 
151
154
  Maintainers can export the current API, including uncommitted schema changes,
152
155
  with `uv run python scripts/generate_openapi_schema.py --working-tree` from the
@@ -24,10 +24,12 @@ Before training a model that will be evaluated, also read
24
24
  [references/evaluation.md](references/evaluation.md). Check the final dataset
25
25
  schema, training split binding and evaluation runtime before submission.
26
26
  OpenAPI free-form dictionaries are not complete nested contracts: use the
27
- examples in these references and same-release validation, not successive 422s
28
- to discover fields. Preserve release/error evidence when deployment differs.
27
+ SystemModel `parameter_schema`, examples in these references and same-release
28
+ validation, not successive 422s to discover fields. Preserve release/error
29
+ evidence when deployment differs.
29
30
 
30
31
  - Establish exact immutable inputs, canonical SystemModel `v1`, runtime-release image digest, model inputs/targets, resources, evaluation policy, and package destination from authoritative contracts. Do not infer them from model names.
32
+ - For Chronos-2, inspect the typed `lora_config` schema before authoring a Run and preserve `effective_trainer_parameters` from validation. Do not infer PEFT keys or rely on Worker defaults.
31
33
  - Validate, register, submit, retry, cancel, and package creation are separate actions. Read-only discovery and validation do not authorize mutation or workload submission.
32
34
  - 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
35
  - Never use `latest` image tags. During development the canonical SystemModel stays at `v1`; image changes are reviewed Runtime Release updates and require confirming no active Job depends on the previous binding.
@@ -68,6 +68,10 @@ artifact eligibility, selected runtime, input modes and immutable-version confli
68
68
  checks used by creation. Both return `status=valid`, the proposed `job_spec` or
69
69
  `package`, `submitted=false` and `unchecked` execution checks. They do not register
70
70
  Jobs/packages or invoke schedulers. Artifact reads can populate local caches.
71
+ For training, confirm that top-level `effective_trainer_parameters` exactly
72
+ matches `job_spec.trainer_parameters`; this is the complete parameter mapping
73
+ the Worker receives after platform defaults and reproducibility controls are
74
+ resolved.
71
75
 
72
76
  A valid preview does not prove image availability, cluster capacity, credentials,
73
77
  framework imports, training success or packaging test success. Read `unchecked`
@@ -81,9 +85,11 @@ Training Run `task`, `data`, `data.artifact`, `features.feature_set`, `splits`,
81
85
  `temporal` and `trainer` are explicit objects in OpenAPI. Evaluation artifact,
82
86
  config references, members and execution, plus ModelPackage requests, are also
83
87
  structured. Unknown keys return 422 with `detail[].loc` identifying the field.
84
- Keep algorithm-specific `trainer.parameters` and documented plugin configuration
85
- maps extensible; validate them against the SystemModel parameter schema. Do not treat
86
- all remaining `additionalProperties` as a platform schema defect.
88
+ Keep algorithm-specific `trainer.parameters` governed by the SystemModel
89
+ parameter schema. A typed nested contract such as Chronos-2 `lora_config`
90
+ rejects unknown fields; a SystemModel that intentionally advertises
91
+ `additionalProperties` remains extensible. Do not infer one policy from the
92
+ other.
87
93
 
88
94
  These HTTP checks preserve accepted values and do not rewrite historical stored
89
95
  contracts or hashes. Legacy records remain readable. A previously ignored typo
@@ -68,6 +68,59 @@ Non-temporal regression can omit it. Do not change task kind just to evade check
68
68
  `series_keys` must identify entity-key columns when multiple series coexist;
69
69
  an empty list treats the entire artifact as one series.
70
70
 
71
+ ## Chronos-2 LoRA parameters
72
+
73
+ Chronos-2 fine-tuning settings belong under `trainer.parameters`; they are
74
+ frozen with the immutable TrainingRun. This fragment overrides rank and keeps
75
+ the other released LoRA defaults explicit:
76
+
77
+ ```json
78
+ {
79
+ "trainer": {
80
+ "project": "default",
81
+ "name": "chronos2_forecaster",
82
+ "version": "v1",
83
+ "parameters": {
84
+ "finetune_mode": "lora",
85
+ "num_steps": 1000,
86
+ "batch_size": 16,
87
+ "learning_rate": 0.00001,
88
+ "gradient_accumulation_steps": 2,
89
+ "logging_steps": 10,
90
+ "lora_config": {
91
+ "r": 16,
92
+ "lora_alpha": 16,
93
+ "lora_dropout": 0.0,
94
+ "target_modules": [
95
+ "self_attention.q",
96
+ "self_attention.v",
97
+ "self_attention.k",
98
+ "self_attention.o",
99
+ "output_patch_embedding.output_layer"
100
+ ]
101
+ }
102
+ }
103
+ },
104
+ "reproducibility": {"seed": 42, "deterministic": true}
105
+ }
106
+ ```
107
+
108
+ Always obtain the accepted fields, target-module enum and defaults from
109
+ `get-system-model chronos2_forecaster v1`; unknown nested LoRA keys are
110
+ rejected before scheduling. `r >= 1`, `lora_alpha >= 1`, and
111
+ `0 <= lora_dropout < 1`. `finetune_mode=full` rejects `lora_config`.
112
+
113
+ The platform materializes omitted values before Job creation. Run validation
114
+ returns `effective_trainer_parameters`; Job validation returns the same object
115
+ both at the top level and in `job_spec.trainer_parameters`. Review that object
116
+ instead of assuming library defaults. Changing any Trainer parameter requires
117
+ a new TrainingRun identity; Job retry cannot alter it.
118
+
119
+ Do not put `prediction_length` in this mapping. It is derived from the temporal
120
+ horizon and frequency. Trainer `context_length` defaults to the sequence input
121
+ adapter's context length, and `min_past` defaults to prediction length. GPU,
122
+ CPU, memory and deadline remain TrainingJob execution fields.
123
+
71
124
  ## Direct tabular forecasting with known-future features
72
125
 
73
126
  Tree and other matrix-based models can forecast a variable target grid without
@@ -85,6 +85,70 @@ ml-platform --profile server cancel-training-job <job-id>
85
85
 
86
86
  Retry and cancellation require exact-Job authorization. Never change a run contract while retrying; create a new immutable run when semantic inputs change.
87
87
 
88
+ ## Chronos-2 fine-tuning parameters
89
+
90
+ Configure Chronos-2 algorithm parameters only under
91
+ `trainer.parameters` in the TrainingRun. Configure execution device and GPU
92
+ resources later under TrainingJob `execution`; do not mix the two contracts.
93
+ The Run is immutable after registration, so changing rank, learning rate,
94
+ batch size or fine-tuning mode requires a new `run_id`. Retrying an existing
95
+ Job must retain the original parameters.
96
+
97
+ Inspect the same-release contract first:
98
+
99
+ ```bash
100
+ ml-platform --profile server get-system-model \
101
+ chronos2_forecaster v1 --project default
102
+ ```
103
+
104
+ The returned `parameter_schema` is authoritative. A typical explicit LoRA
105
+ fragment is:
106
+
107
+ ```json
108
+ {
109
+ "trainer": {
110
+ "project": "default",
111
+ "name": "chronos2_forecaster",
112
+ "version": "v1",
113
+ "parameters": {
114
+ "finetune_mode": "lora",
115
+ "num_steps": 1000,
116
+ "batch_size": 16,
117
+ "learning_rate": 0.00001,
118
+ "gradient_accumulation_steps": 2,
119
+ "logging_steps": 10,
120
+ "lora_config": {
121
+ "r": 16,
122
+ "lora_alpha": 32,
123
+ "lora_dropout": 0.05
124
+ }
125
+ }
126
+ },
127
+ "reproducibility": {"seed": 42, "deterministic": true}
128
+ }
129
+ ```
130
+
131
+ `r` and `lora_alpha` must be positive integers; `lora_dropout` is in `[0, 1)`.
132
+ Only target modules enumerated by the SystemModel schema are accepted. LoRA is
133
+ the default mode; full fine-tuning rejects `lora_config`. Omitted LoRA settings
134
+ resolve to `r=8`, `lora_alpha=16`, `lora_dropout=0` and the released Chronos-2
135
+ target-module list. Omitted learning rate resolves to `1e-5` for LoRA and
136
+ `1e-6` for full fine-tuning. `min_past` defaults to the derived prediction
137
+ length, while trainer `context_length` defaults to
138
+ `input_adapter.context_length`.
139
+
140
+ Set random seed and determinism only through top-level `reproducibility`.
141
+ Compatibility fields with the same names may appear in the parameter schema,
142
+ but the top-level values are authoritative. Do not configure
143
+ `prediction_length`; the platform derives it as `temporal.horizon /
144
+ temporal.frequency`.
145
+
146
+ After `validate-training-run`, inspect and preserve
147
+ `effective_trainer_parameters`. After Run registration, call
148
+ `validate-training-job` and confirm that its top-level
149
+ `effective_trainer_parameters` exactly equals
150
+ `job_spec.trainer_parameters` before requesting submission authorization.
151
+
88
152
  ## Chronos-2 future-known inputs
89
153
 
90
154
  For storage forecasting, tomorrow's weather forecast and peak/valley schedule