@toloka-platform/sdk 0.2.0-preview.3 → 0.2.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.
Files changed (75) hide show
  1. package/README.md +5 -6
  2. package/dist/cli/toloka.js +136 -136
  3. package/dist/cli/toloka.js.jsc +0 -0
  4. package/dist/cli/toloka.js.jsc.sha256 +1 -1
  5. package/dist/cli/toloka.js.sha256 +1 -1
  6. package/docs/cli-v2.md +3 -2
  7. package/docs/cli.md +35 -7
  8. package/docs/getting-started.md +4 -2
  9. package/docs/limitations.md +2 -2
  10. package/openapi/gen/models/baseModel.ts +1 -0
  11. package/openapi/gen/models/currentUser.ts +2 -0
  12. package/openapi/gen/models/currentUserTeamsItem.ts +6 -0
  13. package/openapi/gen/models/gistingTrainingConfiguration.ts +6 -2
  14. package/openapi/gen/models/gistingTrainingConfigurationBatchSize.ts +2 -0
  15. package/openapi/gen/models/gistingTrainingConfigurationGistTokens.ts +2 -0
  16. package/openapi/gen/models/gistingTrainingConfigurationInput.ts +6 -2
  17. package/openapi/gen/models/gistingTrainingConfigurationInputBatchSize.ts +2 -0
  18. package/openapi/gen/models/gistingTrainingConfigurationInputGistTokens.ts +2 -0
  19. package/openapi/gen/models/index.ts +9 -4
  20. package/openapi/gen/models/sftTrainingConfiguration.ts +6 -3
  21. package/openapi/gen/models/sftTrainingConfigurationBatchSize.ts +2 -0
  22. package/openapi/gen/models/sftTrainingConfigurationInput.ts +6 -3
  23. package/openapi/gen/models/sftTrainingConfigurationInputBatchSize.ts +2 -0
  24. package/openapi/gen/models/sftTrainingConfigurationInputLoraRank.ts +2 -0
  25. package/openapi/gen/models/sftTrainingConfigurationLoraRank.ts +2 -0
  26. package/package.json +2 -2
  27. package/skills/catalog.json +11 -11
  28. package/skills/toloka-build/SKILL.md +29 -18
  29. package/skills/toloka-build/references/node-semantics.md +7 -7
  30. package/skills/toloka-build/references/workflow-and-cli.md +15 -12
  31. package/skills/toloka-fine-tuning/SKILL.md +145 -62
  32. package/skills/toloka-get-started/SKILL.md +37 -21
  33. package/skills/toloka-gisting/SKILL.md +156 -66
  34. package/skills/toloka-report-issue/references/report-template.md +1 -1
  35. package/src/cli/analytics.ts +50 -23
  36. package/src/cli/auth.ts +31 -12
  37. package/src/cli/auto-update.ts +12 -6
  38. package/src/cli/check.ts +76 -29
  39. package/src/cli/cli-entry.ts +3 -2
  40. package/src/cli/cli-error.ts +43 -0
  41. package/src/cli/commands/dataset.ts +13 -3
  42. package/src/cli/commands/models.ts +6 -7
  43. package/src/cli/commands/pipeline.ts +6 -7
  44. package/src/cli/commands/project.ts +9 -16
  45. package/src/cli/commands/report.ts +6 -2
  46. package/src/cli/commands/secret.ts +5 -4
  47. package/src/cli/commands/source.ts +4 -4
  48. package/src/cli/commands/status.ts +2 -3
  49. package/src/cli/commands/training.ts +50 -17
  50. package/src/cli/config.ts +2 -2
  51. package/src/cli/context.ts +55 -17
  52. package/src/cli/credentials.ts +12 -4
  53. package/src/cli/data.ts +96 -34
  54. package/src/cli/delivery-orders.ts +18 -1
  55. package/src/cli/file-system.ts +6 -2
  56. package/src/cli/format-error.ts +45 -2
  57. package/src/cli/init.ts +13 -7
  58. package/src/cli/models.ts +43 -12
  59. package/src/cli/program.ts +5 -56
  60. package/src/cli/project-context.ts +117 -32
  61. package/src/cli/project.ts +80 -28
  62. package/src/cli/report.ts +24 -9
  63. package/src/cli/runs.ts +33 -8
  64. package/src/cli/settings.ts +13 -5
  65. package/src/cli/skill.ts +61 -22
  66. package/src/cli/source.ts +3 -2
  67. package/src/cli/terminal-io.ts +13 -6
  68. package/src/cli/trainings.ts +129 -35
  69. package/src/cli/version.ts +2 -2
  70. package/src/client.ts +3 -9
  71. package/src/transport.ts +13 -1
  72. package/openapi/gen/models/gistingTrainingConfigurationInputRegime.ts +0 -2
  73. package/openapi/gen/models/gistingTrainingConfigurationRegime.ts +0 -2
  74. package/openapi/gen/models/sftTrainingConfigurationInputRegime.ts +0 -2
  75. package/openapi/gen/models/sftTrainingConfigurationRegime.ts +0 -2
Binary file
@@ -1 +1 @@
1
- 9ad43de333dbe074807e30a8c4dcac3218b8da3d35dcb5b9f73de5a828e0e1a5 toloka.js.jsc
1
+ ef3e378cf44fae35729752064f23960c37016cb6fd231756a974fc8e239c89ff toloka.js.jsc
@@ -1 +1 @@
1
- d94c96d189b79c2a18acad2d61fe57da2c580dc0219094434e1e44e822bcd7f0 toloka.js
1
+ f411e3d6a2289108ed93862aedb96f9628cef1a7ee21ec197aa4cf1bb9390ce3 toloka.js
package/docs/cli-v2.md CHANGED
@@ -86,14 +86,14 @@ toloka project remove cat-labeling # local unbind only
86
86
 
87
87
  `project add` with no arguments prompts for alias and id, like `wmill workspace add`. The new alias becomes `current`.
88
88
 
89
- Create a live project and bind it in one step. External teams omit `--delivery-order-id`. Internal users (`whoami` prints `Internal: true`) must pass an active id from `toloka delivery-order list`:
89
+ Create a live project and bind it in one step. The delivery order follows the owning team, not the account (`toloka whoami` marks internal teams `(internal)` on its `Teams:` line): a project in an internal team must carry an active id from `toloka delivery-order list`, and a project in an external team must not carry one, even when the account is internal:
90
90
 
91
91
  ```sh
92
92
  toloka project create cat-labeling --team-id <teamId>
93
93
  toloka project create cat-labeling --team-id <teamId> --delivery-order-id <orderId>
94
94
  ```
95
95
 
96
- `POST /projects` requires `teamId`. There is no public team-list endpoint today, so `--team-id` is required unless every visible project shares one team, in which case we reuse that id. If teams differ, refuse and ask.
96
+ `POST /projects` requires `teamId`. `GET /me` lists the caller's teams with their write access, so `--team-id` is optional when the account has exactly one writable team; with several, the CLI refuses and names them.
97
97
 
98
98
  `project create` writes the machine alias, sets `current`, and if cwd has no `toloka.json`, writes one.
99
99
 
@@ -126,6 +126,7 @@ Resource commands never search the disk for a pipeline first. They load the proj
126
126
  | `plan` / `apply` / `validate` | whole project | no |
127
127
  | `secret set` | project | no |
128
128
  | `dataset list` | project | no |
129
+ | `dataset create <name>` | project | no |
129
130
  | `dataset fields <name>` | named dataset in this project | no |
130
131
  | `dataset load <name>` | named dataset in this project | no |
131
132
  | `dataset upload <name>` | named dataset in this project | no |
package/docs/cli.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  The `toloka` CLI reads TypeScript source as the desired state, compares it with the live platform state, and reconciles the two.
4
4
 
5
- This CLI is Beta software. Commands, flags, and output can change before general availability.
5
+ `toloka` `0.2.0` is the current stable CLI on the `latest` channel. Because it ships as part of the `0.x` SDK, commands, flags, and output can change between minor releases.
6
6
 
7
7
  `toloka` requires Bun 1.4.0 or newer. The published package ships CLI bytecode built with Bun 1.4.0; another Bun version runs the same bundled JavaScript without that cache and starts slower. The launcher falls back to TypeScript source in a development checkout when the bytecode is absent.
8
8
 
@@ -30,7 +30,7 @@ Credentials and the platform base URL resolve from the same precedence order, hi
30
30
  | 3 | `projectId` in `toloka.json` |
31
31
  | 4 (lowest) | `current` alias in the credentials file |
32
32
 
33
- Earlier releases named these variables `POTATO_API_KEY`, `POTATO_BASE_URL`, and `POTATO_PROJECT_ID`. The CLI still reads each legacy name when its `TOLOKA_*` counterpart is unset, prefers the `TOLOKA_*` value when both are set, and prints `POTATO_API_KEY is deprecated and will stop being read; set TOLOKA_API_KEY instead.` (and the same line for the other two) on stderr once per command. The legacy names stop being read in the first stable `0.2.0` release; rename them now to silence the warning.
33
+ Earlier releases named these variables `POTATO_API_KEY`, `POTATO_BASE_URL`, and `POTATO_PROJECT_ID`. The CLI still reads each legacy name when its `TOLOKA_*` counterpart is unset, prefers the `TOLOKA_*` value when both are set, and prints `POTATO_API_KEY is deprecated and will stop being read; set TOLOKA_API_KEY instead.` (and the same line for the other two) on stderr once per command. The aliases remain supported for compatibility; rename them to silence the warning and use the current names in new automation.
34
34
 
35
35
  `toloka login` verifies the key against the platform before saving anything. It writes `$XDG_CONFIG_HOME/toloka/credentials.json`, which defaults to `~/.config/toloka/credentials.json`, with file mode `0600` and a parent directory with mode `0700`. The file may also store local project aliases. The legacy `~/.toloka/credentials.json` is still read when the new path has no file. `toloka logout` deletes the stored file but does not revoke the key.
36
36
 
@@ -49,6 +49,10 @@ The root program accepts these flags before any command:
49
49
 
50
50
  Commands resolve the project root by walking up from the working directory until they find a `toloka.json` file. The CLI reports that directory on stderr when it differs from the working directory. Passing `--source-root` disables discovery. With no marker found, the working directory is used. `init` and `report` do not walk up: they use the working directory or `--source-root` only. The authentication commands `login`, `logout`, and `auth-status` do not need a project root.
51
51
 
52
+ ## Errors and hints
53
+
54
+ A failing command prints its message to stderr and exits `1`. Most messages are followed by a `Hint: …` line with the next command to run; messages that already spell out the remedy carry no hint. Platform failures print `Potato API request failed with status <code> (request id: <id>)`, the response body, and a status-based hint: `401`/`403` point at `toloka whoami` and `toloka login`, `404` at the selected project and the matching list command, `429` asks you to wait, and `5xx` asks you to retry and then send a report with `toloka report <report.md>`.
55
+
52
56
  ## Resources and Base Actions
53
57
 
54
58
  The CLI is resource-first: `toloka <resource> <action>`. A Base Action has one meaning wherever a resource implements it. A resource exposes only the Base Actions that have real behavior; there are no placeholder actions.
@@ -86,7 +90,7 @@ toloka project create [alias] [--name <name>] [--team-id <id>] [--delivery-order
86
90
  toloka project untrack <pipeline|dataset> <name> [--confirm]
87
91
  ```
88
92
 
89
- `add`, `switch`, `remove`, and `create` write the machine registry in the credentials file. They refuse `--api-key` / `--base-url` / `TOLOKA_*` when those would select a different key or platform than the stored file. `project list` prints project id, name, and team id. `create` reuses the only visible team when every listed project shares one; otherwise pass `--team-id`. Internal users (`whoami` prints `Internal: true`) also see `--delivery-order-id` and `toloka delivery-order list`.
93
+ `add`, `switch`, `remove`, and `create` write the machine registry in the credentials file. They refuse `--api-key` / `--base-url` / `TOLOKA_*` when those would select a different key or platform than the stored file. `project list` prints project id, name, and team id. `create` uses the account's only writable team (`GET /me` lists the teams; `whoami` prints them) and asks for `--team-id` when there are several. A project owned by an internal team also needs `--delivery-order-id`; `toloka delivery-order list` shows the orders and answers with an explanation for accounts without internal teams.
90
94
 
91
95
  `project untrack` removes one pipeline or dataset binding from `toloka.json` without deleting the live resource. It previews the name and id in a terminal; outside a terminal, pass `--confirm` after reviewing the state file.
92
96
 
@@ -96,7 +100,7 @@ toloka project untrack <pipeline|dataset> <name> [--confirm]
96
100
 
97
101
  ## delivery-order
98
102
 
99
- Internal users only. Listed in `toloka --help` and available as a command when `whoami` prints `Internal: true`.
103
+ Lists the Sunday delivery orders this key can attach on `project create`. The command is always registered; the platform answers `403` for accounts without an internal team, which the CLI reports as `Delivery orders are available to internal teams only.`
100
104
 
101
105
  ```sh
102
106
  toloka delivery-order list
@@ -135,7 +139,7 @@ Shows which platform and key the CLI would use. Alias: `whoami`.
135
139
  toloka auth-status [--show-token]
136
140
  ```
137
141
 
138
- On success it prints the platform URL with its source, the API key masked unless `--show-token` is passed, the selected project, `Reachable: N project(s) visible.`, and `Internal: true` or `Internal: false`. The project line is printed even when the probe fails. It exits `1` when no key is in effect, when the platform rejects the key (`Rejected: …`, followed by the advice to run `toloka login`), when the platform does not answer (`Not reachable: …`; the key was not evaluated), or when the platform fails (`Platform error: …`).
142
+ On success it prints the platform URL with its source, the API key masked unless `--show-token` is passed, the selected project, `Reachable: N project(s) visible.`, `Internal: true` or `Internal: false` for the account, and a `Teams:` line that marks each team `(internal)` and `(read-only)` where that applies. The project line is printed even when the probe fails. It exits `1` when no key is in effect, when the platform rejects the key (`Rejected: …`, followed by the advice to run `toloka login`), when the platform does not answer (`Not reachable: …`; the key was not evaluated), or when the platform fails (`Platform error: …`).
139
143
 
140
144
  ## config
141
145
 
@@ -267,7 +271,7 @@ toloka base-model list [--json]
267
271
  toloka base-model get <id> [--json]
268
272
  ```
269
273
 
270
- Human-readable output is the default. `base-model list` prints aligned ID, name, provider, and upstream-model columns; `base-model get` prints labeled fields including the pinned revision. Pass `--json` for machine-readable output.
274
+ Human-readable output is the default. `base-model list` prints aligned ID, name, provider, upstream-model, revision (first 12 characters) and upstream-snapshot URL columns; `base-model get` prints labeled fields including the full pinned revision and the `https://huggingface.co/<model>/tree/<revision>` snapshot URL. Pass `--json` for machine-readable output.
271
275
 
272
276
  ## model
273
277
 
@@ -283,12 +287,34 @@ toloka model archive <name-or-id> [--json]
283
287
 
284
288
  `model create` creates project-owned Model metadata linked to one catalog Base Model; it does not create a Model Version. Human-readable output is the default for every command in this group. Pass `--json` for machine-readable objects or arrays. Weight upload, validation, download, and Model Version creation are deferred.
285
289
 
290
+ ## training
291
+
292
+ Create a reusable Training draft, price it, and run it.
293
+
294
+ ```sh
295
+ toloka training list [--json]
296
+ toloka training get <name-or-id> [--json]
297
+ toloka training create <name> [--method sft|gisting] (--base-model <id> | --model-version <id>) --dataset <id> [--train-filter field=value] [--validation-dataset <id> [--validation-filter field=value]] [--prompt-file <path>] [--lora-rank 8|16|32 | --gist-tokens 8|32|64] [--epochs 1..5] [--learning-rate <rate>] [--batch-size 8|16|32|64] [--max-sequence-length <tokens>] [--json]
298
+ toloka training update <name-or-id> [--base-model <id> | --model-version <id>] [--dataset <id>] [--train-filter field=value] [--validation-dataset <id> [--validation-filter field=value]] [--prompt-file <path>] [--lora-rank 8|16|32 | --gist-tokens 8|32|64] [--epochs 1..5] [--learning-rate <rate>] [--batch-size 8|16|32|64] [--max-sequence-length <tokens>] [--json]
299
+ toloka training cost <name-or-id> [--idempotency-key <key>] [--json]
300
+ toloka training run <name-or-id> [--estimate-file <path>] [--version-name <name>] [--idempotency-key <key>] [--json]
301
+ toloka training runs <name-or-id> [--json]
302
+ toloka training status <training-run-id> [--json]
303
+ toloka training resume <training-run-id> [--json]
304
+ toloka training cancel <training-run-id> [--json]
305
+ toloka training logs <training-run-id>
306
+ toloka training metrics <training-run-id> [--key <metric>] [--resolution <n>] [--json]
307
+ ```
308
+
309
+ Hyperparameters are optional flags on `training create` and `training update`: `--epochs 1..5` (default 3), `--learning-rate` (SFT 0.00001–0.001, default 0.00015; gisting 0.001–0.3, default 0.03), `--batch-size 8|16|32|64` (default 8; sequences per optimizer step across all GPUs) and `--max-sequence-length 64..16384` (default 12288 for SFT, 3072 for gisting) apply to both methods; `--lora-rank 8|16|32` (default 16) is SFT-only and `--gist-tokens 8|32|64` (default 32) is gisting-only — passing one to the other method fails before any request. `--regime` and `--eval-steps` no longer exist. `training update` has no `--method` flag: the method stays as created, and every flag you omit keeps its current value. `training cost` is blocked when the longest example exceeds `--max-sequence-length` or when the training selection leaves fewer rows than `--batch-size` after the 10% holdout. `training get` prints the resolved recipe, so omitted flags are visible as their defaults.
310
+
286
311
  ## dataset
287
312
 
288
313
  Catalog and row commands for datasets in the selected project. Name or id is accepted; duplicate names must be addressed by id.
289
314
 
290
315
  ```sh
291
316
  toloka dataset list
317
+ toloka dataset create <name>
292
318
  toloka dataset fields <name>
293
319
  toloka dataset load <name> --out <file> [--limit <n>] [--timeout <ms>]
294
320
  toloka dataset upload <name> <file>
@@ -296,6 +322,8 @@ toloka dataset upload <name> <file>
296
322
 
297
323
  `dataset list` prints live `name` and id. It does not page items.
298
324
 
325
+ `dataset create` makes an empty dataset in the selected project; the first `dataset upload` infers its columns from the rows.
326
+
299
327
  `dataset fields` prints inferred `field()` TypeScript, or `Dataset <name> has no inferred fields yet.`
300
328
 
301
329
  `dataset load` starts a platform export, waits for it (default 60s; pass `--timeout`), downloads the JSON array, and writes JSONL to `--out`. `--limit` slices after download; it still waits for the full export. On timeout the message names the export id. Failed downloads and invalid payloads leave `--out` untouched.
@@ -334,7 +362,7 @@ toloka skill install <skillId> [--force]
334
362
 
335
363
  After an SDK upgrade `list` reports installed skills whose catalog digest changed as `stale` until they are refreshed with `install --force`. Local edits to an installed skill also make it `stale`; `list` and `search` never modify local files.
336
364
 
337
- The catalog is bound to the installed package version, so a skill that a newer release ships is simply absent from an older CLI. `install` then exits 1 with `Skill "<skillId>" is not in the catalog bundled with @toloka-platform/sdk <version>. Run toloka skill list to see the available skills; a newer release may ship it (bun add --global @toloka-platform/sdk@<channel>).` and creates nothing. `<channel>` is the channel of the installed version (`preview` for a `-preview.N` version, otherwise `latest`); reinstall from it and retry.
365
+ The catalog is bound to the installed package version, so a skill that a newer release ships is simply absent from an older CLI. `install` then exits 1, names the missing skill and installed package version, and creates nothing. Run `toloka skill list` to see the available skills. To get the current supported catalog, update with `bun add --global @toloka-platform/sdk@latest` and retry.
338
366
 
339
367
  ## Exit codes
340
368
 
@@ -4,7 +4,7 @@ Install the SDK, sign in, and get a pipeline project reconciling from source in
4
4
 
5
5
  ## Install
6
6
 
7
- Install the bytecode-cached CLI globally and declare the Beta SDK in the project:
7
+ Install the bytecode-cached CLI globally and declare the stable SDK in the project:
8
8
 
9
9
  ```sh
10
10
  curl -fsSL https://platform.toloka.ai/cli/install.sh | sh
@@ -13,6 +13,8 @@ bun add @toloka-platform/sdk@latest
13
13
 
14
14
  The installer requires Bun 1.4.0 or newer, installs `@toloka-platform/sdk` globally, and exposes `toloka` through Bun's global binary directory. The published CLI includes bytecode built with Bun 1.4.0; another Bun version runs the same bundled JavaScript without that cache and starts slower. The project install makes SDK imports resolvable.
15
15
 
16
+ `latest` currently installs stable `0.2.0`, including Training commands and the bundled agent runbooks and skills. Use `bun add @toloka-platform/sdk@0.2.0` when you need an exact, reproducible project dependency.
17
+
16
18
  ## Sign in
17
19
 
18
20
  ```sh
@@ -140,4 +142,4 @@ Exit code `0` means the run reached a successful terminal state, `1` a failed on
140
142
  - [Nodes](./nodes.md) — which node to reach for, and the pricing floors you must clear
141
143
  - [CLI](./cli.md) — every command and flag
142
144
  - [Troubleshooting](./troubleshooting.md) — the failures you will hit
143
- - [Limitations](./limitations.md) — Beta status and what this SDK does not do yet
145
+ - [Limitations](./limitations.md) — current constraints and `0.x` compatibility expectations
@@ -1,8 +1,8 @@
1
1
  # Limitations
2
2
 
3
- What this Beta SDK does not do yet, stated plainly so you can decide what to depend on.
3
+ Current constraints of the stable SDK, stated plainly so you can decide what to depend on.
4
4
 
5
- `@toloka-platform/sdk` is `0.2.0-preview.3`. This is a Beta: the authoring API, the CLI surface, and the generated source layout can change before general availability. Pin an exact version. Do not depend on this in production yet.
5
+ `@toloka-platform/sdk` `0.2.0` is the current stable release on `latest`. Because it is a `0.x` release, the authoring API, CLI surface, and generated source layout can change between minor versions. Use `latest` for the current supported release, or pin `@toloka-platform/sdk@0.2.0` for reproducible installs.
6
6
 
7
7
  ## Local checks do not certify deployability
8
8
 
@@ -6,4 +6,5 @@ export interface BaseModel {
6
6
  provider: string;
7
7
  upstreamModel: string;
8
8
  upstreamRevision: string;
9
+ upstreamUrl: string;
9
10
  }
@@ -1,7 +1,9 @@
1
1
  import type { CurrentUserEmail } from './currentUserEmail';
2
+ import type { CurrentUserTeamsItem } from './currentUserTeamsItem';
2
3
 
3
4
  export interface CurrentUser {
4
5
  id: string;
5
6
  email: CurrentUserEmail;
6
7
  internal: boolean;
8
+ teams: CurrentUserTeamsItem[];
7
9
  }
@@ -0,0 +1,6 @@
1
+
2
+ export type CurrentUserTeamsItem = {
3
+ id: string;
4
+ writable: boolean;
5
+ internal: boolean;
6
+ };
@@ -1,6 +1,7 @@
1
1
  import type { TrainingModelSource } from './trainingModelSource';
2
2
  import type { TrainingDatasetSelection } from './trainingDatasetSelection';
3
- import type { GistingTrainingConfigurationRegime } from './gistingTrainingConfigurationRegime';
3
+ import type { GistingTrainingConfigurationGistTokens } from './gistingTrainingConfigurationGistTokens';
4
+ import type { GistingTrainingConfigurationBatchSize } from './gistingTrainingConfigurationBatchSize';
4
5
 
5
6
  export interface GistingTrainingConfiguration {
6
7
  method: 'gisting';
@@ -8,6 +9,9 @@ export interface GistingTrainingConfiguration {
8
9
  training: TrainingDatasetSelection;
9
10
  validation?: TrainingDatasetSelection;
10
11
  promptFileId: string;
11
- regime: GistingTrainingConfigurationRegime;
12
+ gistTokens: GistingTrainingConfigurationGistTokens;
12
13
  epochs: number;
14
+ learningRate: number;
15
+ batchSize: GistingTrainingConfigurationBatchSize;
16
+ maxSequenceLength: number;
13
17
  }
@@ -0,0 +1,2 @@
1
+
2
+ export type GistingTrainingConfigurationBatchSize = 8 | 16 | 32 | 64;
@@ -0,0 +1,2 @@
1
+
2
+ export type GistingTrainingConfigurationGistTokens = 8 | 32 | 64;
@@ -1,6 +1,7 @@
1
1
  import type { TrainingModelSource } from './trainingModelSource';
2
2
  import type { TrainingDatasetSelectionInput } from './trainingDatasetSelectionInput';
3
- import type { GistingTrainingConfigurationInputRegime } from './gistingTrainingConfigurationInputRegime';
3
+ import type { GistingTrainingConfigurationInputGistTokens } from './gistingTrainingConfigurationInputGistTokens';
4
+ import type { GistingTrainingConfigurationInputBatchSize } from './gistingTrainingConfigurationInputBatchSize';
4
5
 
5
6
  export interface GistingTrainingConfigurationInput {
6
7
  method: 'gisting';
@@ -8,6 +9,9 @@ export interface GistingTrainingConfigurationInput {
8
9
  training: TrainingDatasetSelectionInput;
9
10
  validation?: TrainingDatasetSelectionInput;
10
11
  promptFileId: string;
11
- regime?: GistingTrainingConfigurationInputRegime;
12
+ gistTokens?: GistingTrainingConfigurationInputGistTokens;
12
13
  epochs?: number;
14
+ learningRate?: number;
15
+ batchSize?: GistingTrainingConfigurationInputBatchSize;
16
+ maxSequenceLength?: number;
13
17
  }
@@ -0,0 +1,2 @@
1
+
2
+ export type GistingTrainingConfigurationInputBatchSize = 8 | 16 | 32 | 64;
@@ -0,0 +1,2 @@
1
+
2
+ export type GistingTrainingConfigurationInputGistTokens = 8 | 32 | 64;
@@ -110,6 +110,7 @@ export * from './createTrainingRunBody';
110
110
  export * from './createdDatasetFields';
111
111
  export * from './currentUser';
112
112
  export * from './currentUserEmail';
113
+ export * from './currentUserTeamsItem';
113
114
  export * from './dataset';
114
115
  export * from './datasetExportReport';
115
116
  export * from './datasetExportReportErrorsItem';
@@ -264,9 +265,11 @@ export * from './getDatasetInferredFields200';
264
265
  export * from './getTrainingRunLogsParams';
265
266
  export * from './getTrainingRunMetricHistoryParams';
266
267
  export * from './gistingTrainingConfiguration';
268
+ export * from './gistingTrainingConfigurationBatchSize';
269
+ export * from './gistingTrainingConfigurationGistTokens';
267
270
  export * from './gistingTrainingConfigurationInput';
268
- export * from './gistingTrainingConfigurationInputRegime';
269
- export * from './gistingTrainingConfigurationRegime';
271
+ export * from './gistingTrainingConfigurationInputBatchSize';
272
+ export * from './gistingTrainingConfigurationInputGistTokens';
270
273
  export * from './importPipelineBody';
271
274
  export * from './inferredField';
272
275
  export * from './inferredFieldJsonSchema';
@@ -821,9 +824,11 @@ export * from './sampleJobStatus';
821
824
  export * from './sampleResult';
822
825
  export * from './setProjectSecretBody';
823
826
  export * from './sftTrainingConfiguration';
827
+ export * from './sftTrainingConfigurationBatchSize';
824
828
  export * from './sftTrainingConfigurationInput';
825
- export * from './sftTrainingConfigurationInputRegime';
826
- export * from './sftTrainingConfigurationRegime';
829
+ export * from './sftTrainingConfigurationInputBatchSize';
830
+ export * from './sftTrainingConfigurationInputLoraRank';
831
+ export * from './sftTrainingConfigurationLoraRank';
827
832
  export * from './training';
828
833
  export * from './trainingArchivedAt';
829
834
  export * from './trainingConfiguration';
@@ -1,13 +1,16 @@
1
1
  import type { TrainingModelSource } from './trainingModelSource';
2
2
  import type { TrainingDatasetSelection } from './trainingDatasetSelection';
3
- import type { SftTrainingConfigurationRegime } from './sftTrainingConfigurationRegime';
3
+ import type { SftTrainingConfigurationLoraRank } from './sftTrainingConfigurationLoraRank';
4
+ import type { SftTrainingConfigurationBatchSize } from './sftTrainingConfigurationBatchSize';
4
5
 
5
6
  export interface SftTrainingConfiguration {
6
7
  method: 'sft';
7
8
  source: TrainingModelSource;
8
9
  training: TrainingDatasetSelection;
9
10
  validation?: TrainingDatasetSelection;
10
- regime: SftTrainingConfigurationRegime;
11
+ loraRank: SftTrainingConfigurationLoraRank;
11
12
  epochs: number;
12
- evalSteps: number;
13
+ learningRate: number;
14
+ batchSize: SftTrainingConfigurationBatchSize;
15
+ maxSequenceLength: number;
13
16
  }
@@ -0,0 +1,2 @@
1
+
2
+ export type SftTrainingConfigurationBatchSize = 8 | 16 | 32 | 64;
@@ -1,13 +1,16 @@
1
1
  import type { TrainingModelSource } from './trainingModelSource';
2
2
  import type { TrainingDatasetSelectionInput } from './trainingDatasetSelectionInput';
3
- import type { SftTrainingConfigurationInputRegime } from './sftTrainingConfigurationInputRegime';
3
+ import type { SftTrainingConfigurationInputLoraRank } from './sftTrainingConfigurationInputLoraRank';
4
+ import type { SftTrainingConfigurationInputBatchSize } from './sftTrainingConfigurationInputBatchSize';
4
5
 
5
6
  export interface SftTrainingConfigurationInput {
6
7
  method: 'sft';
7
8
  source: TrainingModelSource;
8
9
  training: TrainingDatasetSelectionInput;
9
10
  validation?: TrainingDatasetSelectionInput;
10
- regime?: SftTrainingConfigurationInputRegime;
11
+ loraRank?: SftTrainingConfigurationInputLoraRank;
11
12
  epochs?: number;
12
- evalSteps?: number;
13
+ learningRate?: number;
14
+ batchSize?: SftTrainingConfigurationInputBatchSize;
15
+ maxSequenceLength?: number;
13
16
  }
@@ -0,0 +1,2 @@
1
+
2
+ export type SftTrainingConfigurationInputBatchSize = 8 | 16 | 32 | 64;
@@ -0,0 +1,2 @@
1
+
2
+ export type SftTrainingConfigurationInputLoraRank = 8 | 16 | 32;
@@ -0,0 +1,2 @@
1
+
2
+ export type SftTrainingConfigurationLoraRank = 8 | 16 | 32;
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "@toloka-platform/sdk",
3
- "version": "0.2.0-preview.3",
3
+ "version": "0.2.0",
4
4
  "private": false,
5
- "description": "Beta. Build, inspect, and operate Toloka pipeline projects as TypeScript source. The public API may change.",
5
+ "description": "Build, inspect, and operate Toloka pipeline projects as TypeScript source. The public API may change between minor versions before 1.0.",
6
6
  "license": "Apache-2.0",
7
7
  "bin": {
8
8
  "toloka": "bin/toloka.js"
@@ -11,8 +11,8 @@
11
11
  "testing",
12
12
  "checks"
13
13
  ],
14
- "version": "0.2.0-preview.3",
15
- "digest": "b5819b5f29ed0876850708e3fbe9b370433ddf68d9548260cf24ff7200104bb6",
14
+ "version": "0.2.0",
15
+ "digest": "d1475f85dad9f81a8a0321778466ca21e2c93f04094f402a4ad83ac92641b99c",
16
16
  "files": [
17
17
  "SKILL.md",
18
18
  "references/node-semantics.md",
@@ -29,8 +29,8 @@
29
29
  "bug",
30
30
  "report"
31
31
  ],
32
- "version": "0.2.0-preview.3",
33
- "digest": "76229bae596f8a1722ce7fc55bea3dd66698df5b61baa31f6cb98ca2b5fa03e8",
32
+ "version": "0.2.0",
33
+ "digest": "56a0c283649052c85ba882f05d4a996bd98bf1bc011bc7a70af234b3664057d6",
34
34
  "files": [
35
35
  "SKILL.md",
36
36
  "references/report-template.md"
@@ -39,15 +39,15 @@
39
39
  {
40
40
  "id": "toloka-get-started",
41
41
  "name": "Get started with Toloka",
42
- "description": "Route a first Toloka agent session to the correct workflow and establish safe CLI, authentication, project, and approval checkpoints. Use when the user is new to Toloka, asks what to do first, or has not selected a pipeline, fine-tuning, or gisting workflow.",
42
+ "description": "Orient a Toloka session to the user's outcome and safely reuse or establish the needed CLI, authentication, project, workflow, and approval context. Use when the user is new to Toloka, asks what to do first, or has not selected a pipeline, fine-tuning, or gisting workflow.",
43
43
  "tags": [
44
44
  "toloka",
45
45
  "onboarding",
46
46
  "getting-started",
47
47
  "agent"
48
48
  ],
49
- "version": "0.2.0-preview.3",
50
- "digest": "7e5e2d4b8daab4abece217ca2a00f76ce4e29da6a2724a44a91ff3dc63aec38a",
49
+ "version": "0.2.0",
50
+ "digest": "61a3cf60f0b7d00e48c9663ed6e0e3d77fd3923e528cee52e16ef6e2ccebae69",
51
51
  "files": [
52
52
  "SKILL.md"
53
53
  ]
@@ -63,8 +63,8 @@
63
63
  "sft",
64
64
  "models"
65
65
  ],
66
- "version": "0.2.0-preview.3",
67
- "digest": "967a3e862d4a79f6e6462f2ab6d03241b45c24f5ae5550a453259f01289eb85e",
66
+ "version": "0.2.0",
67
+ "digest": "ee961e8daea643998b00918055214316e27ab99b43c1015c0af24f86deb97502",
68
68
  "files": [
69
69
  "SKILL.md"
70
70
  ]
@@ -80,8 +80,8 @@
80
80
  "prompt",
81
81
  "models"
82
82
  ],
83
- "version": "0.2.0-preview.3",
84
- "digest": "e7f714ec5681648cba092a1ed737f2e6431da1da47f8f3553c4d774777af644a",
83
+ "version": "0.2.0",
84
+ "digest": "2dd5dc9aef29c7f2840b1047ac2c03d4f096bfdba62db72e848c4051b5481bed",
85
85
  "files": [
86
86
  "SKILL.md"
87
87
  ]