@byteplus/ark-cli-darwin-x64 0.0.0-stage → 1.0.46-prerelease.46bd0d6dcc58

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (148) hide show
  1. package/LICENSE +201 -0
  2. package/bin/arkcli-darwin-amd64 +4 -0
  3. package/manifest.json +43 -0
  4. package/package.json +20 -4
  5. package/skills/arkcli-agent/SKILL.md +152 -0
  6. package/skills/arkcli-agent/references/agent.md +398 -0
  7. package/skills/arkcli-agent/references/byok.md +65 -0
  8. package/skills/arkcli-agent/references/context-management.md +42 -0
  9. package/skills/arkcli-agent/references/debug-export.md +26 -0
  10. package/skills/arkcli-agent/references/evals.md +178 -0
  11. package/skills/arkcli-agent/references/events-chat.md +148 -0
  12. package/skills/arkcli-agent/references/interfaces-gaps.md +52 -0
  13. package/skills/arkcli-agent/references/mcp-vault.md +111 -0
  14. package/skills/arkcli-agent/references/model-config.md +46 -0
  15. package/skills/arkcli-agent/references/self-hosted.md +47 -0
  16. package/skills/arkcli-agent/references/session-files.md +149 -0
  17. package/skills/arkcli-agent/references/session-upgrade.md +61 -0
  18. package/skills/arkcli-agent/references/skills.md +87 -0
  19. package/skills/arkcli-agent/references/todo-write.md +31 -0
  20. package/skills/arkcli-api-explorer/SKILL.md +188 -0
  21. package/skills/arkcli-api-explorer/references/arkcli-api.md +180 -0
  22. package/skills/arkcli-api-explorer/references/evals.md +176 -0
  23. package/skills/arkcli-auth/SKILL.md +184 -0
  24. package/skills/arkcli-auth/references/arkcli-auth-login.md +92 -0
  25. package/skills/arkcli-auth/references/arkcli-auth-status.md +109 -0
  26. package/skills/arkcli-auth/references/arkcli-auth-whoami.md +56 -0
  27. package/skills/arkcli-auth/references/auth-modes.md +78 -0
  28. package/skills/arkcli-auth/references/evals.md +82 -0
  29. package/skills/arkcli-auth/references/identity-resolution.md +33 -0
  30. package/skills/arkcli-auth/references/realname-gate.md +69 -0
  31. package/skills/arkcli-billing/SKILL.md +122 -0
  32. package/skills/arkcli-billing/references/arkcli-billing-list.md +259 -0
  33. package/skills/arkcli-billing/references/evals.md +107 -0
  34. package/skills/arkcli-chat/SKILL.md +114 -0
  35. package/skills/arkcli-chat/references/arkcli-chat.md +283 -0
  36. package/skills/arkcli-chat/references/caching-thinking.md +124 -0
  37. package/skills/arkcli-chat/references/chat-meta.md +77 -0
  38. package/skills/arkcli-chat/references/evals.md +34 -0
  39. package/skills/arkcli-chat/references/stream-events.md +124 -0
  40. package/skills/arkcli-chat/references/text-format.md +167 -0
  41. package/skills/arkcli-chat/references/tools.md +119 -0
  42. package/skills/arkcli-config/SKILL.md +197 -0
  43. package/skills/arkcli-config/references/arkcli-config-init.md +89 -0
  44. package/skills/arkcli-config/references/arkcli-config-profile.md +106 -0
  45. package/skills/arkcli-config/references/evals.md +154 -0
  46. package/skills/arkcli-connect/SKILL.md +196 -0
  47. package/skills/arkcli-connect/references/arkcli-connect.md +165 -0
  48. package/skills/arkcli-connect/references/evals.md +231 -0
  49. package/skills/arkcli-custommodel/SKILL.md +167 -0
  50. package/skills/arkcli-custommodel/references/arkcli-custommodel-available-quantizations.md +29 -0
  51. package/skills/arkcli-custommodel/references/arkcli-custommodel-delete.md +37 -0
  52. package/skills/arkcli-custommodel/references/arkcli-custommodel-get.md +45 -0
  53. package/skills/arkcli-custommodel/references/arkcli-custommodel-list.md +65 -0
  54. package/skills/arkcli-custommodel/references/arkcli-custommodel-quantize.md +59 -0
  55. package/skills/arkcli-custommodel/references/arkcli-custommodel-update.md +47 -0
  56. package/skills/arkcli-custommodel/references/arkcli-custommodel-upload.md +64 -0
  57. package/skills/arkcli-custommodel/references/evals.md +59 -0
  58. package/skills/arkcli-datasets/SKILL.md +39 -0
  59. package/skills/arkcli-datasets/references/commands.md +83 -0
  60. package/skills/arkcli-datasets/references/evals.md +31 -0
  61. package/skills/arkcli-deploy/SKILL.md +89 -0
  62. package/skills/arkcli-deploy/references/arkcli-deploy.md +141 -0
  63. package/skills/arkcli-deploy/references/evals.md +80 -0
  64. package/skills/arkcli-docs/SKILL.md +453 -0
  65. package/skills/arkcli-docs/references/commands.md +283 -0
  66. package/skills/arkcli-docs/references/evals.md +201 -0
  67. package/skills/arkcli-docs/references/failure-modes.md +85 -0
  68. package/skills/arkcli-doctor/CONTRIBUTING.md +54 -0
  69. package/skills/arkcli-doctor/SKILL.md +367 -0
  70. package/skills/arkcli-doctor/references/error-codes.md +162 -0
  71. package/skills/arkcli-doctor/references/evals.md +385 -0
  72. package/skills/arkcli-doctor/references/scope-account.md +94 -0
  73. package/skills/arkcli-doctor/references/scope-cli.md +88 -0
  74. package/skills/arkcli-doctor/references/scope-infer-endpoint.md +132 -0
  75. package/skills/arkcli-doctor/references/scope-metrics.md +157 -0
  76. package/skills/arkcli-doctor/references/scope-model.md +130 -0
  77. package/skills/arkcli-doctor/references/verify-origin.md +102 -0
  78. package/skills/arkcli-gen/SKILL.md +188 -0
  79. package/skills/arkcli-gen/references/arkcli-gen.md +230 -0
  80. package/skills/arkcli-gen/references/gen-meta.md +154 -0
  81. package/skills/arkcli-gen/references/image-stream.md +105 -0
  82. package/skills/arkcli-helper/SKILL.md +200 -0
  83. package/skills/arkcli-helper/references/arkcli-helper.md +298 -0
  84. package/skills/arkcli-helper/references/evals.md +334 -0
  85. package/skills/arkcli-iam/SKILL.md +46 -0
  86. package/skills/arkcli-iam/references/arkcli-iam-userid.md +54 -0
  87. package/skills/arkcli-iam/references/evals.md +24 -0
  88. package/skills/arkcli-infer-endpoint/SKILL.md +82 -0
  89. package/skills/arkcli-infer-endpoint/references/arkcli-infer-endpoint-capability-get.md +50 -0
  90. package/skills/arkcli-infer-endpoint/references/arkcli-infer-endpoint-create.md +121 -0
  91. package/skills/arkcli-infer-endpoint/references/arkcli-infer-endpoint-delete.md +71 -0
  92. package/skills/arkcli-infer-endpoint/references/arkcli-infer-endpoint-get.md +43 -0
  93. package/skills/arkcli-infer-endpoint/references/arkcli-infer-endpoint-list.md +82 -0
  94. package/skills/arkcli-infer-endpoint/references/arkcli-infer-endpoint-start.md +36 -0
  95. package/skills/arkcli-infer-endpoint/references/arkcli-infer-endpoint-stop.md +36 -0
  96. package/skills/arkcli-infer-endpoint/references/arkcli-infer-endpoint-update.md +78 -0
  97. package/skills/arkcli-infer-endpoint/references/evals.md +24 -0
  98. package/skills/arkcli-models/SKILL.md +305 -0
  99. package/skills/arkcli-models/references/arkcli-models-activate.md +103 -0
  100. package/skills/arkcli-models/references/arkcli-models-get.md +94 -0
  101. package/skills/arkcli-models/references/arkcli-models-list.md +71 -0
  102. package/skills/arkcli-models/references/arkcli-models-scenario-table.md +75 -0
  103. package/skills/arkcli-models/references/arkcli-models-search.md +170 -0
  104. package/skills/arkcli-models/references/evals.md +57 -0
  105. package/skills/arkcli-onboard/SKILL.md +169 -0
  106. package/skills/arkcli-onboard/references/evals.md +156 -0
  107. package/skills/arkcli-plans/SKILL.md +135 -0
  108. package/skills/arkcli-plans/references/arkcli-plans-buy.md +125 -0
  109. package/skills/arkcli-plans/references/arkcli-plans-get.md +84 -0
  110. package/skills/arkcli-plans/references/arkcli-plans-model-apply.md +58 -0
  111. package/skills/arkcli-plans/references/arkcli-plans-model-list.md +114 -0
  112. package/skills/arkcli-plans/references/arkcli-plans-renew.md +125 -0
  113. package/skills/arkcli-plans/references/arkcli-plans-team-rotate-apikey.md +61 -0
  114. package/skills/arkcli-plans/references/arkcli-plans-team-seat-assign.md +147 -0
  115. package/skills/arkcli-plans/references/arkcli-plans-team-seat-list.md +100 -0
  116. package/skills/arkcli-plans/references/evals.md +178 -0
  117. package/skills/arkcli-pricing/SKILL.md +120 -0
  118. package/skills/arkcli-pricing/references/arkcli-pricing-models.md +258 -0
  119. package/skills/arkcli-pricing/references/arkcli-pricing-plans.md +139 -0
  120. package/skills/arkcli-profile/SKILL.md +168 -0
  121. package/skills/arkcli-profile/references/arkcli-profile-create.md +92 -0
  122. package/skills/arkcli-profile/references/arkcli-profile-keys.md +135 -0
  123. package/skills/arkcli-profile/references/arkcli-profile-set-default.md +81 -0
  124. package/skills/arkcli-profile/references/evals.md +93 -0
  125. package/skills/arkcli-resources/SKILL.md +112 -0
  126. package/skills/arkcli-resources/references/arkcli-resources-list.md +105 -0
  127. package/skills/arkcli-shared/SKILL.md +209 -0
  128. package/skills/arkcli-shared/references/global-flags.md +77 -0
  129. package/skills/arkcli-shared/references/profile-defaults.md +35 -0
  130. package/skills/arkcli-shared/references/troubleshooting.md +49 -0
  131. package/skills/arkcli-shared/references/update.md +117 -0
  132. package/skills/arkcli-train-finetune/SKILL.md +109 -0
  133. package/skills/arkcli-train-finetune/references/create.md +274 -0
  134. package/skills/arkcli-train-finetune/references/download.md +50 -0
  135. package/skills/arkcli-train-finetune/references/evals.md +59 -0
  136. package/skills/arkcli-train-finetune/references/export-deploy.md +179 -0
  137. package/skills/arkcli-train-finetune/references/list.md +79 -0
  138. package/skills/arkcli-train-finetune/references/manage.md +140 -0
  139. package/skills/arkcli-understand/SKILL.md +105 -0
  140. package/skills/arkcli-understand/references/arkcli-understand.md +249 -0
  141. package/skills/arkcli-understand/references/evals.md +109 -0
  142. package/skills/arkcli-understand/references/sub-skills.md +137 -0
  143. package/skills/arkcli-usage/SKILL.md +123 -0
  144. package/skills/arkcli-usage/references/arkcli-usage-balance.md +196 -0
  145. package/skills/arkcli-usage/references/arkcli-usage-plan.md +153 -0
  146. package/skills/arkcli-usage/references/arkcli-usage-seats.md +199 -0
  147. package/skills/arkcli-usage/references/arkcli-usage-stats.md +160 -0
  148. package/README.md +0 -3
@@ -0,0 +1,179 @@
1
+ # Select, Export, and Deploy Fine-Tuning Artifacts
2
+
3
+ This workflow supports two entry points:
4
+
5
+ - The user provides an `mcj-...` and asks to select, export, and deploy artifacts based on training performance.
6
+ - The user provides one or more `cm-...` resources and asks which inference types they support and how to deploy them.
7
+
8
+ In addition to the shared skill, read the following skills when entering the corresponding stage:
9
+
10
+ - Query custom models, quantize them, and prepare deployable versions: [`../../arkcli-custommodel/SKILL.md`](../../arkcli-custommodel/SKILL.md).
11
+ - Create an online inference endpoint: [`../../arkcli-deploy/SKILL.md`](../../arkcli-deploy/SKILL.md).
12
+ - Configure or subsequently manage an endpoint at a lower level: [`../../arkcli-infer-endpoint/SKILL.md`](../../arkcli-infer-endpoint/SKILL.md).
13
+
14
+ Do not copy commands from memory. At each stage, read the references required by the corresponding skill and follow its write-operation, billing, and confirmation rules.
15
+
16
+ ## Command summary
17
+
18
+ | Command | When to use | Common parameters |
19
+ |---|---|---|
20
+ | `arkcli train finetune metrics <mcj-id>` | Select the best-performing step | `--metric`, `--from-step`, `--to-step`, `--output` |
21
+ | `arkcli train finetune artifacts list <mcj-id>` | List artifacts | Use `--format table` for human selection or `--lite` to skip secondary custom-model name queries |
22
+ | `arkcli train finetune artifacts export <mcj-id>` | Export artifacts as `cm-*` custom models | Repeat `--artifact-name`; optionally use `--custom-model-name-prefix` |
23
+ | `arkcli models custommodel get <cm-id>` | Retrieve custom model details | `--transform artifact_types,active_endpoints` |
24
+ | `arkcli models custommodel available-quantizations <cm-id>` | Check whether a new deployable version can be created | Always run before quantization |
25
+ | `arkcli models custommodel quantize <cm-id>` | Create a new quantized version | Use `--quantization`; asynchronously returns a new `cm-*` |
26
+ | `arkcli infer endpoint capability get --custom-model-id <cm-id>` | Query supported inference types | Run before deployment |
27
+ | `arkcli +deploy` | Create or reuse an endpoint | It does not support `--dry-run`; restate final inputs and execute only after confirmation |
28
+
29
+ ## A. Select the Best-Performing Step from an MCJ
30
+
31
+ If the user directly provides a `cm-...`, skip to section C.
32
+
33
+ ### 1. Retrieve the job and available metrics
34
+
35
+ ```bash
36
+ arkcli train finetune get <mcj-id>
37
+ arkcli train finetune metrics <mcj-id>
38
+ ```
39
+
40
+ Use `get` to confirm the fine-tuning type, training method, and job phase. If the job has not produced valid metrics or artifacts, explain its current phase and stop the export flow.
41
+
42
+ For a job that uses full fine-tuning, stop the CLI export-and-deploy flow and explain that ArkCLI currently cannot deploy artifacts produced by full fine-tuning. The user must complete deployment in the console. Do not continue with `artifacts export`, custom model deployment, or `+deploy`.
43
+
44
+ On the first `metrics` call, omit the metric name and obtain exact names from `available_metrics`. For a large result, write it to a file with `--output`, then calculate with a structured JSON tool rather than scanning a long series manually.
45
+ When restricting the range with both `--from-step` and `--to-step`, `to-step` must be strictly greater than `from-step`.
46
+
47
+ ### 2. Select the performance metric used for ranking
48
+
49
+ Apply the following priority. Every selected name must come from `available_metrics`.
50
+
51
+ | Job type | First choice | Fallback |
52
+ |---|---|---|
53
+ | Non-RL | Minimize a loss metric in the test, eval, or validation scope | Minimize a loss metric in the train scope |
54
+ | RL | Maximize `final_rewards.mean` in the test, eval, or validation scope | Maximize `final_rewards.mean` in the train scope |
55
+
56
+ Matching rules:
57
+
58
+ - Treat `test`, `eval`, and `validation` as evaluation scopes with equal priority. If multiple candidates exist, show their names and state which one is used.
59
+ - For RL, recognize the `final_rewards` metric family, including names such as `final_rewards`, `final_rewards.mean`, `final_rewards.best@N`, and `final_rewards.worst@N`.
60
+ - Prefer `final_rewards.mean`, then an exact `final_rewards`, because they represent aggregate rollout performance. Treat `best@N` and `worst@N` as supporting metrics; do not use either to rank artifacts unless the user explicitly chooses it.
61
+ - Do not silently substitute accuracy, a generic reward, gradient norm, or another metric for the primary metric above.
62
+ - If neither the preferred nor fallback metric exists, list the actual available metrics and ask the user to choose. Do not guess.
63
+
64
+ Record:
65
+
66
+ - The exact metric name and why it was selected.
67
+ - The best metric value.
68
+ - The corresponding step or steps.
69
+ - Whether the metric belongs to an evaluation set or the training set.
70
+
71
+ Retain every step tied at the best value. If the user requests top-k, sort in the correct metric direction and record the top-k steps. Do not treat neighboring steps as multiple "best-performing steps" by default.
72
+
73
+ ## B. Map the Best-Performing Step to an Artifact and Export It
74
+
75
+ ### 1. List artifacts
76
+
77
+ ```bash
78
+ arkcli train finetune artifacts list <mcj-id>
79
+ ```
80
+
81
+ Extract the step from the artifact name or structured fields. Automatically map only artifacts whose steps can be parsed reliably. If the step cannot be parsed, show the artifact list and ask the user to choose.
82
+
83
+ For each best-performing step:
84
+
85
+ 1. Prefer an artifact with an exact step match.
86
+ 2. If no exact match exists, calculate the absolute distance to each exportable artifact step.
87
+ 3. Select the nearest artifact. If multiple artifacts tie at the same distance, retain every tied candidate.
88
+ 4. Show `metric step → artifact step → distance` explicitly. Never describe a nearest artifact as an exact match.
89
+
90
+ Deduplicate artifacts mapped from different best-performing steps to avoid exporting the same artifact more than once.
91
+
92
+ ### 2. Obtain user confirmation
93
+
94
+ Before export, display:
95
+
96
+ - MCJ ID, fine-tuning type, and training method.
97
+ - Selected performance metric, best value, and best-performing step.
98
+ - Recommended artifact and mapping distance.
99
+ - Current artifact export status.
100
+ - Existing custom model ID, if already exported.
101
+
102
+ Ask the user to confirm the final artifact or artifacts to export. Allow the user to add or remove candidates.
103
+
104
+ ### 3. Export
105
+
106
+ Run the following only for user-confirmed artifacts that have not already been exported:
107
+
108
+ ```bash
109
+ arkcli train finetune artifacts export <mcj-id> \
110
+ --artifact-name <artifact-1> \
111
+ --artifact-name <artifact-2>
112
+ ```
113
+
114
+ If a naming prefix is needed, confirm it first and use only a parameter supported by the current `--help`. Reuse the existing `cm-...` for an already exported artifact; do not export it again.
115
+
116
+ Explain that export registers an MCJ artifact as a custom model in the model registry; it does not download model weights. Record the custom model ID and status corresponding to each artifact.
117
+
118
+ Common export statuses:
119
+
120
+ - `Available`: available for export.
121
+ - `Exported`: already exported; reuse `custom_model_id`.
122
+ - `Exporting`: export is in progress; query again later.
123
+ - `ExportFailed` / `Expired`: not directly deployable; show the status and ask the user how to proceed.
124
+
125
+ ## C. Query Custom Models and Deployable Versions
126
+
127
+ For every user-provided or newly exported `cm-...`, read and follow the `arkcli-custommodel` skill.
128
+
129
+ At minimum, run:
130
+
131
+ ```bash
132
+ arkcli models custommodel get <cm-id>
133
+ arkcli models custommodel get <cm-id> --transform artifact_types,active_endpoints
134
+ arkcli infer endpoint capability get --custom-model-id <cm-id>
135
+ ```
136
+
137
+ Summarize:
138
+
139
+ - Custom model name, source, status, and base model.
140
+ - Existing endpoints.
141
+ - Inference types directly supported by the current model.
142
+ - Additional inference types that may become available after creating a new version through quantization or another supported method.
143
+
144
+ If the target inference type is not currently supported, follow the `arkcli-custommodel` skill:
145
+
146
+ 1. Query `available-quantizations` and the inference types each quantization method is expected to support.
147
+ 2. Explain the potential impact of quantization on accuracy, performance, and resource options.
148
+ 3. After user confirmation, create a new quantized `cm-...`.
149
+ - `custommodel quantize --dry-run` is a command-local Client Preview and emits `preview.v1`; it never sends the quantization request.
150
+ 4. Poll the new model until it reaches `ready`.
151
+ 5. Query the new `cm-...` again for details and its actual supported inference types.
152
+
153
+ Do not create a new version merely because a quantization option exists. The source and quantized models are different resources; preserve a clear mapping between them.
154
+
155
+ ## D. Select and Deploy
156
+
157
+ Show a deployment-candidate table containing at least:
158
+
159
+ - Custom model ID and name.
160
+ - Source artifact and step, when known.
161
+ - Corresponding best metric and value, when known.
162
+ - Whether it is the original or quantized version.
163
+ - Currently supported inference types.
164
+ - Existing running endpoint, if any.
165
+
166
+ Ask the user:
167
+
168
+ 1. Which `cm-...` resource or resources to deploy.
169
+ 2. Which supported inference type to use for each model.
170
+ 3. The endpoint name and configuration required by that inference type.
171
+
172
+ After the user chooses, read and follow the `arkcli-deploy` skill:
173
+
174
+ 1. Restate the final inputs and impact for each target.
175
+ 2. Show the endpoint to be created or reused, the selected inference type, and billing impact.
176
+ 3. Obtain final confirmation, then perform the deployment.
177
+ 4. Record every `cm-... → ep-...` mapping and endpoint status.
178
+
179
+ Deploying multiple models creates multiple billable resources. Make the number of targets explicit. Never treat confirmation of artifact export as confirmation of endpoint deployment.
@@ -0,0 +1,79 @@
1
+ # List Fine-Tuning Jobs
2
+
3
+ Use this reference only for listing and filtering multiple jobs. If the user provides a job ID, read [`manage.md`](manage.md) instead.
4
+
5
+ ## Command and common filters
6
+
7
+ ```bash
8
+ arkcli train finetune list [flags]
9
+ ```
10
+
11
+ | Parameter | Description |
12
+ |---|---|
13
+ | `--name` | Fuzzy-filter by job name |
14
+ | `--phase` | Filter by job phase; repeatable |
15
+ | `--customization-type` | Filter by backend customization type; repeatable. Check `--help` when enum values are uncertain. |
16
+ | `--create-time-after`, `--create-time-before` | Filter by creation time using RFC3339 |
17
+ | `--mine` | Only include jobs created by the current SSO sub-user; server-side `TagFilters=[{Key:"sys:ark:createdBy", Values:["IAMUser/<uid>/<name>"]}]` |
18
+ | `--page-size`, `--page-number` | Paginate manually. Page number defaults to 1 and must be `>=1`; page size defaults to 100 and must be in `1-100`. |
19
+ | `--page-all`, `--page-limit` | Paginate automatically; always set a reasonable limit |
20
+ | `--sort-by`, `--sort-order` | Sort results |
21
+ | `--transform` | Extract a single field; use a JSON tool for complex projections |
22
+
23
+ ## Workflow
24
+
25
+ 1. Inspect parameters supported by the current version:
26
+
27
+ ```bash
28
+ arkcli train finetune list --help
29
+ ```
30
+
31
+ 2. Combine filters according to the user's criteria:
32
+
33
+ - Name.
34
+ - Job phase.
35
+ - Customization type.
36
+ - Creation time range.
37
+ - Creator. When the user says "mine / my jobs / jobs I created", add `--mine`; do not list the whole account and guess the creator locally.
38
+ - Pagination and sorting.
39
+
40
+ 3. If the user requests all results, use the current CLI's automatic pagination parameters and set a reasonable page limit. Never fetch without a bound.
41
+
42
+ For manual requests starting at page 2, the CLI first obtains `total_count` using the active filters. It returns a validation error when the requested page starts beyond the total; a final partially filled page remains valid.
43
+
44
+ 4. Return a concise table or summary that prioritizes:
45
+
46
+ - Job ID.
47
+ - Name.
48
+ - Customization type or training method, as returned.
49
+ - Current phase.
50
+ - Creation or update time.
51
+
52
+ Do not automatically call `get` for every listed job. Query a job only when the user requests details or the list response lacks a field needed to answer the request.
53
+
54
+ ## Command skeletons
55
+
56
+ ```bash
57
+ arkcli train finetune list
58
+ arkcli train finetune list --name <keyword>
59
+ arkcli train finetune list --phase <phase>
60
+ arkcli train finetune list --mine --page-all --page-size 100
61
+ arkcli train finetune list \
62
+ --create-time-after <RFC3339> \
63
+ --create-time-before <RFC3339>
64
+ ```
65
+
66
+ Obtain phase and customization-type enum values from the current `--help`; do not maintain a static list.
67
+
68
+ `--mine` depends on an SSO sub-user identity and the `sys:ark:createdBy` resource tag. A degraded identity
69
+ without an ARK IAM `UserID` gets an explicit unsupported error. Do not fake an empty tag or silently return
70
+ account-wide rows as "mine".
71
+
72
+ ## Time handling
73
+
74
+ - When the user provides relative time such as "today," "yesterday," or "the last week," convert it to explicit RFC3339 boundaries using the active profile or user timezone.
75
+ - Include the actual absolute time range in the result to avoid timezone ambiguity.
76
+
77
+ ## Empty results
78
+
79
+ For an empty result, state the filters actually used and suggest relaxing the filter most likely to be too restrictive. Do not interpret an empty list as a permission problem unless the CLI explicitly returns an authentication or authorization error.
@@ -0,0 +1,140 @@
1
+ # Retrieve and Manage a Fine-Tuning Job
2
+
3
+ Use this reference for details, observation, and lifecycle operations when the job ID is known. To select an artifact by metrics, export a custom model, or continue to deployment, read [`export-deploy.md`](export-deploy.md) instead.
4
+
5
+ ## Command summary
6
+
7
+ | Command | When to use | Common parameters |
8
+ |---|---|---|
9
+ | `arkcli train finetune get <job-id>` | Canonical command for retrieving full details | `--transform` |
10
+ | `arkcli train finetune status <job-id>` | Retrieve status; semantically equivalent to the detail query | `--transform` |
11
+ | `arkcli train finetune watch <job-id>` | Continuously monitor progress and metric changes | `--interval`, `--timeout`, `--quiet`, `--rich` |
12
+ | `arkcli train finetune metrics <job-id>` | Retrieve metric curves | `--metric`, `--from-step`, `--to-step`, `--output` |
13
+ | `arkcli train finetune logs <job-id>` | Retrieve training logs | `--tail`, `--since`, `--search`, `--follow`, `--output` |
14
+ | `arkcli train finetune trajectory list/get <job-id>` | Retrieve rollout trajectories recorded for an RL job | `--limit`, `--step`, `--sample-id`, `--full`, `--output` |
15
+ | `arkcli train finetune update <job-id>` | Update the name or description | `--name`, `--description` |
16
+ | `arkcli train finetune pause/resume/stop/delete` | Perform lifecycle operations | Confirm before writing, deleting, or terminating; add `--yes` only when required |
17
+
18
+ ## Retrieve the current state first
19
+
20
+ Before any write operation, run:
21
+
22
+ ```bash
23
+ arkcli train finetune get <job-id>
24
+ ```
25
+
26
+ Confirm that the job ID, current phase, and requested operation are compatible. Follow the current command's `--help` and backend error for phase restrictions; do not maintain a static phase matrix.
27
+
28
+ Use the same direct `get` when the user asks why one named job cannot be found, and preserve the authoritative API error. Do not infer validity from date-like or readable parts of an `mcj-*` ID, search for similar jobs with `list`, or switch profile/project/region. If the user explicitly limits scope, stop after explaining the target error.
29
+
30
+ ## Details and process observation
31
+
32
+ Choose the smallest command that satisfies the request:
33
+
34
+ ```bash
35
+ arkcli train finetune get <job-id>
36
+ arkcli train finetune watch <job-id>
37
+ arkcli train finetune metrics <job-id>
38
+ arkcli train finetune logs <job-id>
39
+ arkcli train finetune trajectory list <job-id>
40
+ ```
41
+
42
+ Inspect the corresponding `--help` before execution.
43
+
44
+ - Use `get` for a one-time state query and `watch` to wait continuously for a terminal phase.
45
+ - Query available metric names before filtering, then use the exact returned name.
46
+ - When `metrics` uses both `--from-step` and `--to-step`, `to-step` must be strictly greater than `from-step`.
47
+ - Logs and metrics can be large. Prefer filters, tailing, or `--output`; do not load the complete result into context.
48
+ - For an RL job created with `--enable-trajectory`, use `trajectory list` for summaries and `trajectory get` for a specific rollout. This path does not depend on the fine-tuning SDK, but it requires an SSO-authenticated profile with access to the job's trajectory TLS topic. If access fails, report the authentication or TLS authorization error instead of describing trajectory inspection as unsupported on BytePlus.
49
+
50
+ ### Save logs for one named job
51
+
52
+ When the user supplies both an MCJ ID and an output path, run this directly:
53
+
54
+ ```bash
55
+ arkcli train finetune logs <mcj-id> --output <path>
56
+ ```
57
+
58
+ This is a read-only, single-job query. Do not stop after viewing `logs --help`; do not run `train finetune list --page-all`, scan jobs with Python, or suggest switching profile/project. Preserve the original error and stop. Inspect the current `logs --help` only if the target command reports incompatible syntax, then retry the same target command.
59
+
60
+ `--follow` polls continuously for an active job. If the job is already `Completed`, `Failed`, or `Terminated`, the CLI emits the current log snapshot and exits automatically. It also exits when an active job later becomes terminal and an idle poll has no new lines. A terminal job may use `--follow --format json` to return one bounded JSON snapshot; unbounded follow on an active job does not support single-document structured output.
61
+
62
+ ### Retrieve the complete trajectory for one named job
63
+
64
+ ```bash
65
+ arkcli train finetune trajectory list <mcj-id> --full
66
+ ```
67
+
68
+ The hierarchy must include `train finetune trajectory list`; never try `arkcli train trajectory` or wander through unrelated help trees. `--full` returns complete rollout content. Add `--output <path>` only when the user supplies a path or agrees because the result can be large. If the command reports that trajectory logging was disabled, no trajectory exists, or authentication/TLS access failed, preserve that error and stop. Do not inspect other jobs, profiles, or MCP configuration.
69
+
70
+ ## Troubleshoot a failed job
71
+
72
+ After producing an effective Debug result with a concrete problem
73
+ classification and next action, reuse the current `ARKCLI_SKILL_FLOW_ID` (or
74
+ generate `ftf_<ULID>`), then run `arkcli train finetune _report-activity
75
+ --action debug_success` with the shared prefix. Do not report a query alone.
76
+
77
+ 1. Run `get` and report the current phase, failure reason, and CLI-provided hint.
78
+ 2. Use `logs` with `--tail`, `--since`, or `--search` to isolate the relevant error; write large results to a file.
79
+ 3. Query `metrics` only when the job has produced valid metric data, and use exact metric names returned by the CLI.
80
+ 4. Compare the training and validation data, model version, customization type, and hyperparameters with the original creation configuration.
81
+ 5. Do not resubmit until the failure cause has been identified or the user explicitly accepts the remaining risk.
82
+
83
+ ## TLS configuration
84
+
85
+ Use the complete `tls config` hierarchy to retrieve or manage fine-tuning TLS configuration:
86
+
87
+ ```bash
88
+ arkcli train finetune tls config get
89
+ arkcli train finetune tls config enable
90
+ arkcli train finetune tls config disable
91
+ arkcli train finetune tls config delete
92
+ ```
93
+
94
+ No `tls update` operation is available. Do not omit `config` and write `arkcli train finetune tls get`.
95
+
96
+ - `get` is read-only and can run without confirmation.
97
+ - `enable` creates a potentially billable TLS resource. Explain the cost impact and obtain confirmation first.
98
+ - `disable` stops new data from being written but retains existing data. Obtain confirmation first.
99
+ - `delete` permanently removes existing trajectory, custom log, trace, and explainability data. Obtain separate confirmation; add `--yes` for non-interactive execution only after confirmation.
100
+
101
+ ## Job metadata
102
+
103
+ Before updating the name or description, display the job ID, current value, and target value, then obtain confirmation:
104
+
105
+ ```bash
106
+ arkcli train finetune update <job-id> --help
107
+ arkcli train finetune update <job-id> --name <name>
108
+ ```
109
+
110
+ Send only the fields the user requested to change.
111
+
112
+ ## Pause, resume, stop, and delete
113
+
114
+ Inspect each current interface first:
115
+
116
+ ```bash
117
+ arkcli train finetune pause --help
118
+ arkcli train finetune resume --help
119
+ arkcli train finetune stop --help
120
+ arkcli train finetune delete --help
121
+ ```
122
+
123
+ Rules:
124
+
125
+ - Use `pause` when the user expects to continue the job later.
126
+ - Use `resume` primarily to restore a `Paused` job, making it the reversible counterpart to `pause`. When the backend allows, it may also retry `Failed` or `Terminated`; still follow the current job phase and API result.
127
+ - `stop` terminates the job irreversibly. Explain the impact clearly and obtain confirmation.
128
+ - `delete` removes the job record. Display the target job ID, name, and current phase, then obtain separate confirmation. **Enforce the phase client-side:** only terminal phases (`Completed`, `Failed`, or `Terminated`) can be deleted. For a non-terminal phase, refuse locally and instruct the user to run `train finetune stop` first, avoiding a backend `phase_mismatch` after the user confirms.
129
+ - If the agent environment requires `--yes`, add it only after user confirmation.
130
+ - If the phase does not allow an operation, follow the CLI or backend hint. Do not bypass the restriction through repeated retries.
131
+
132
+ ## Training artifacts
133
+
134
+ If the user only wants to view artifacts, run:
135
+
136
+ ```bash
137
+ arkcli train finetune artifacts list <job-id>
138
+ ```
139
+
140
+ If the user wants to select the best artifact, export it, or deploy it, stop this flow and read [`export-deploy.md`](export-deploy.md).
@@ -0,0 +1,105 @@
1
+ ---
2
+ name: arkcli-understand
3
+ version: 1.0.1
4
+ description: "arkcli +understand: a multimodal understanding workflow with 12 task-oriented sub-skills across image/video/audio/file modalities on the data-plane Responses API engine. Covers image captioning/OCR, bbox grounding, GUI action recognition, PDF/document field extraction, video summary/QA, joint audio-video understanding, ASR, speech translation, SRT alignment, speaker diarization, and meeting minutes. Platform profiles use their deployed Resources.Text.Default endpoint; plan profiles use each recipe's fallback model. Invoke for multimodal tasks with a specific output form, such as transcribing audio, locating objects, extracting PDF fields, summarizing video, generating subtitles, producing meeting minutes, or describing an image. Use +chat for open-ended visual conversations and +gen for image/video generation."
5
+ metadata:
6
+ requires:
7
+ bins: ["arkcli"]
8
+ cliHelp: "arkcli +understand --help"
9
+ ---
10
+
11
+ # arkcli +understand
12
+
13
+ **CRITICAL — Before starting, you MUST use Read to open [`../arkcli-shared/SKILL.md`](../arkcli-shared/SKILL.md), which contains authentication gates, API Key error recovery, configuration troubleshooting, and command selection order.**
14
+ **CRITICAL — Before running `+understand`, you MUST use Read to open [`references/arkcli-understand.md`](references/arkcli-understand.md) (commands/flags/returns/errors) and [`references/sub-skills.md`](references/sub-skills.md) (purpose and expected output of all 12 sub-skills). Do not construct commands from memory.**
15
+
16
+ ## Core concepts
17
+
18
+ - `+understand` is **not 12 implementations, but one engine plus a semantic layer**. The underlying engine is the same data-plane Responses API used by `+chat`; each sub-skill is a **recipe** `{modality, fallback model, built-in system prompt}`. When `--model` is omitted, a Platform Profile must use its deployed `Resources.Text.Default` endpoint; only plan profiles use the recipe fallback model.
19
+ - Command form: `arkcli +understand <sub-skill> --input @file [prompt]`.
20
+ - If `args[0]` **matches the registry** (one of 12), it is the explicit sub-skill; remaining positional arguments become a prompt layered on the built-in prompt.
21
+ - If `args[0]` **does not match**, all positional arguments become the prompt, and the server automatically routes by the modality of the **first `--input` file** to that modality's default sub-skill.
22
+ - **`--input` is required**: a sub-skill understands a particular file. Without `--input`, it immediately returns `missing_input`. A prompt alone cannot derive a recipe.
23
+ - Return values are identical to `+chat`: arkcli's **flat** schema `{id, model, content, reasoning_content, usage}`, **not** the native nested Responses `output[].content[].text`. See "Return value" in [`references/arkcli-understand.md`](references/arkcli-understand.md).
24
+ - Multimodal upload: image/video/doc use the SDK `file://` preprocessor and Files API automatically. **Audio is special**: it is inlined as a base64 data URL, with a **25 MB limit**. See the reference.
25
+ - `--dry-run` resolves the local recipe, the active Profile's persisted default endpoint, an explicit model, and input-reference data and emits `preview.v1`. It never reads live Endpoint/model metadata, uploads files, calls Responses, creates usage or response IDs, or persists a response. Online-only values must be listed as `unresolved`; the plan is not server validation.
26
+
27
+ ## Quick decision: understand vs chat vs gen
28
+
29
+ | User intent | Route |
30
+ |---|---|
31
+ | Multimodal understanding task with a **specific output form** (transcription / translation / subtitles / bbox localization / GUI actions / field extraction / chapter summary / multiple speakers / meeting minutes) | **`+understand`** (a matching sub-skill) |
32
+ | Open-ended image/video conversation, follow-up questions, reasoning, multi-turn continuation (`--store`/`--previous-response-id`), tools (web_search/function), or strict JSON with `--text-format json_schema` | [`../arkcli-chat/SKILL.md`](../arkcli-chat/SKILL.md) |
33
+ | **Generate** images/videos rather than understand existing material | [`../arkcli-gen/SKILL.md`](../arkcli-gen/SKILL.md) |
34
+
35
+ One-line criterion: **if the task maps to a sub-skill below, use `+understand`; otherwise use `+chat` for open conversation and `+gen` for generation.**
36
+
37
+ ## Agent quick execution order
38
+
39
+ 1. Determine which sub-skill matches the user's task. If matched, specify the sub-skill explicitly instead of relying on automatic routing.
40
+ 2. Pass the authentication gate: if login state is uncertain, run `arkcli auth status`. Data-plane calls use an ARK API Key (`Authorization: Bearer`). On authentication failure, follow "API Key mode error recovery" in [`../arkcli-auth/references/auth-modes.md`](../arkcli-auth/references/auth-modes.md), run `arkcli auth apikey`, and **do not retry in place**.
41
+ 3. Prepare input: `--input @<file>` (repeatable). Local files use `@`; remote input uses `https://` / `tos://`.
42
+ 4. **Do not pass `--model` by default**: a Platform Profile uses the deployed `ep-xxx` in `Resources.Text.Default`, consistently with `+chat`; a plan profile uses the sub-skill's recipe fallback model. Only pass `--model` when the user explicitly requests another resource; it must be a complete versioned ID or `ep-xxx`. If uncertain, route to [`../arkcli-models/SKILL.md`](../arkcli-models/SKILL.md).
43
+ 5. Add `--stream` for incremental output. To adjust instructions, use `--system-prompt-append "..."` (append) or `--system-prompt-override "..."` (replace the built-in prompt).
44
+ 6. Return to the user's original goal after execution; do not stop at an intermediate artifact.
45
+
46
+ ## Sub-skill quick reference (12 / 4 modalities)
47
+
48
+ > The models below are recipe fallbacks for plan profiles. A Platform Profile does not invoke these bare names; it uses the Profile's deployed `Resources.Text.Default` endpoint. See Agent step 4 above when an override is required.
49
+
50
+ | sub-skill | Modality | Plan recipe fallback model | Purpose |
51
+ |---|---|---|---|
52
+ | `image-caption` | image | `seed-2-0-lite` | Single/multiple image descriptions and OCR (preserve source text; do not paraphrase) |
53
+ | `image-grounding` | image | `seed-2-0-lite` | Visual localization: output target bbox `(x1,y1,x2,y2)` + confidence |
54
+ | `image-gui` | image | `seed-2-0-lite` | GUI screenshot → executable action sequence |
55
+ | `doc-extract` | file | `seed-2-0-mini` | Extract structured JSON from PDF/doc by schema (missing values null; preserve page) |
56
+ | `video-summary` | video | `seed-2-0-lite` | Video summary: overall / segment / chapter + key timestamps |
57
+ | `video-qa` | video | `seed-2-0-lite` | Video Q&A using visuals + audio + timeline |
58
+ | `vau` | video | `seed-2-0-lite` | Joint audiovisual understanding and audio-analysis report |
59
+ | `asr` | audio | `seed-2-0-lite` | Speech transcription: plain text only, with no prefix/suffix/formatting |
60
+ | `asr-align` | audio | `seed-2-0-lite` | Subtitle alignment: SRT by default (index + start/end + text) |
61
+ | `asr-speakers` | audio | `seed-2-0-lite` | Multi-speaker transcription with `[spk0]` / `[spk1]` labels |
62
+ | `ast` | audio | `seed-2-0-lite` | Speech translation into text |
63
+ | `meeting-minutes` | audio | `seed-2-0-lite` | Structured Markdown minutes (topic/participants/key points/decisions/follow-ups) |
64
+
65
+ See [`references/sub-skills.md`](references/sub-skills.md) for expected output and commands for each.
66
+
67
+ ## Automatic routing when sub-skill is omitted
68
+
69
+ When `args[0]` does not match the registry, infer modality from the **first `--input` file extension** and fall back to its default sub-skill:
70
+
71
+ | Inferred modality | Fallback sub-skill |
72
+ |---|---|
73
+ | image (`.jpg/.png/.webp/...`) | `image-caption` |
74
+ | video (`.mp4/.mov/...`) | `video-qa` |
75
+ | audio (`.mp3/.wav/.m4a/...`) | `asr` |
76
+ | file (other extensions) | `doc-extract` |
77
+
78
+ - Without `--input`, automatic routing is impossible (a prompt alone cannot derive a recipe) → `missing_sub_skill`.
79
+ - Routing currently uses only file modality, not prompt keywords. For example, "draw a box around" does not automatically select `image-grounding`. Explicitly provide non-default sub-skills such as grounding / gui / summary / subtitles / translation.
80
+
81
+ ## Command overview
82
+
83
+ | Command | Description |
84
+ |---|---|
85
+ | `arkcli +understand image-caption --input @photo.jpg "Describe this image"` | Image description |
86
+ | `arkcli +understand image-caption --input @doc.png "Perform OCR and preserve the text exactly"` | OCR |
87
+ | `arkcli +understand image-grounding --input @scene.jpg "Draw bounding boxes around all red cars"` | Visual bbox localization |
88
+ | `arkcli +understand doc-extract --input @invoice.pdf "Extract the invoice number, amount, and date"` | Document field extraction |
89
+ | `arkcli +understand video-summary --input @clip.mp4 "Summarize by chapter"` | Chapter-based video summary |
90
+ | `arkcli +understand video-qa --input @clip.mp4 "How many cars appear in the video?"` | Video Q&A |
91
+ | `arkcli +understand asr --input @speech.mp3` | Speech transcription (no prompt required) |
92
+ | `arkcli +understand asr-align --input @speech.mp3` | Generate SRT subtitles |
93
+ | `arkcli +understand asr-speakers --input @meeting.wav` | Multi-speaker transcription |
94
+ | `arkcli +understand ast --input @speech.m4a "Translate into English"` | Speech translation |
95
+ | `arkcli +understand meeting-minutes --input @meeting.m4a` | Meeting minutes |
96
+ | `arkcli +understand "<prompt>" --input @photo.jpg` | Omit sub-skill → automatic routing by modality (here → image-caption) |
97
+ | `arkcli +understand asr --input @speech.mp3 --stream` | Incremental streaming output |
98
+ | `arkcli +understand image-caption --input @x.jpg --system-prompt-append "Answer in English"` | Append instructions after the built-in prompt |
99
+ | `arkcli +understand image-caption --input @x.jpg "Describe the image" --dry-run` | Preview recipe/model/request summary without upload or inference |
100
+
101
+ ## Detailed documentation
102
+
103
+ - All flags, `@file`/audio upload mechanisms, flat return schema, errors, raw API fallback, and relation to `+chat` → [`references/arkcli-understand.md`](references/arkcli-understand.md)
104
+ - Purpose, **expected output form**, and example commands for all 12 sub-skills → [`references/sub-skills.md`](references/sub-skills.md)
105
+ - Minimum evaluation/regression cases → [`references/evals.md`](references/evals.md)