runbios-sdk 0.2.6-dev.198 → 0.2.6
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/datasets.d.ts +1 -25
- package/dist/resources/datasets.js +0 -39
- package/dist/resources/inference.js +1 -1
- package/dist/types.d.ts +2 -17
- 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
|
|
343
|
+
this.baseUrl = (config.baseUrl || envBaseUrl() || 'https://api.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.6
|
|
39
|
+
export declare const VERSION = "0.2.6";
|
|
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.6
|
|
39
|
+
export const VERSION = '0.2.6';
|
|
40
40
|
export class RunBiOS {
|
|
41
41
|
/** Search models, fetch configs, check adapter compatibility. */
|
|
42
42
|
models;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { HttpClient } from '../client.js';
|
|
2
|
-
import type { Dataset, DatasetListParams, DatasetListResponse, DatasetUploadParams, DatasetPreview, DatasetPreviewParams, DatasetImportHFParams, DatasetRegisterHFParams,
|
|
2
|
+
import type { Dataset, DatasetListParams, DatasetListResponse, DatasetUploadParams, DatasetPreview, DatasetPreviewParams, DatasetImportHFParams, DatasetRegisterHFParams, DatasetHubSearchParams, DatasetHubPreviewParams, DatasetValidation, DatasetFormatSpecs, DatasetStorageUsage } from '../types.js';
|
|
3
3
|
/**
|
|
4
4
|
* Manage training datasets -- upload files, import from HuggingFace,
|
|
5
5
|
* preview contents, and manage storage.
|
|
@@ -118,30 +118,6 @@ export declare class Datasets {
|
|
|
118
118
|
* ```
|
|
119
119
|
*/
|
|
120
120
|
registerHuggingFace(params: DatasetRegisterHFParams | Record<string, unknown>): Promise<Dataset>;
|
|
121
|
-
/**
|
|
122
|
-
* Turn a curated Conscious Loop set into a dataset training can use.
|
|
123
|
-
*
|
|
124
|
-
* Without this, using a loop set from code meant downloading the JSONL and
|
|
125
|
-
* uploading it again as an unrelated dataset. That works, and it throws away
|
|
126
|
-
* the one thing that made the set worth having: which conversations, which
|
|
127
|
-
* verdicts and which judges produced it. Registering keeps that link.
|
|
128
|
-
*
|
|
129
|
-
* The set is then put through the SAME validation every uploaded dataset
|
|
130
|
-
* gets, so it comes back `processing` rather than ready -- poll
|
|
131
|
-
* {@link getStatus} before training on it. Registering the same set and split
|
|
132
|
-
* twice is refused rather than billed twice, and an empty set is refused
|
|
133
|
-
* rather than registered as something that would fail inside the trainer.
|
|
134
|
-
*
|
|
135
|
-
* @example
|
|
136
|
-
* ```ts
|
|
137
|
-
* const train = await client.datasets.registerLoop({
|
|
138
|
-
* loopDatasetId: 'd244894c-7ab4-4b3d-bfda-e0bb4c563ceb',
|
|
139
|
-
* name: 'extract-v1 distill SFT',
|
|
140
|
-
* split: 'train',
|
|
141
|
-
* });
|
|
142
|
-
* ```
|
|
143
|
-
*/
|
|
144
|
-
registerLoop(params: DatasetRegisterLoopParams | Record<string, unknown>): Promise<Dataset>;
|
|
145
121
|
/**
|
|
146
122
|
* Get the processing status of a dataset.
|
|
147
123
|
*
|
|
@@ -260,45 +260,6 @@ export class Datasets {
|
|
|
260
260
|
});
|
|
261
261
|
return normalizeDataset(result);
|
|
262
262
|
}
|
|
263
|
-
/**
|
|
264
|
-
* Turn a curated Conscious Loop set into a dataset training can use.
|
|
265
|
-
*
|
|
266
|
-
* Without this, using a loop set from code meant downloading the JSONL and
|
|
267
|
-
* uploading it again as an unrelated dataset. That works, and it throws away
|
|
268
|
-
* the one thing that made the set worth having: which conversations, which
|
|
269
|
-
* verdicts and which judges produced it. Registering keeps that link.
|
|
270
|
-
*
|
|
271
|
-
* The set is then put through the SAME validation every uploaded dataset
|
|
272
|
-
* gets, so it comes back `processing` rather than ready -- poll
|
|
273
|
-
* {@link getStatus} before training on it. Registering the same set and split
|
|
274
|
-
* twice is refused rather than billed twice, and an empty set is refused
|
|
275
|
-
* rather than registered as something that would fail inside the trainer.
|
|
276
|
-
*
|
|
277
|
-
* @example
|
|
278
|
-
* ```ts
|
|
279
|
-
* const train = await client.datasets.registerLoop({
|
|
280
|
-
* loopDatasetId: 'd244894c-7ab4-4b3d-bfda-e0bb4c563ceb',
|
|
281
|
-
* name: 'extract-v1 distill SFT',
|
|
282
|
-
* split: 'train',
|
|
283
|
-
* });
|
|
284
|
-
* ```
|
|
285
|
-
*/
|
|
286
|
-
async registerLoop(params) {
|
|
287
|
-
const raw = params;
|
|
288
|
-
const loopDatasetId = String(raw.loopDatasetId || raw.loop_dataset_id || '');
|
|
289
|
-
if (!loopDatasetId)
|
|
290
|
-
throw new Error('RunBiOS: loopDatasetId is required');
|
|
291
|
-
const workspaceId = String(raw.workspaceId || raw.workspace_id || '')
|
|
292
|
-
|| this._http.workspaceId
|
|
293
|
-
|| await this._http.resolveWorkspaceId();
|
|
294
|
-
const result = await this._http.fetchPost('/api/datasets/register-loop', {
|
|
295
|
-
loop_dataset_id: loopDatasetId,
|
|
296
|
-
workspace_id: workspaceId,
|
|
297
|
-
split: raw.split ?? 'all',
|
|
298
|
-
...(raw.name !== undefined && { name: raw.name }),
|
|
299
|
-
});
|
|
300
|
-
return normalizeDataset(result);
|
|
301
|
-
}
|
|
302
263
|
/**
|
|
303
264
|
* Get the processing status of a dataset.
|
|
304
265
|
*
|
|
@@ -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
|
|
329
|
+
this.baseUrl = (config.baseUrl || envBaseUrl() || 'https://api.runbios.ai').replace(/\/+$/, '');
|
|
330
330
|
this.timeout = config.timeout ?? 900_000;
|
|
331
331
|
this._http = http;
|
|
332
332
|
}
|
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
|
|
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. */
|
|
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
|
|
17
|
+
/** Inference base URL. Defaults to baseUrl, then https://api.runbios.ai. */
|
|
18
18
|
inferenceBaseUrl?: string;
|
|
19
19
|
/** End-to-end inference timeout in milliseconds. Defaults to 15 minutes. */
|
|
20
20
|
inferenceTimeout?: number;
|
|
@@ -444,21 +444,6 @@ export interface DatasetRegisterHFParams {
|
|
|
444
444
|
columnMapping?: Record<string, string>;
|
|
445
445
|
importMode?: 'auto' | 'reference' | 'materialize';
|
|
446
446
|
}
|
|
447
|
-
/** Parameters for registering a curated Conscious Loop set as a dataset. */
|
|
448
|
-
export interface DatasetRegisterLoopParams {
|
|
449
|
-
/** The Conscious Loop dataset to register. */
|
|
450
|
-
loopDatasetId: string;
|
|
451
|
-
/** Defaults to `loop-<first 8 of the loop id>`. */
|
|
452
|
-
name?: string;
|
|
453
|
-
/**
|
|
454
|
-
* Which rows to take. Defaults to `all`, because the loop already split the
|
|
455
|
-
* set by TIME and re-splitting a deliberate split throws that decision away.
|
|
456
|
-
* Register `train` and `holdout` separately to score a training job against
|
|
457
|
-
* the loop's own held-back rows; both can exist at once.
|
|
458
|
-
*/
|
|
459
|
-
split?: 'all' | 'train' | 'holdout';
|
|
460
|
-
workspaceId?: string;
|
|
461
|
-
}
|
|
462
447
|
/** Parameters for searching HuggingFace Hub datasets. */
|
|
463
448
|
export interface DatasetHubSearchParams {
|
|
464
449
|
/** Search query. */
|