runbios-sdk 0.2.8-dev.210 → 0.2.8-dev.213
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/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/resources/datasets.d.ts +5 -5
- package/dist/resources/datasets.js +4 -4
- package/dist/types.d.ts +5 -4
- package/package.json +1 -1
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.8-dev.
|
|
39
|
+
export declare const VERSION = "0.2.8-dev.213";
|
|
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.8-dev.
|
|
39
|
+
export const VERSION = '0.2.8-dev.213';
|
|
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, DatasetRegisterLoopParams, DatasetHubSearchParams, DatasetHubPreviewParams, DatasetValidation, DatasetFormatSpecs, DatasetStorageUsage } from '../types.js';
|
|
2
|
+
import type { Dataset, DatasetListParams, DatasetListResponse, DatasetUploadParams, DatasetPreview, DatasetPreviewParams, DatasetImportHFParams, DatasetRegisterHFParams, DatasetRegisterLoopParams, DatasetHubSearchParams, DatasetHubPreviewParams, DatasetValidation, DatasetFormatSpecs, DatasetStorageUsage, DatasetTrainingField } from '../types.js';
|
|
3
3
|
/**
|
|
4
4
|
* Manage training datasets -- upload files, import from HuggingFace,
|
|
5
5
|
* preview contents, and manage storage.
|
|
@@ -77,7 +77,7 @@ export declare class Datasets {
|
|
|
77
77
|
*/
|
|
78
78
|
delete(id: string): Promise<void>;
|
|
79
79
|
/** Replace the source mapping and immediately revalidate the dataset. */
|
|
80
|
-
updateColumnMapping(id: string, columnMapping: Record<string,
|
|
80
|
+
updateColumnMapping(id: string, columnMapping: Record<string, DatasetTrainingField>): Promise<Record<string, unknown>>;
|
|
81
81
|
/** Revalidate an existing dataset against its pinned source. */
|
|
82
82
|
revalidate(id: string): Promise<Record<string, unknown>>;
|
|
83
83
|
/** Adopt a compatible newer revision of a reference-mode Hub dataset. */
|
|
@@ -92,9 +92,9 @@ export declare class Datasets {
|
|
|
92
92
|
*
|
|
93
93
|
* @example
|
|
94
94
|
* ```ts
|
|
95
|
-
* The selected split must
|
|
96
|
-
* for
|
|
97
|
-
*
|
|
95
|
+
* The selected split must expose a supported SFT schema or a `text` field
|
|
96
|
+
* for CPT. Preference and reinforcement-learning layouts are rejected while
|
|
97
|
+
* those methods are unavailable.
|
|
98
98
|
*
|
|
99
99
|
* const imported = await client.datasets.importFromHuggingFace({
|
|
100
100
|
* repoId: 'your-org/dataset-with-messages',
|
|
@@ -114,7 +114,7 @@ export class Datasets {
|
|
|
114
114
|
throw new Error(`Failed to read file at "${params.filePath}": ${message}`);
|
|
115
115
|
}
|
|
116
116
|
if (!fileName.toLowerCase().endsWith('.jsonl')) {
|
|
117
|
-
throw new Error('RunBiOS: dataset uploads accept .jsonl only — one JSON object per line
|
|
117
|
+
throw new Error('RunBiOS: dataset uploads accept .jsonl only — one JSON object per line in a supported SFT schema or with "text" for CPT');
|
|
118
118
|
}
|
|
119
119
|
const blob = new Blob([fileData]);
|
|
120
120
|
const formData = new FormData();
|
|
@@ -196,9 +196,9 @@ export class Datasets {
|
|
|
196
196
|
*
|
|
197
197
|
* @example
|
|
198
198
|
* ```ts
|
|
199
|
-
* The selected split must
|
|
200
|
-
* for
|
|
201
|
-
*
|
|
199
|
+
* The selected split must expose a supported SFT schema or a `text` field
|
|
200
|
+
* for CPT. Preference and reinforcement-learning layouts are rejected while
|
|
201
|
+
* those methods are unavailable.
|
|
202
202
|
*
|
|
203
203
|
* const imported = await client.datasets.importFromHuggingFace({
|
|
204
204
|
* repoId: 'your-org/dataset-with-messages',
|
package/dist/types.d.ts
CHANGED
|
@@ -315,7 +315,7 @@ export interface Dataset {
|
|
|
315
315
|
num_samples?: number | null;
|
|
316
316
|
num_columns?: number | null;
|
|
317
317
|
column_info?: Array<Record<string, unknown>>;
|
|
318
|
-
column_mapping?: Record<string,
|
|
318
|
+
column_mapping?: Record<string, DatasetTrainingField> | null;
|
|
319
319
|
compatible_training_methods?: string[];
|
|
320
320
|
compatible_rlhf_algorithms?: string[];
|
|
321
321
|
detected_fields?: string[];
|
|
@@ -372,6 +372,7 @@ export interface DatasetListResponse {
|
|
|
372
372
|
limit: number;
|
|
373
373
|
offset: number;
|
|
374
374
|
}
|
|
375
|
+
export type DatasetTrainingField = 'messages' | 'conversations' | 'instruction' | 'input' | 'output' | 'context' | 'system' | 'prompt' | 'completion' | 'query' | 'response' | 'question' | 'answer' | 'problem' | 'solution' | 'text' | 'images' | 'videos' | 'audios' | 'objects' | '__ignore__';
|
|
375
376
|
/** Parameters for uploading a dataset. */
|
|
376
377
|
export interface DatasetUploadParams {
|
|
377
378
|
/** Path to the file on disk (Node.js only). */
|
|
@@ -387,7 +388,7 @@ export interface DatasetUploadParams {
|
|
|
387
388
|
/** Maximum number of samples to retain. */
|
|
388
389
|
maxSamples?: number;
|
|
389
390
|
/** Optional source-to-canonical column mapping. */
|
|
390
|
-
columnMapping?: Record<string,
|
|
391
|
+
columnMapping?: Record<string, DatasetTrainingField>;
|
|
391
392
|
}
|
|
392
393
|
/** Parameters for previewing dataset rows. */
|
|
393
394
|
export interface DatasetPreviewParams {
|
|
@@ -426,7 +427,7 @@ export interface DatasetImportHFParams {
|
|
|
426
427
|
/** Sampling strategy used with maxSamples. */
|
|
427
428
|
sampleStrategy?: 'first' | 'random';
|
|
428
429
|
/** Optional source-to-canonical column mapping. */
|
|
429
|
-
columnMapping?: Record<string,
|
|
430
|
+
columnMapping?: Record<string, DatasetTrainingField>;
|
|
430
431
|
/** Whether to reference or materialize the source dataset. */
|
|
431
432
|
importMode?: 'auto' | 'reference' | 'materialize';
|
|
432
433
|
}
|
|
@@ -441,7 +442,7 @@ export interface DatasetRegisterHFParams {
|
|
|
441
442
|
split?: string;
|
|
442
443
|
maxSamples?: number;
|
|
443
444
|
sampleStrategy?: 'first' | 'random';
|
|
444
|
-
columnMapping?: Record<string,
|
|
445
|
+
columnMapping?: Record<string, DatasetTrainingField>;
|
|
445
446
|
importMode?: 'auto' | 'reference' | 'materialize';
|
|
446
447
|
}
|
|
447
448
|
/** Parameters for registering a curated Conscious Loop set as a dataset. */
|