@toloka-platform/sdk 0.12.2 → 0.13.0
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/dist/cli/toloka.js +153 -151
- package/dist/cli/toloka.js.jsc +0 -0
- package/dist/cli/toloka.js.jsc.sha256 +1 -1
- package/dist/cli/toloka.js.sha256 +1 -1
- package/docs/cli.md +17 -0
- package/openapi/gen/api.ts +142 -0
- package/openapi/gen/models/batchInferenceMode.ts +3 -0
- package/openapi/gen/models/batchInferenceModeOneOf.ts +4 -0
- package/openapi/gen/models/batchInferenceModel.ts +4 -0
- package/openapi/gen/models/batchInferenceModelOneOf.ts +6 -0
- package/openapi/gen/models/batchInferenceModelOneOfBaseModelId.ts +2 -0
- package/openapi/gen/models/batchInferenceModelOneOfThree.ts +5 -0
- package/openapi/gen/models/batchInferenceRun.ts +35 -0
- package/openapi/gen/models/batchInferenceRunBlockedReason.ts +2 -0
- package/openapi/gen/models/batchInferenceRunChargedAmount.ts +2 -0
- package/openapi/gen/models/batchInferenceRunError.ts +3 -0
- package/openapi/gen/models/batchInferenceRunErrorAnyOf.ts +6 -0
- package/openapi/gen/models/batchInferenceRunErrorAnyOfCode.ts +2 -0
- package/openapi/gen/models/batchInferenceRunId.ts +2 -0
- package/openapi/gen/models/batchInferenceRunMessage.ts +2 -0
- package/openapi/gen/models/batchInferenceRunOutput.ts +9 -0
- package/openapi/gen/models/batchInferenceRunOutputType.ts +2 -0
- package/openapi/gen/models/batchInferenceRunProgress.ts +3 -0
- package/openapi/gen/models/batchInferenceRunProgressAnyOf.ts +7 -0
- package/openapi/gen/models/batchInferenceRunProgressAnyOfPhase.ts +2 -0
- package/openapi/gen/models/batchInferenceRunProgressAnyOfRequests.ts +5 -0
- package/openapi/gen/models/batchInferenceRunQuote.ts +3 -0
- package/openapi/gen/models/batchInferenceRunQuoteAnyOf.ts +9 -0
- package/openapi/gen/models/batchInferenceRunQuoteAnyOfConfirmBefore.ts +2 -0
- package/openapi/gen/models/batchInferenceRunResult.ts +3 -0
- package/openapi/gen/models/batchInferenceRunResultAnyOf.ts +12 -0
- package/openapi/gen/models/batchInferenceRunResultAnyOfErrorCounts.ts +2 -0
- package/openapi/gen/models/batchInferenceRunResultAnyOfErrorSamplesItem.ts +6 -0
- package/openapi/gen/models/batchInferenceRunSampling.ts +9 -0
- package/openapi/gen/models/batchInferenceRunStatus.ts +2 -0
- package/openapi/gen/models/createBatchInferenceRunBody.ts +14 -0
- package/openapi/gen/models/createBatchInferenceRunBodyItemFilter.ts +14 -0
- package/openapi/gen/models/createBatchInferenceRunBodyItemFilterExcludePartsItem.ts +5 -0
- package/openapi/gen/models/createBatchInferenceRunBodyItemFilterFieldSourcesItem.ts +6 -0
- package/openapi/gen/models/createBatchInferenceRunBodyItemFilterFieldSourcesItemSourcesItem.ts +4 -0
- package/openapi/gen/models/createBatchInferenceRunBodyItemFilterFieldSourcesItemSourcesItemOneOf.ts +5 -0
- package/openapi/gen/models/createBatchInferenceRunBodyItemFilterFieldSourcesItemSourcesItemOneOfTwo.ts +5 -0
- package/openapi/gen/models/createBatchInferenceRunBodyItemFilterFieldValuesItem.ts +12 -0
- package/openapi/gen/models/createBatchInferenceRunBodyItemFilterFieldValuesItemOperator.ts +2 -0
- package/openapi/gen/models/createBatchInferenceRunBodyItemFilterFieldValuesItemSourcesItem.ts +4 -0
- package/openapi/gen/models/createBatchInferenceRunBodyItemFilterFieldValuesItemSourcesItemOneOf.ts +5 -0
- package/openapi/gen/models/createBatchInferenceRunBodyItemFilterFieldValuesItemSourcesItemOneOfTwo.ts +5 -0
- package/openapi/gen/models/createBatchInferenceRunBodyItemFilterFieldValuesItemValue.ts +2 -0
- package/openapi/gen/models/createBatchInferenceRunBodyItemFilterParts.ts +5 -0
- package/openapi/gen/models/createBatchInferenceRunBodyItemFilterSlice.ts +4 -0
- package/openapi/gen/models/createBatchInferenceRunBodyOutput.ts +4 -0
- package/openapi/gen/models/createBatchInferenceRunBodyOutputOneOf.ts +5 -0
- package/openapi/gen/models/createBatchInferenceRunBodyOutputOneOfTwo.ts +5 -0
- package/openapi/gen/models/createBatchInferenceRunBodySampling.ts +9 -0
- package/openapi/gen/models/datasetFieldOperation.ts +2 -1
- package/openapi/gen/models/datasetFieldWriteOperation.ts +8 -0
- package/openapi/gen/models/datasetFieldWriteOperationProgress.ts +3 -0
- package/openapi/gen/models/datasetFieldWriteOperationProgressAnyOf.ts +5 -0
- package/openapi/gen/models/index.ts +53 -0
- package/openapi/gen/models/listBatchInferenceRuns200.ts +7 -0
- package/openapi/gen/models/listBatchInferenceRunsParams.ts +5 -0
- package/package.json +2 -2
- package/skills/catalog.json +6 -6
- package/skills/toloka-build/references/workflow-and-cli.md +5 -1
- package/src/cli/analytics.ts +8 -0
- package/src/cli/batch-inference.ts +267 -0
- package/src/cli/commands/batch-inference.ts +116 -0
- package/src/cli/context.ts +14 -0
- package/src/cli/models.ts +1 -1
- package/src/cli/program.ts +2 -0
- package/src/cli/splits.ts +40 -0
- package/src/cli/trainings.ts +1 -19
- package/src/client.ts +49 -0
package/dist/cli/toloka.js.jsc
CHANGED
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
bd9af65bb4d3ef07ad904d44003764fc805e35a6485ccaa1aa4cb88632cb7ff0 toloka.js.jsc
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
fcc6665d33987f1285618bc1863c82e3b942fbcc835772451325099219a53573 toloka.js
|
package/docs/cli.md
CHANGED
|
@@ -400,6 +400,23 @@ Hyperparameters are optional flags on `training create` and `training update`: `
|
|
|
400
400
|
|
|
401
401
|
A Training learns on a ready dataset slice that freezes a split column, and `training create` needs `--dataset` or `--slice`. `--dataset <name-or-id>` fills the empty cells of the dataset's split column (a new `split` column, 80/10/10, when it has none), freezes a slice named after the Training, and trains on it; it waits up to 10 minutes for each step and prints one line per step before `Created training`. A split column adopted from an ordinary column has no shares, so `--dataset` does not fill it; give it shares first with `toloka dataset split <dataset> --column <name> --parts <name>=<roles>:<percent>,...`. `--slice <id>` takes a slice frozen with `toloka dataset slice create`. With several split columns, `--split-column` picks the one to train with. The Training learns on the column's train parts, or the ones `--parts` names, and validates on its validate parts, including a part that both validates and tests; without validation rows, the run holds out 10% of the training rows. Rows without a part are never trained on. `training update` keeps the slice, split column and train parts. A new `--dataset` or `--slice` resets the split column and train parts unless you pass them too; `--dataset` splits again and freezes a new slice named after the Training. `training get` prints the slice, split column and train parts. `training cost` leaves out rows that any split column now puts in a test part, a validate + test part of the Training's own column apart, and, when there are any, prints how many as `Left out as test`. The test parts of the Training's own column are outside the train parts to begin with, so they are not counted there. A Training saved before split slices were required is refused by `training cost` until `training update` gives it one.
|
|
402
402
|
|
|
403
|
+
## batch-inference
|
|
404
|
+
|
|
405
|
+
Answer a dataset's chat rows with a catalog Base Model or a Model Version of the project.
|
|
406
|
+
|
|
407
|
+
```sh
|
|
408
|
+
toloka batch-inference run --dataset <id> [--filter field=value] [--slice <slice-id>] [--parts <names> [--split-column <name>]] (--base-model <id> | --model-version <mdv.id|Model@name>) (--output-field <name> | --output-dataset <name>) --max-output-tokens <n> [--temperature 0..2] [--top-p <p>] [--stop <text>]... [--seed <n>] [--samples-per-row <n>] [--idempotency-key <key>] [--yes] [--json]
|
|
409
|
+
toloka batch-inference list [--json]
|
|
410
|
+
toloka batch-inference status <batch-inference-run-id> [--wait] [--json]
|
|
411
|
+
toloka batch-inference confirm <batch-inference-run-id> [--json]
|
|
412
|
+
toloka batch-inference resume <batch-inference-run-id> [--json]
|
|
413
|
+
toloka batch-inference cancel <batch-inference-run-id> [--json]
|
|
414
|
+
```
|
|
415
|
+
|
|
416
|
+
Each selected row sends its `messages` (and `tools`, if any) as the prompt; a trailing assistant turn and the label column are ignored, so a training or holdout dataset works as-is. Rows with no user turn to answer, and prompts over about 16,384 tokens (estimated the way training estimates examples: each character counts by its script, about 5 Latin letters or 2.5 Cyrillic letters to a token and every digit one, plus the chat template's markup per turn and tool), are skipped and counted in the quote; when no row is left, the run fails with `no_requests` before anything is held. `--slice` answers only the rows of a ready slice, with the prompts it froze; `--parts test` answers only the rows in those parts of the dataset's split column, and `--split-column` picks the column when there are several. With both, a split column the slice froze keeps the parts it had when the slice was taken. `run` freezes the selection, waits for the quote and prints the number of rows and the maximum charge; nothing is held or spent until you confirm, either with `--yes` on `run` or later with `confirm` within 24 hours. `--output-field` writes each answer as a new value of a text column on the same dataset, creating the column if it does not exist. An existing column must allow strings, including a string column limited to an enum, a pattern or a length; a column whose schema allows no string (a number, a boolean, an object, or an enum, const, anyOf, oneOf or allOf with no string option) is refused with "does not accept text" before anything is quoted, and an answer that breaks a column's constraint fails that row. `--output-dataset` creates a new chat-sft dataset and adds a row for each answer as it arrives, keeping the prompt, the answer and the source row; `--samples-per-row` asks for several answers to each row (with a temperature above 0), one dataset row per answer with its `sample` number. A sample that fails adds no row. Answers appear in the dataset as they are generated, and while the run writes, the column shows "Updating · done/total", and the field's `operations` in the API list the write, so a slice, a split or another run that reads the column waits until it ends. Each answer is a new value of the column; rows the run left without one are found with the column filter for rows missing a value from the run, and `status` counts the failures by reason. The run is charged for the GPU time it used, at most the quoted maximum; a cancel keeps the answers already generated and charges the time used, and a platform failure charges nothing. `status --wait` follows a run until it finishes or needs you.
|
|
417
|
+
|
|
418
|
+
Batch inference runs on qwen3-4b and qwen3-8b: a catalog Base Model, or a Model Version trained from one of them (LoRA, full weights or gisting). `run` refuses other models before anything is quoted. The charge is the GPU time used at the quoted price per GPU-hour: at least $0.50 per GPU once the job has used any GPU time, and never more than the quoted maximum. A cancel pays for the time used so far. A run that fails on the platform's side, times out, or whose results cannot be read at all charges nothing; when only some answers cannot be read, the run completes, charges the GPU time used and counts those rows as failed. A `blocked` run says why in `status`: `funds` when the balance cannot cover the hold (add funds, then `resume`); `payment` when the charge could not be collected (add funds and `resume` within seven days, after which the run fails with `payment_window_expired`; the answers already written stay); `billing_review` when support has to reconcile the charge. With a scoped API token, `list` and `status` need `inference:read`, and `run`, `confirm`, `resume` and `cancel` need `inference:deploy`: the `deploy` preset grants both, `read` and `write` grant only `inference:read`, and the labeling presets grant neither.
|
|
419
|
+
|
|
403
420
|
## dataset
|
|
404
421
|
|
|
405
422
|
Catalog and row commands for datasets in the selected project. Name or id is accepted; duplicate names must be addressed by id.
|
package/openapi/gen/api.ts
CHANGED
|
@@ -4,9 +4,12 @@ import type {
|
|
|
4
4
|
AttachPipelineDatasetBody,
|
|
5
5
|
BaseModel,
|
|
6
6
|
BaseModelId,
|
|
7
|
+
BatchInferenceRun,
|
|
8
|
+
BatchInferenceRunId,
|
|
7
9
|
CheckJob,
|
|
8
10
|
CheckRunId,
|
|
9
11
|
CopyPipelineBody,
|
|
12
|
+
CreateBatchInferenceRunBody,
|
|
10
13
|
CreateDatasetBody,
|
|
11
14
|
CreateDatasetExportBody,
|
|
12
15
|
CreateDatasetField200,
|
|
@@ -41,6 +44,8 @@ import type {
|
|
|
41
44
|
ListAudienceSpecializations200,
|
|
42
45
|
ListAudienceSpecializationsParams,
|
|
43
46
|
ListBaseModels200,
|
|
47
|
+
ListBatchInferenceRuns200,
|
|
48
|
+
ListBatchInferenceRunsParams,
|
|
44
49
|
ListDatasetFields200,
|
|
45
50
|
ListDatasetFieldsParams,
|
|
46
51
|
ListDatasetItems200,
|
|
@@ -2144,3 +2149,140 @@ export const getPipelineCheck = async (checkRunId: CheckRunId, options?: Request
|
|
|
2144
2149
|
|
|
2145
2150
|
}
|
|
2146
2151
|
);}
|
|
2152
|
+
|
|
2153
|
+
|
|
2154
|
+
|
|
2155
|
+
export const getCreateBatchInferenceRunUrl = (projectId: ProjectId,) => {
|
|
2156
|
+
|
|
2157
|
+
|
|
2158
|
+
|
|
2159
|
+
|
|
2160
|
+
return `/api/v2-beta/projects/${projectId}/batch-inference-runs`
|
|
2161
|
+
}
|
|
2162
|
+
|
|
2163
|
+
export const createBatchInferenceRun = async (projectId: ProjectId,
|
|
2164
|
+
createBatchInferenceRunBody: CreateBatchInferenceRunBody, options?: RequestInit): Promise<BatchInferenceRun> => {
|
|
2165
|
+
|
|
2166
|
+
return potatoFetch<BatchInferenceRun>(getCreateBatchInferenceRunUrl(projectId),
|
|
2167
|
+
{
|
|
2168
|
+
...options,
|
|
2169
|
+
method: 'POST',
|
|
2170
|
+
headers: { 'Content-Type': 'application/json', ...options?.headers },
|
|
2171
|
+
body: JSON.stringify(
|
|
2172
|
+
createBatchInferenceRunBody,)
|
|
2173
|
+
}
|
|
2174
|
+
);}
|
|
2175
|
+
|
|
2176
|
+
|
|
2177
|
+
|
|
2178
|
+
export const getListBatchInferenceRunsUrl = (projectId: ProjectId,
|
|
2179
|
+
params?: ListBatchInferenceRunsParams,) => {
|
|
2180
|
+
const normalizedParams = new URLSearchParams();
|
|
2181
|
+
|
|
2182
|
+
Object.entries(params || {}).forEach(([key, value]) => {
|
|
2183
|
+
|
|
2184
|
+
if (value !== undefined) {
|
|
2185
|
+
normalizedParams.append(key, value === null ? 'null' : value.toString())
|
|
2186
|
+
}
|
|
2187
|
+
});
|
|
2188
|
+
|
|
2189
|
+
const stringifiedParams = normalizedParams.toString();
|
|
2190
|
+
|
|
2191
|
+
return stringifiedParams.length > 0 ? `/api/v2-beta/projects/${projectId}/batch-inference-runs?${stringifiedParams}` : `/api/v2-beta/projects/${projectId}/batch-inference-runs`
|
|
2192
|
+
}
|
|
2193
|
+
|
|
2194
|
+
export const listBatchInferenceRuns = async (projectId: ProjectId,
|
|
2195
|
+
params?: ListBatchInferenceRunsParams, options?: RequestInit): Promise<ListBatchInferenceRuns200> => {
|
|
2196
|
+
|
|
2197
|
+
return potatoFetch<ListBatchInferenceRuns200>(getListBatchInferenceRunsUrl(projectId,params),
|
|
2198
|
+
{
|
|
2199
|
+
...options,
|
|
2200
|
+
method: 'GET'
|
|
2201
|
+
|
|
2202
|
+
|
|
2203
|
+
}
|
|
2204
|
+
);}
|
|
2205
|
+
|
|
2206
|
+
|
|
2207
|
+
|
|
2208
|
+
export const getGetBatchInferenceRunUrl = (batchInferenceRunId: BatchInferenceRunId,) => {
|
|
2209
|
+
|
|
2210
|
+
|
|
2211
|
+
|
|
2212
|
+
|
|
2213
|
+
return `/api/v2-beta/batch-inference-runs/${batchInferenceRunId}`
|
|
2214
|
+
}
|
|
2215
|
+
|
|
2216
|
+
export const getBatchInferenceRun = async (batchInferenceRunId: BatchInferenceRunId, options?: RequestInit): Promise<BatchInferenceRun> => {
|
|
2217
|
+
|
|
2218
|
+
return potatoFetch<BatchInferenceRun>(getGetBatchInferenceRunUrl(batchInferenceRunId),
|
|
2219
|
+
{
|
|
2220
|
+
...options,
|
|
2221
|
+
method: 'GET'
|
|
2222
|
+
|
|
2223
|
+
|
|
2224
|
+
}
|
|
2225
|
+
);}
|
|
2226
|
+
|
|
2227
|
+
|
|
2228
|
+
|
|
2229
|
+
export const getConfirmBatchInferenceRunUrl = (batchInferenceRunId: BatchInferenceRunId,) => {
|
|
2230
|
+
|
|
2231
|
+
|
|
2232
|
+
|
|
2233
|
+
|
|
2234
|
+
return `/api/v2-beta/batch-inference-runs/${batchInferenceRunId}/confirm`
|
|
2235
|
+
}
|
|
2236
|
+
|
|
2237
|
+
export const confirmBatchInferenceRun = async (batchInferenceRunId: BatchInferenceRunId, options?: RequestInit): Promise<BatchInferenceRun> => {
|
|
2238
|
+
|
|
2239
|
+
return potatoFetch<BatchInferenceRun>(getConfirmBatchInferenceRunUrl(batchInferenceRunId),
|
|
2240
|
+
{
|
|
2241
|
+
...options,
|
|
2242
|
+
method: 'POST'
|
|
2243
|
+
|
|
2244
|
+
|
|
2245
|
+
}
|
|
2246
|
+
);}
|
|
2247
|
+
|
|
2248
|
+
|
|
2249
|
+
|
|
2250
|
+
export const getResumeBatchInferenceRunUrl = (batchInferenceRunId: BatchInferenceRunId,) => {
|
|
2251
|
+
|
|
2252
|
+
|
|
2253
|
+
|
|
2254
|
+
|
|
2255
|
+
return `/api/v2-beta/batch-inference-runs/${batchInferenceRunId}/resume`
|
|
2256
|
+
}
|
|
2257
|
+
|
|
2258
|
+
export const resumeBatchInferenceRun = async (batchInferenceRunId: BatchInferenceRunId, options?: RequestInit): Promise<BatchInferenceRun> => {
|
|
2259
|
+
|
|
2260
|
+
return potatoFetch<BatchInferenceRun>(getResumeBatchInferenceRunUrl(batchInferenceRunId),
|
|
2261
|
+
{
|
|
2262
|
+
...options,
|
|
2263
|
+
method: 'POST'
|
|
2264
|
+
|
|
2265
|
+
|
|
2266
|
+
}
|
|
2267
|
+
);}
|
|
2268
|
+
|
|
2269
|
+
|
|
2270
|
+
|
|
2271
|
+
export const getCancelBatchInferenceRunUrl = (batchInferenceRunId: BatchInferenceRunId,) => {
|
|
2272
|
+
|
|
2273
|
+
|
|
2274
|
+
|
|
2275
|
+
|
|
2276
|
+
return `/api/v2-beta/batch-inference-runs/${batchInferenceRunId}/cancel`
|
|
2277
|
+
}
|
|
2278
|
+
|
|
2279
|
+
export const cancelBatchInferenceRun = async (batchInferenceRunId: BatchInferenceRunId, options?: RequestInit): Promise<BatchInferenceRun> => {
|
|
2280
|
+
|
|
2281
|
+
return potatoFetch<BatchInferenceRun>(getCancelBatchInferenceRunUrl(batchInferenceRunId),
|
|
2282
|
+
{
|
|
2283
|
+
...options,
|
|
2284
|
+
method: 'POST'
|
|
2285
|
+
|
|
2286
|
+
|
|
2287
|
+
}
|
|
2288
|
+
);}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import type { BatchInferenceRunId } from './batchInferenceRunId';
|
|
2
|
+
import type { ProjectId } from './projectId';
|
|
3
|
+
import type { DatasetId } from './datasetId';
|
|
4
|
+
import type { BatchInferenceModel } from './batchInferenceModel';
|
|
5
|
+
import type { BatchInferenceMode } from './batchInferenceMode';
|
|
6
|
+
import type { BatchInferenceRunSampling } from './batchInferenceRunSampling';
|
|
7
|
+
import type { BatchInferenceRunOutput } from './batchInferenceRunOutput';
|
|
8
|
+
import type { BatchInferenceRunStatus } from './batchInferenceRunStatus';
|
|
9
|
+
import type { BatchInferenceRunProgress } from './batchInferenceRunProgress';
|
|
10
|
+
import type { BatchInferenceRunBlockedReason } from './batchInferenceRunBlockedReason';
|
|
11
|
+
import type { BatchInferenceRunMessage } from './batchInferenceRunMessage';
|
|
12
|
+
import type { BatchInferenceRunError } from './batchInferenceRunError';
|
|
13
|
+
import type { BatchInferenceRunQuote } from './batchInferenceRunQuote';
|
|
14
|
+
import type { BatchInferenceRunChargedAmount } from './batchInferenceRunChargedAmount';
|
|
15
|
+
import type { BatchInferenceRunResult } from './batchInferenceRunResult';
|
|
16
|
+
|
|
17
|
+
export interface BatchInferenceRun {
|
|
18
|
+
id: BatchInferenceRunId;
|
|
19
|
+
projectId: ProjectId;
|
|
20
|
+
datasetId: DatasetId;
|
|
21
|
+
model: BatchInferenceModel;
|
|
22
|
+
mode: BatchInferenceMode;
|
|
23
|
+
sampling: BatchInferenceRunSampling;
|
|
24
|
+
output: BatchInferenceRunOutput;
|
|
25
|
+
status: BatchInferenceRunStatus;
|
|
26
|
+
progress: BatchInferenceRunProgress;
|
|
27
|
+
blockedReason: BatchInferenceRunBlockedReason;
|
|
28
|
+
message: BatchInferenceRunMessage;
|
|
29
|
+
error: BatchInferenceRunError;
|
|
30
|
+
quote: BatchInferenceRunQuote;
|
|
31
|
+
chargedAmount: BatchInferenceRunChargedAmount;
|
|
32
|
+
result: BatchInferenceRunResult;
|
|
33
|
+
createdAt: string;
|
|
34
|
+
updatedAt: string;
|
|
35
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { BatchInferenceRunOutputType } from './batchInferenceRunOutputType';
|
|
2
|
+
import type { DatasetId } from './datasetId';
|
|
3
|
+
import type { DatasetFieldId } from './datasetFieldId';
|
|
4
|
+
|
|
5
|
+
export type BatchInferenceRunOutput = {
|
|
6
|
+
type: BatchInferenceRunOutputType;
|
|
7
|
+
datasetId: DatasetId;
|
|
8
|
+
fieldId: DatasetFieldId;
|
|
9
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { BatchInferenceRunProgressAnyOfPhase } from './batchInferenceRunProgressAnyOfPhase';
|
|
2
|
+
import type { BatchInferenceRunProgressAnyOfRequests } from './batchInferenceRunProgressAnyOfRequests';
|
|
3
|
+
|
|
4
|
+
export type BatchInferenceRunProgressAnyOf = {
|
|
5
|
+
phase: BatchInferenceRunProgressAnyOfPhase;
|
|
6
|
+
requests?: BatchInferenceRunProgressAnyOfRequests;
|
|
7
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { BatchInferenceRunQuoteAnyOfConfirmBefore } from './batchInferenceRunQuoteAnyOfConfirmBefore';
|
|
2
|
+
|
|
3
|
+
export type BatchInferenceRunQuoteAnyOf = {
|
|
4
|
+
requests: number;
|
|
5
|
+
skippedRows: number;
|
|
6
|
+
maximumCharge: string;
|
|
7
|
+
currency: 'USD';
|
|
8
|
+
confirmBefore: BatchInferenceRunQuoteAnyOfConfirmBefore;
|
|
9
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { BatchInferenceRunResultAnyOfErrorCounts } from './batchInferenceRunResultAnyOfErrorCounts';
|
|
2
|
+
import type { BatchInferenceRunResultAnyOfErrorSamplesItem } from './batchInferenceRunResultAnyOfErrorSamplesItem';
|
|
3
|
+
|
|
4
|
+
export type BatchInferenceRunResultAnyOf = {
|
|
5
|
+
written: number;
|
|
6
|
+
failed: number;
|
|
7
|
+
truncated: number;
|
|
8
|
+
inputTokens: number;
|
|
9
|
+
outputTokens: number;
|
|
10
|
+
errorCounts: BatchInferenceRunResultAnyOfErrorCounts;
|
|
11
|
+
errorSamples: BatchInferenceRunResultAnyOfErrorSamplesItem[];
|
|
12
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { CreateBatchInferenceRunBodyItemFilter } from './createBatchInferenceRunBodyItemFilter';
|
|
2
|
+
import type { BatchInferenceModel } from './batchInferenceModel';
|
|
3
|
+
import type { BatchInferenceMode } from './batchInferenceMode';
|
|
4
|
+
import type { CreateBatchInferenceRunBodySampling } from './createBatchInferenceRunBodySampling';
|
|
5
|
+
import type { CreateBatchInferenceRunBodyOutput } from './createBatchInferenceRunBodyOutput';
|
|
6
|
+
|
|
7
|
+
export type CreateBatchInferenceRunBody = {
|
|
8
|
+
datasetId: string;
|
|
9
|
+
itemFilter?: CreateBatchInferenceRunBodyItemFilter;
|
|
10
|
+
model: BatchInferenceModel;
|
|
11
|
+
mode?: BatchInferenceMode;
|
|
12
|
+
sampling: CreateBatchInferenceRunBodySampling;
|
|
13
|
+
output: CreateBatchInferenceRunBodyOutput;
|
|
14
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { CreateBatchInferenceRunBodyItemFilterFieldValuesItem } from './createBatchInferenceRunBodyItemFilterFieldValuesItem';
|
|
2
|
+
import type { CreateBatchInferenceRunBodyItemFilterFieldSourcesItem } from './createBatchInferenceRunBodyItemFilterFieldSourcesItem';
|
|
3
|
+
import type { CreateBatchInferenceRunBodyItemFilterSlice } from './createBatchInferenceRunBodyItemFilterSlice';
|
|
4
|
+
import type { CreateBatchInferenceRunBodyItemFilterParts } from './createBatchInferenceRunBodyItemFilterParts';
|
|
5
|
+
import type { CreateBatchInferenceRunBodyItemFilterExcludePartsItem } from './createBatchInferenceRunBodyItemFilterExcludePartsItem';
|
|
6
|
+
|
|
7
|
+
export type CreateBatchInferenceRunBodyItemFilter = {
|
|
8
|
+
fieldValues?: CreateBatchInferenceRunBodyItemFilterFieldValuesItem[];
|
|
9
|
+
fieldSources?: CreateBatchInferenceRunBodyItemFilterFieldSourcesItem[];
|
|
10
|
+
missingRevisionFields?: string[];
|
|
11
|
+
slice?: CreateBatchInferenceRunBodyItemFilterSlice;
|
|
12
|
+
parts?: CreateBatchInferenceRunBodyItemFilterParts;
|
|
13
|
+
excludeParts?: CreateBatchInferenceRunBodyItemFilterExcludePartsItem[];
|
|
14
|
+
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { CreateBatchInferenceRunBodyItemFilterFieldSourcesItemSourcesItem } from './createBatchInferenceRunBodyItemFilterFieldSourcesItemSourcesItem';
|
|
2
|
+
|
|
3
|
+
export type CreateBatchInferenceRunBodyItemFilterFieldSourcesItem = {
|
|
4
|
+
fieldId: string;
|
|
5
|
+
sources: CreateBatchInferenceRunBodyItemFilterFieldSourcesItemSourcesItem[];
|
|
6
|
+
};
|
package/openapi/gen/models/createBatchInferenceRunBodyItemFilterFieldSourcesItemSourcesItem.ts
ADDED
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { CreateBatchInferenceRunBodyItemFilterFieldSourcesItemSourcesItemOneOf } from './createBatchInferenceRunBodyItemFilterFieldSourcesItemSourcesItemOneOf';
|
|
2
|
+
import type { CreateBatchInferenceRunBodyItemFilterFieldSourcesItemSourcesItemOneOfTwo } from './createBatchInferenceRunBodyItemFilterFieldSourcesItemSourcesItemOneOfTwo';
|
|
3
|
+
|
|
4
|
+
export type CreateBatchInferenceRunBodyItemFilterFieldSourcesItemSourcesItem = CreateBatchInferenceRunBodyItemFilterFieldSourcesItemSourcesItemOneOf | CreateBatchInferenceRunBodyItemFilterFieldSourcesItemSourcesItemOneOfTwo;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { CreateBatchInferenceRunBodyItemFilterFieldValuesItemOperator } from './createBatchInferenceRunBodyItemFilterFieldValuesItemOperator';
|
|
2
|
+
import type { CreateBatchInferenceRunBodyItemFilterFieldValuesItemValue } from './createBatchInferenceRunBodyItemFilterFieldValuesItemValue';
|
|
3
|
+
import type { CreateBatchInferenceRunBodyItemFilterFieldValuesItemSourcesItem } from './createBatchInferenceRunBodyItemFilterFieldValuesItemSourcesItem';
|
|
4
|
+
|
|
5
|
+
export type CreateBatchInferenceRunBodyItemFilterFieldValuesItem = {
|
|
6
|
+
jsonPath: string;
|
|
7
|
+
operator: CreateBatchInferenceRunBodyItemFilterFieldValuesItemOperator;
|
|
8
|
+
value: CreateBatchInferenceRunBodyItemFilterFieldValuesItemValue;
|
|
9
|
+
fieldId: string;
|
|
10
|
+
latestOnly?: boolean;
|
|
11
|
+
sources?: CreateBatchInferenceRunBodyItemFilterFieldValuesItemSourcesItem[];
|
|
12
|
+
};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { CreateBatchInferenceRunBodyItemFilterFieldValuesItemSourcesItemOneOf } from './createBatchInferenceRunBodyItemFilterFieldValuesItemSourcesItemOneOf';
|
|
2
|
+
import type { CreateBatchInferenceRunBodyItemFilterFieldValuesItemSourcesItemOneOfTwo } from './createBatchInferenceRunBodyItemFilterFieldValuesItemSourcesItemOneOfTwo';
|
|
3
|
+
|
|
4
|
+
export type CreateBatchInferenceRunBodyItemFilterFieldValuesItemSourcesItem = CreateBatchInferenceRunBodyItemFilterFieldValuesItemSourcesItemOneOf | CreateBatchInferenceRunBodyItemFilterFieldValuesItemSourcesItemOneOfTwo;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { CreateBatchInferenceRunBodyOutputOneOf } from './createBatchInferenceRunBodyOutputOneOf';
|
|
2
|
+
import type { CreateBatchInferenceRunBodyOutputOneOfTwo } from './createBatchInferenceRunBodyOutputOneOfTwo';
|
|
3
|
+
|
|
4
|
+
export type CreateBatchInferenceRunBodyOutput = CreateBatchInferenceRunBodyOutputOneOf | CreateBatchInferenceRunBodyOutputOneOfTwo;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { DatasetFieldCopyOperation } from './datasetFieldCopyOperation';
|
|
2
2
|
import type { DatasetFieldSplitFillOperation } from './datasetFieldSplitFillOperation';
|
|
3
|
+
import type { DatasetFieldWriteOperation } from './datasetFieldWriteOperation';
|
|
3
4
|
|
|
4
|
-
export type DatasetFieldOperation = DatasetFieldCopyOperation | DatasetFieldSplitFillOperation;
|
|
5
|
+
export type DatasetFieldOperation = DatasetFieldCopyOperation | DatasetFieldSplitFillOperation | DatasetFieldWriteOperation;
|