runbios-sdk 0.3.0-dev.323 → 0.3.0-dev.326
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/client.d.ts +13 -5
- package/dist/client.js +13 -5
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/types.d.ts +52 -11
- package/package.json +1 -1
package/dist/client.d.ts
CHANGED
|
@@ -130,17 +130,25 @@ export type CapacityUnavailableError = GpuRejectionError;
|
|
|
130
130
|
* (HTTP 403): TRAINING_COMING_SOON from POST /api/training/jobs,
|
|
131
131
|
* DATASETS_COMING_SOON from the dataset creation endpoints (upload,
|
|
132
132
|
* uploads/initiate, register-hf, integration import), and LOOP_COMING_SOON
|
|
133
|
-
* from
|
|
134
|
-
*
|
|
133
|
+
* from the Conscious Loop routes (`client.loop.*`) where the platform has the
|
|
134
|
+
* loop switched off — every one of them but the five that let a member stop
|
|
135
|
+
* paying (see {@link ComingSoonError}).
|
|
135
136
|
*/
|
|
136
137
|
export declare const COMING_SOON_CODES: readonly ["TRAINING_COMING_SOON", "DATASETS_COMING_SOON", "LOOP_COMING_SOON"];
|
|
137
138
|
/**
|
|
138
139
|
* Raised when a pre-launch surface rejects a call: fine-tuning and datasets
|
|
139
140
|
* launch soon, so training.create and dataset upload/import/register answer 403
|
|
140
141
|
* with one of {@link COMING_SOON_CODES}, and their read and lifecycle methods
|
|
141
|
-
* (list, get, status, stop, resume, delete, preview) are unaffected.
|
|
142
|
-
*
|
|
143
|
-
*
|
|
142
|
+
* (list, get, status, stop, resume, delete, preview) are unaffected. Where
|
|
143
|
+
* the platform has the Conscious Loop switched off, every `client.loop.*`
|
|
144
|
+
* method answers LOOP_COMING_SOON, reads included, except the five a member
|
|
145
|
+
* needs to stop paying, which answer as usual: listing pipelines
|
|
146
|
+
* (GET /api/loop/pipelines), reading one (GET /api/loop/pipelines/{id}),
|
|
147
|
+
* switching one off (PUT /api/loop/pipelines/{id} whose body is only
|
|
148
|
+
* `{"enabled": false}`, with at most `expected_revision` and `workspace_id`),
|
|
149
|
+
* deleting one, which stops its live version and removes its data
|
|
150
|
+
* (DELETE /api/loop/pipelines/{id}), and cancelling an attempt
|
|
151
|
+
* (POST /api/loop/training-runs/{id}/cancel).
|
|
144
152
|
*
|
|
145
153
|
* The service is the authority: the SDK never blocks client-side, so when the
|
|
146
154
|
* gate lifts at launch every SDK version works again without an upgrade. This
|
package/dist/client.js
CHANGED
|
@@ -198,17 +198,25 @@ export const CapacityUnavailableError = GpuRejectionError;
|
|
|
198
198
|
* (HTTP 403): TRAINING_COMING_SOON from POST /api/training/jobs,
|
|
199
199
|
* DATASETS_COMING_SOON from the dataset creation endpoints (upload,
|
|
200
200
|
* uploads/initiate, register-hf, integration import), and LOOP_COMING_SOON
|
|
201
|
-
* from
|
|
202
|
-
*
|
|
201
|
+
* from the Conscious Loop routes (`client.loop.*`) where the platform has the
|
|
202
|
+
* loop switched off — every one of them but the five that let a member stop
|
|
203
|
+
* paying (see {@link ComingSoonError}).
|
|
203
204
|
*/
|
|
204
205
|
export const COMING_SOON_CODES = ['TRAINING_COMING_SOON', 'DATASETS_COMING_SOON', 'LOOP_COMING_SOON'];
|
|
205
206
|
/**
|
|
206
207
|
* Raised when a pre-launch surface rejects a call: fine-tuning and datasets
|
|
207
208
|
* launch soon, so training.create and dataset upload/import/register answer 403
|
|
208
209
|
* with one of {@link COMING_SOON_CODES}, and their read and lifecycle methods
|
|
209
|
-
* (list, get, status, stop, resume, delete, preview) are unaffected.
|
|
210
|
-
*
|
|
211
|
-
*
|
|
210
|
+
* (list, get, status, stop, resume, delete, preview) are unaffected. Where
|
|
211
|
+
* the platform has the Conscious Loop switched off, every `client.loop.*`
|
|
212
|
+
* method answers LOOP_COMING_SOON, reads included, except the five a member
|
|
213
|
+
* needs to stop paying, which answer as usual: listing pipelines
|
|
214
|
+
* (GET /api/loop/pipelines), reading one (GET /api/loop/pipelines/{id}),
|
|
215
|
+
* switching one off (PUT /api/loop/pipelines/{id} whose body is only
|
|
216
|
+
* `{"enabled": false}`, with at most `expected_revision` and `workspace_id`),
|
|
217
|
+
* deleting one, which stops its live version and removes its data
|
|
218
|
+
* (DELETE /api/loop/pipelines/{id}), and cancelling an attempt
|
|
219
|
+
* (POST /api/loop/training-runs/{id}/cancel).
|
|
212
220
|
*
|
|
213
221
|
* The service is the authority: the SDK never blocks client-side, so when the
|
|
214
222
|
* gate lifts at launch every SDK version works again without an upgrade. This
|
package/dist/index.d.ts
CHANGED
|
@@ -36,7 +36,7 @@ import { Loop } from './resources/loop.js';
|
|
|
36
36
|
* SDK version. Sent as part of the User-Agent header.
|
|
37
37
|
* Must match package.json "version" -- enforced by a contract test.
|
|
38
38
|
*/
|
|
39
|
-
export declare const VERSION = "0.3.0-dev.
|
|
39
|
+
export declare const VERSION = "0.3.0-dev.326";
|
|
40
40
|
export declare class RunBiOS {
|
|
41
41
|
/** Search models, fetch configs, check adapter compatibility. */
|
|
42
42
|
readonly models: Models;
|
package/dist/index.js
CHANGED
|
@@ -36,7 +36,7 @@ import { Loop } from './resources/loop.js';
|
|
|
36
36
|
* SDK version. Sent as part of the User-Agent header.
|
|
37
37
|
* Must match package.json "version" -- enforced by a contract test.
|
|
38
38
|
*/
|
|
39
|
-
export const VERSION = '0.3.0-dev.
|
|
39
|
+
export const VERSION = '0.3.0-dev.326';
|
|
40
40
|
export class RunBiOS {
|
|
41
41
|
/** Search models, fetch configs, check adapter compatibility. */
|
|
42
42
|
models;
|
package/dist/types.d.ts
CHANGED
|
@@ -3042,9 +3042,10 @@ export type TrainingRulePausedReason = 'consent_invalid' | 'insufficient_funds'
|
|
|
3042
3042
|
/** A peer was unreachable when the rule was saved, so it has not been validated yet. */
|
|
3043
3043
|
| 'validation_pending'
|
|
3044
3044
|
/**
|
|
3045
|
-
*
|
|
3046
|
-
*
|
|
3047
|
-
*
|
|
3045
|
+
* The platform's training service refused an attempt with its pre-launch
|
|
3046
|
+
* gate while the platform's services were being updated (the Conscious Loop
|
|
3047
|
+
* trains for every organisation, so nothing else gives this). Nothing on the
|
|
3048
|
+
* pipeline is wrong; switching it back on starts it again.
|
|
3048
3049
|
*/
|
|
3049
3050
|
| 'training_not_enabled';
|
|
3050
3051
|
/**
|
|
@@ -3277,11 +3278,20 @@ export interface TrainingRun {
|
|
|
3277
3278
|
next_poll_at: string | null;
|
|
3278
3279
|
last_reason: string | null;
|
|
3279
3280
|
/**
|
|
3280
|
-
* Why it failed or was set aside, as a code.
|
|
3281
|
+
* Why it failed or was set aside, as a code. Three belong to a pipeline that
|
|
3281
3282
|
* builds on its live version: `CHAIN_MOVED` (it was built on a version that
|
|
3282
3283
|
* was rolled back while it trained; it is superseded, no comparison was
|
|
3283
|
-
* paid for, and its samples go to the next attempt)
|
|
3284
|
-
* (its training finished without the merged model it is served as)
|
|
3284
|
+
* paid for, and its samples go to the next attempt), `NO_MERGED_EXPORT`
|
|
3285
|
+
* (its training finished without the merged model it is served as) and
|
|
3286
|
+
* `TRAINING_SERVICE_BEHIND` (the platform's training service was being
|
|
3287
|
+
* updated when it asked for its training, so it stopped before any
|
|
3288
|
+
* training started; nothing was charged and the next attempt asks again).
|
|
3289
|
+
* `STEP_STALLED:TRAINING_SERVICE_BEHIND` is the same for one that waited
|
|
3290
|
+
* six hours for that update; the pipeline tries again on its own.
|
|
3291
|
+
* `ENV_GATED:SWITCHED_OFF`: the Conscious Loop was switched off on the
|
|
3292
|
+
* platform before its training started, so it stopped there; no GPU time
|
|
3293
|
+
* was charged, and the pipeline trains again on its own once the loop is
|
|
3294
|
+
* back.
|
|
3285
3295
|
*/
|
|
3286
3296
|
error_code: string | null;
|
|
3287
3297
|
last_error: string | null;
|
|
@@ -3306,6 +3316,15 @@ export interface TrainingRun {
|
|
|
3306
3316
|
* cap when no placement price was reported).
|
|
3307
3317
|
*/
|
|
3308
3318
|
billed_candidate_up_to: boolean;
|
|
3319
|
+
/**
|
|
3320
|
+
* What was taken off for comparison machines that never started (never
|
|
3321
|
+
* reached running): the platform charged nothing for them, so neither does
|
|
3322
|
+
* the attempt -- say "Comparison machine: not charged (it never started)",
|
|
3323
|
+
* or, while a comparison machine that ran is still charged beside it, that
|
|
3324
|
+
* the one that never started was not charged. 0 when none; the cost figures
|
|
3325
|
+
* beside it are already net of it.
|
|
3326
|
+
*/
|
|
3327
|
+
comparison_returned_cents: number;
|
|
3309
3328
|
spent_eval_cents: number;
|
|
3310
3329
|
train_rows: number | null;
|
|
3311
3330
|
holdout_rows: number | null;
|
|
@@ -3360,6 +3379,12 @@ export interface TrainingRun {
|
|
|
3360
3379
|
* machine bills beside it), so the attempt can stay in candidate_booking
|
|
3361
3380
|
* past this time, by at most one more window. An attempt that ran out
|
|
3362
3381
|
* gives the deadline it was held to on its expiry event (deadline_at).
|
|
3382
|
+
* Null while the machine has never had a GPU: that wait is free and its
|
|
3383
|
+
* `last_reason` says since when. A day after the machine was booked with no
|
|
3384
|
+
* GPU it is stopped (never started, not charged) and the attempt waits for
|
|
3385
|
+
* GPUs (`waiting_gpus`) keeping its trained model, then books the machine
|
|
3386
|
+
* again; if no GPU is free by that wait's end too, the attempt ends
|
|
3387
|
+
* (`expired`, `CANDIDATE_NOT_STARTED:NO_GPU`).
|
|
3363
3388
|
*/
|
|
3364
3389
|
candidate_deadline_at: string | null;
|
|
3365
3390
|
candidate_cleanup_at: string | null;
|
|
@@ -3421,6 +3446,8 @@ export interface TrainingRunSummary {
|
|
|
3421
3446
|
billed_candidate_cents: number;
|
|
3422
3447
|
/** See {@link TrainingRun.billed_candidate_up_to}. */
|
|
3423
3448
|
billed_candidate_up_to: boolean;
|
|
3449
|
+
/** See {@link TrainingRun.comparison_returned_cents}. */
|
|
3450
|
+
comparison_returned_cents: number;
|
|
3424
3451
|
spent_eval_cents: number;
|
|
3425
3452
|
/** The fourth money column. A row that leaves it out adds up short. */
|
|
3426
3453
|
benchmark_spent_cents: number;
|
|
@@ -4130,11 +4157,14 @@ export type TrainingRuleRunRefusalCode = 'NOT_ENOUGH_SAMPLES' | 'PIPELINE_NEEDS_
|
|
|
4130
4157
|
* benchmark the pipeline does not have yet.
|
|
4131
4158
|
*
|
|
4132
4159
|
* The platform:
|
|
4133
|
-
* - `TRAINING_NOT_ENABLED` (409):
|
|
4134
|
-
*
|
|
4135
|
-
*
|
|
4136
|
-
*
|
|
4137
|
-
*
|
|
4160
|
+
* - `TRAINING_NOT_ENABLED` (409): the platform's training service would not
|
|
4161
|
+
* take the pipeline's training while the platform was being updated (the
|
|
4162
|
+
* Conscious Loop trains for every organisation; this answer only appears
|
|
4163
|
+
* while the platform's services are being updated). Nothing was saved and
|
|
4164
|
+
* nothing in the request is wrong: try again in a few minutes. A pipeline
|
|
4165
|
+
* that meets it at fire time is paused `training_not_enabled` instead (see
|
|
4166
|
+
* {@link TrainingRulePausedReason}); switching it back on later starts it
|
|
4167
|
+
* again.
|
|
4138
4168
|
* - `METHOD_NOT_ENABLED` (422): the platform has switched off the training
|
|
4139
4169
|
* method pipelines train with.
|
|
4140
4170
|
* - `CEILING_TOO_LOW` (422): the platform's own runaway limits cannot cover
|
|
@@ -4205,6 +4235,8 @@ export interface PipelineActiveRun {
|
|
|
4205
4235
|
* the most it can have cost, so show it as "up to".
|
|
4206
4236
|
*/
|
|
4207
4237
|
cost_up_to: boolean;
|
|
4238
|
+
/** See {@link TrainingRun.comparison_returned_cents}. */
|
|
4239
|
+
comparison_returned_cents: number;
|
|
4208
4240
|
/** The version number it will take if it is put live. */
|
|
4209
4241
|
will_be_version: number;
|
|
4210
4242
|
/** Always null: nothing in flight is a version yet. */
|
|
@@ -4352,6 +4384,8 @@ export interface PipelineAttempt {
|
|
|
4352
4384
|
cost_cents: number;
|
|
4353
4385
|
/** See {@link PipelineVersion.cost_up_to}. */
|
|
4354
4386
|
cost_up_to: boolean;
|
|
4387
|
+
/** See {@link TrainingRun.comparison_returned_cents}. */
|
|
4388
|
+
comparison_returned_cents: number;
|
|
4355
4389
|
verdict: TrainingVerdict | null;
|
|
4356
4390
|
win_rate: number | null;
|
|
4357
4391
|
/**
|
|
@@ -4768,6 +4802,13 @@ export interface TrainingRunCost {
|
|
|
4768
4802
|
benchmark_cents: number;
|
|
4769
4803
|
total_cents: number;
|
|
4770
4804
|
up_to: boolean;
|
|
4805
|
+
/**
|
|
4806
|
+
* What was taken off `comparison_cents` for comparison machines that never
|
|
4807
|
+
* started: "Comparison machine: not charged (it never started)" (with
|
|
4808
|
+
* `comparison_cents` above 0, only the one that never started). 0 when
|
|
4809
|
+
* none.
|
|
4810
|
+
*/
|
|
4811
|
+
comparison_returned_cents: number;
|
|
4771
4812
|
}
|
|
4772
4813
|
export interface TrainingRunActionResponse {
|
|
4773
4814
|
run: TrainingRun;
|