bios-sdk 0.1.1-dev.16 → 0.1.1-dev.17
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/resources/training.d.ts +26 -6
- package/dist/resources/training.js +25 -5
- package/dist/types.d.ts +2 -2
- package/package.json +1 -1
|
@@ -10,11 +10,26 @@ export declare class Training {
|
|
|
10
10
|
/** Return the authoritative BIOS image, method, adapter, and hyperparameter contract. */
|
|
11
11
|
capabilities(): Promise<TrainingCapabilities>;
|
|
12
12
|
/**
|
|
13
|
-
* Create a new training job.
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
* training
|
|
17
|
-
*
|
|
13
|
+
* Create a new training job (book-before-reveal).
|
|
14
|
+
*
|
|
15
|
+
* The call blocks while the ranked GPU ladder is booked (~40s typical). A
|
|
16
|
+
* training id and the "training started" email exist only once a real pod is
|
|
17
|
+
* secured, so the returned `status` is one of:
|
|
18
|
+
*
|
|
19
|
+
* - `"booked"` — a GPU was secured (booked == secured); the job then
|
|
20
|
+
* progresses through provisioning, downloading, and running on its own.
|
|
21
|
+
* - `"securing"` — still booking at the deadline; the async tail continues.
|
|
22
|
+
* Poll {@link get} until it reaches `booked`/`running` (or terminal).
|
|
23
|
+
* Nothing is charged until a pod is real.
|
|
24
|
+
* - `"queued"` — returned only with explicit queue consent
|
|
25
|
+
* (`queueIfUnavailable: true`); waits for stock at zero charge and books
|
|
26
|
+
* via the same path.
|
|
27
|
+
*
|
|
28
|
+
* If the ladder is exhausted at booking time without queue consent, this
|
|
29
|
+
* rejects with a `CAPACITY_UNAVAILABLE` (HTTP 409) carrying neutral
|
|
30
|
+
* alternatives — no phantom job remains and nothing is billed. The SDK never
|
|
31
|
+
* auto-substitutes a GPU; a transient 503 is a retry, never a capacity
|
|
32
|
+
* verdict.
|
|
18
33
|
*
|
|
19
34
|
* @example
|
|
20
35
|
* ```ts
|
|
@@ -120,7 +135,12 @@ export declare class Training {
|
|
|
120
135
|
*/
|
|
121
136
|
stop(id: string, keepData?: boolean): Promise<TrainingStopResponse>;
|
|
122
137
|
/**
|
|
123
|
-
* Resume a stopped training job from its last checkpoint.
|
|
138
|
+
* Resume a stopped or `interrupted` training job from its last checkpoint.
|
|
139
|
+
*
|
|
140
|
+
* Use this on a `stopped` job, or one resting at `interrupted` — the
|
|
141
|
+
* self-heal state a started job enters when its pod is lost and billing has
|
|
142
|
+
* already been stopped (distinct from `failed`). Resume re-books on secured
|
|
143
|
+
* capacity before reporting resumed, so book-before-reveal still applies.
|
|
124
144
|
*
|
|
125
145
|
* @param id - Training job ID.
|
|
126
146
|
*
|
|
@@ -191,11 +191,26 @@ export class Training {
|
|
|
191
191
|
return this._http.fetchGet('/api/training/capabilities');
|
|
192
192
|
}
|
|
193
193
|
/**
|
|
194
|
-
* Create a new training job.
|
|
194
|
+
* Create a new training job (book-before-reveal).
|
|
195
195
|
*
|
|
196
|
-
*
|
|
197
|
-
* training
|
|
198
|
-
*
|
|
196
|
+
* The call blocks while the ranked GPU ladder is booked (~40s typical). A
|
|
197
|
+
* training id and the "training started" email exist only once a real pod is
|
|
198
|
+
* secured, so the returned `status` is one of:
|
|
199
|
+
*
|
|
200
|
+
* - `"booked"` — a GPU was secured (booked == secured); the job then
|
|
201
|
+
* progresses through provisioning, downloading, and running on its own.
|
|
202
|
+
* - `"securing"` — still booking at the deadline; the async tail continues.
|
|
203
|
+
* Poll {@link get} until it reaches `booked`/`running` (or terminal).
|
|
204
|
+
* Nothing is charged until a pod is real.
|
|
205
|
+
* - `"queued"` — returned only with explicit queue consent
|
|
206
|
+
* (`queueIfUnavailable: true`); waits for stock at zero charge and books
|
|
207
|
+
* via the same path.
|
|
208
|
+
*
|
|
209
|
+
* If the ladder is exhausted at booking time without queue consent, this
|
|
210
|
+
* rejects with a `CAPACITY_UNAVAILABLE` (HTTP 409) carrying neutral
|
|
211
|
+
* alternatives — no phantom job remains and nothing is billed. The SDK never
|
|
212
|
+
* auto-substitutes a GPU; a transient 503 is a retry, never a capacity
|
|
213
|
+
* verdict.
|
|
199
214
|
*
|
|
200
215
|
* @example
|
|
201
216
|
* ```ts
|
|
@@ -363,7 +378,12 @@ export class Training {
|
|
|
363
378
|
return this._http.fetchPost(`/api/training/jobs/${encodeURIComponent(id)}/stop`, { keep_data: keepData });
|
|
364
379
|
}
|
|
365
380
|
/**
|
|
366
|
-
* Resume a stopped training job from its last checkpoint.
|
|
381
|
+
* Resume a stopped or `interrupted` training job from its last checkpoint.
|
|
382
|
+
*
|
|
383
|
+
* Use this on a `stopped` job, or one resting at `interrupted` — the
|
|
384
|
+
* self-heal state a started job enters when its pod is lost and billing has
|
|
385
|
+
* already been stopped (distinct from `failed`). Resume re-books on secured
|
|
386
|
+
* capacity before reporting resumed, so book-before-reveal still applies.
|
|
367
387
|
*
|
|
368
388
|
* @param id - Training job ID.
|
|
369
389
|
*
|
package/dist/types.d.ts
CHANGED
|
@@ -389,9 +389,9 @@ export type RLHFAlgorithm = 'dpo' | 'simpo' | 'cpo' | 'orpo' | 'kto' | 'rm';
|
|
|
389
389
|
/** Supported adapter types. */
|
|
390
390
|
export type AdapterType = 'lora' | 'qlora' | 'adalora' | 'full' | 'loha' | 'lokr' | 'boft' | 'oft' | 'vera' | 'fourierft' | 'bone' | 'adapter' | 'reft' | 'llamapro' | 'longlora';
|
|
391
391
|
/** Training job status values. */
|
|
392
|
-
export type TrainingJobStatus = 'pending' | 'queued' | 'provisioning' | 'preparing' | 'starting' | 'downloading' | 'running' | 'completed' | 'failed' | 'saving' | 'stopped' | 'stopping' | 'resuming' | 'cancelled';
|
|
392
|
+
export type TrainingJobStatus = 'pending' | 'queued' | 'securing' | 'booked' | 'provisioning' | 'preparing' | 'starting' | 'downloading' | 'running' | 'completed' | 'failed' | 'interrupted' | 'saving' | 'stopped' | 'stopping' | 'resuming' | 'cancelled';
|
|
393
393
|
/** Status values accepted by GET /api/training/jobs?status=. */
|
|
394
|
-
export type TrainingStatusFilter = 'pending' | 'queued' | 'provisioning' | 'preparing' | 'starting' | 'running' | 'saving' | 'completed' | 'failed' | 'stopped';
|
|
394
|
+
export type TrainingStatusFilter = 'pending' | 'queued' | 'securing' | 'booked' | 'provisioning' | 'preparing' | 'starting' | 'running' | 'interrupted' | 'saving' | 'completed' | 'failed' | 'stopped';
|
|
395
395
|
/** One ranked GPU fallback choice. The first choice is the primary. */
|
|
396
396
|
export interface GPUChoice {
|
|
397
397
|
gpuType: string;
|