runbios-sdk 0.2.7 → 0.2.8-dev.210
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.js +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/resources/gpu-priorities.d.ts +3 -2
- package/dist/resources/gpu-priorities.js +6 -5
- package/dist/resources/inference.js +1 -1
- package/dist/resources/training.js +1 -1
- package/dist/types.d.ts +4 -4
- package/package.json +1 -1
package/dist/client.js
CHANGED
|
@@ -340,7 +340,7 @@ export class HttpClient {
|
|
|
340
340
|
constructor(config) {
|
|
341
341
|
// Default host stays api.runbios.ai for now; cutover to api.runbios.ai is
|
|
342
342
|
// planned once its DNS exists.
|
|
343
|
-
this.baseUrl = (config.baseUrl || envBaseUrl() || 'https://api.runbios.ai').replace(/\/+$/, '');
|
|
343
|
+
this.baseUrl = (config.baseUrl || envBaseUrl() || 'https://api-dev.runbios.ai').replace(/\/+$/, '');
|
|
344
344
|
this.apiKey = config.apiKey ?? envApiKey();
|
|
345
345
|
this.accessToken = config.accessToken;
|
|
346
346
|
this.orgId = config.orgId;
|
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.2.
|
|
39
|
+
export declare const VERSION = "0.2.8-dev.210";
|
|
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.2.
|
|
39
|
+
export const VERSION = '0.2.8-dev.210';
|
|
40
40
|
export class RunBiOS {
|
|
41
41
|
/** Search models, fetch configs, check adapter compatibility. */
|
|
42
42
|
models;
|
|
@@ -18,6 +18,7 @@ export interface NormalizedGPUPlacement {
|
|
|
18
18
|
* become backups / the after-start replacement ladder (book-first §4 — backup
|
|
19
19
|
* rungs are decoupled from queue consent; the queue itself stays opt-in).
|
|
20
20
|
* With `rankedImmediate=false` a non-queued launch still needs exactly one
|
|
21
|
-
* choice.
|
|
21
|
+
* choice. Training queueing accepts 1 to 5 choices; deployment queueing keeps
|
|
22
|
+
* its 3 to 5 resilience ladder.
|
|
22
23
|
*/
|
|
23
|
-
export declare function normalizeGPUPlacement(choices: GPUChoice[] | undefined, queueEnabled: boolean, gpuType: string | undefined, gpuCount: number | undefined, queueField: 'queueIfUnavailable' | 'allowCapacityQueue', rankedImmediate?: boolean): NormalizedGPUPlacement;
|
|
24
|
+
export declare function normalizeGPUPlacement(choices: GPUChoice[] | undefined, queueEnabled: boolean, gpuType: string | undefined, gpuCount: number | undefined, queueField: 'queueIfUnavailable' | 'allowCapacityQueue', rankedImmediate?: boolean, minQueuedChoices?: number): NormalizedGPUPlacement;
|
|
@@ -6,12 +6,13 @@
|
|
|
6
6
|
* become backups / the after-start replacement ladder (book-first §4 — backup
|
|
7
7
|
* rungs are decoupled from queue consent; the queue itself stays opt-in).
|
|
8
8
|
* With `rankedImmediate=false` a non-queued launch still needs exactly one
|
|
9
|
-
* choice.
|
|
9
|
+
* choice. Training queueing accepts 1 to 5 choices; deployment queueing keeps
|
|
10
|
+
* its 3 to 5 resilience ladder.
|
|
10
11
|
*/
|
|
11
|
-
export function normalizeGPUPlacement(choices, queueEnabled, gpuType, gpuCount, queueField, rankedImmediate = false) {
|
|
12
|
+
export function normalizeGPUPlacement(choices, queueEnabled, gpuType, gpuCount, queueField, rankedImmediate = false, minQueuedChoices = 3) {
|
|
12
13
|
if (choices === undefined) {
|
|
13
14
|
if (queueEnabled) {
|
|
14
|
-
throw new Error(`RunBiOS: ${queueField}=true requires
|
|
15
|
+
throw new Error(`RunBiOS: ${queueField}=true requires ${minQueuedChoices} to 5 gpuPriorities`);
|
|
15
16
|
}
|
|
16
17
|
return { priorities: undefined, gpuType, gpuCount };
|
|
17
18
|
}
|
|
@@ -21,8 +22,8 @@ export function normalizeGPUPlacement(choices, queueEnabled, gpuType, gpuCount,
|
|
|
21
22
|
if (choices.length > 5) {
|
|
22
23
|
throw new Error('RunBiOS: gpuPriorities accepts at most 5 choices');
|
|
23
24
|
}
|
|
24
|
-
if (queueEnabled && choices.length <
|
|
25
|
-
throw new Error(`RunBiOS: ${queueField}=true requires
|
|
25
|
+
if (queueEnabled && choices.length < minQueuedChoices) {
|
|
26
|
+
throw new Error(`RunBiOS: ${queueField}=true requires ${minQueuedChoices} to 5 gpuPriorities`);
|
|
26
27
|
}
|
|
27
28
|
if (!queueEnabled && !rankedImmediate && choices.length !== 1) {
|
|
28
29
|
throw new Error(`RunBiOS: gpuPriorities must contain exactly one choice when ${queueField} is false`);
|
|
@@ -326,7 +326,7 @@ export class Inference {
|
|
|
326
326
|
this.key = config.inferenceKey || envInferenceKey() || envApiKey();
|
|
327
327
|
// Same default host as HttpClient (api.runbios.ai); api.runbios.ai cutover
|
|
328
328
|
// is planned once its DNS exists — update both call sites together.
|
|
329
|
-
this.baseUrl = (config.baseUrl || envBaseUrl() || 'https://api.runbios.ai').replace(/\/+$/, '');
|
|
329
|
+
this.baseUrl = (config.baseUrl || envBaseUrl() || 'https://api-dev.runbios.ai').replace(/\/+$/, '');
|
|
330
330
|
this.timeout = config.timeout ?? 900_000;
|
|
331
331
|
this._http = http;
|
|
332
332
|
}
|
|
@@ -31,7 +31,7 @@ function buildTrainingRequest(params) {
|
|
|
31
31
|
if (params.modelRevision !== undefined)
|
|
32
32
|
body.model_revision = params.modelRevision;
|
|
33
33
|
const queueEnabled = params.queueIfUnavailable ?? false;
|
|
34
|
-
const placement = normalizeGPUPlacement(params.gpuPriorities, queueEnabled, params.gpuType, params.gpuCount, 'queueIfUnavailable');
|
|
34
|
+
const placement = normalizeGPUPlacement(params.gpuPriorities, queueEnabled, params.gpuType, params.gpuCount, 'queueIfUnavailable', true, 1);
|
|
35
35
|
body.queue_if_unavailable = queueEnabled;
|
|
36
36
|
if (params.queueDeadline !== undefined) {
|
|
37
37
|
const deadline = params.queueDeadline instanceof Date
|
package/dist/types.d.ts
CHANGED
|
@@ -8,13 +8,13 @@ export interface BiOSConfig {
|
|
|
8
8
|
orgId?: string;
|
|
9
9
|
/** Workspace ID. Optional when using API keys (resolved from the key). Can override for multi-workspace keys. */
|
|
10
10
|
workspaceId?: string;
|
|
11
|
-
/** Base URL for the API. Falls back to the RUNBIOS_BASE_URL environment variable (legacy: BIOS_BASE_URL), then the canonical https://api.runbios.ai hostname. */
|
|
11
|
+
/** Base URL for the API. Falls back to the RUNBIOS_BASE_URL environment variable (legacy: BIOS_BASE_URL), then the canonical https://api-dev.runbios.ai hostname. */
|
|
12
12
|
baseUrl?: string;
|
|
13
13
|
/** Request timeout in milliseconds. Defaults to 30000. */
|
|
14
14
|
timeout?: number;
|
|
15
15
|
/** Default per-deployment inference key. Can be overridden per inference call. */
|
|
16
16
|
inferenceKey?: string;
|
|
17
|
-
/** Inference base URL. Defaults to baseUrl, then https://api.runbios.ai. */
|
|
17
|
+
/** Inference base URL. Defaults to baseUrl, then https://api-dev.runbios.ai. */
|
|
18
18
|
inferenceBaseUrl?: string;
|
|
19
19
|
/** End-to-end inference timeout in milliseconds. Defaults to 15 minutes. */
|
|
20
20
|
inferenceTimeout?: number;
|
|
@@ -604,7 +604,7 @@ export interface TrainingCreateParams {
|
|
|
604
604
|
gpuCount?: number;
|
|
605
605
|
/** Primary and backup GPU choices, in priority order (maximum five). */
|
|
606
606
|
gpuPriorities?: GPUChoice[];
|
|
607
|
-
/** Consent to
|
|
607
|
+
/** Consent to queue for one exact shape or up to five ranked training choices. */
|
|
608
608
|
queueIfUnavailable?: boolean;
|
|
609
609
|
/** Optional RFC 3339 queue deadline, from one minute through seven days in the future. */
|
|
610
610
|
queueDeadline?: string | Date;
|
|
@@ -1513,7 +1513,7 @@ export interface InferenceCreateParams {
|
|
|
1513
1513
|
supportsImages?: boolean;
|
|
1514
1514
|
gpuType: string;
|
|
1515
1515
|
gpuCount: number;
|
|
1516
|
-
/** Primary plus ranked fallback GPU types; queueing requires 3-5 distinct types. */
|
|
1516
|
+
/** Primary plus ranked fallback GPU types; deployment queueing requires 3-5 distinct types. */
|
|
1517
1517
|
gpuPriorities?: GPUChoice[];
|
|
1518
1518
|
/** Deployment serving currently supports only the secure capacity tier. */
|
|
1519
1519
|
gpuTier?: 'secure';
|