runbios-sdk 0.2.1-dev.117 → 0.2.1-dev.123
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/gpu.js +7 -0
- package/dist/resources/loop.d.ts +27 -1
- package/dist/resources/loop.js +37 -0
- package/dist/types.d.ts +69 -0
- 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.1-dev.
|
|
39
|
+
export declare const VERSION = "0.2.1-dev.123";
|
|
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.1-dev.
|
|
39
|
+
export const VERSION = '0.2.1-dev.123';
|
|
40
40
|
export class RunBiOS {
|
|
41
41
|
/** Search models, fetch configs, check adapter compatibility. */
|
|
42
42
|
models;
|
package/dist/resources/gpu.js
CHANGED
|
@@ -46,6 +46,13 @@ export class GPU {
|
|
|
46
46
|
if (params.modelActiveParamsB !== undefined) {
|
|
47
47
|
q.set('model_active_params_b', String(params.modelActiveParamsB));
|
|
48
48
|
}
|
|
49
|
+
if (params.maxLength !== undefined)
|
|
50
|
+
q.set('max_length', String(params.maxLength));
|
|
51
|
+
if (params.effectiveBatch !== undefined)
|
|
52
|
+
q.set('effective_batch', String(params.effectiveBatch));
|
|
53
|
+
else if (params.perDeviceTrainBatchSize !== undefined) {
|
|
54
|
+
q.set('per_device_train_batch_size', String(params.perDeviceTrainBatchSize));
|
|
55
|
+
}
|
|
49
56
|
return this._http.fetchGet(`/api/training/gpu-options?${q}`);
|
|
50
57
|
}
|
|
51
58
|
/**
|
package/dist/resources/loop.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { HttpClient } from '../client.js';
|
|
2
|
-
import type { LoopTrace, LoopTraceListResponse, LoopTraceListParams, LoopCaptureParams, LoopCaptureResult, LoopImportParams, LoopImportResult, LoopSignal, LoopSignalParams, LoopCandidate, LoopCandidateParams, LoopGrader, LoopGraderParams, LoopLabel, LoopLabelCount, LoopGradeResult, LoopDataset, LoopDatasetListParams, LoopDatasetItem, LoopDatasetCreateParams, LoopConfig, LoopConfigParams, LoopStats, LoopJudge, LoopJudgeParams, LoopJudgeRun, LoopJudgeWork, LoopJudgeVerdict, LoopJudgeVerdictResult } from '../types.js';
|
|
2
|
+
import type { LoopTrace, LoopTraceListResponse, LoopTraceListParams, LoopCaptureParams, LoopCaptureResult, LoopImportParams, LoopImportResult, LoopSignal, LoopSignalParams, LoopCandidate, LoopCandidateParams, LoopGrader, LoopGraderParams, LoopLabel, LoopLabelCount, LoopGradeResult, LoopDataset, LoopDatasetListParams, LoopDatasetItem, LoopDatasetCreateParams, LoopConfig, LoopConfigParams, LoopBuildRule, LoopBuildRuleParams, LoopStats, LoopJudge, LoopJudgeParams, LoopJudgeRun, LoopJudgeWork, LoopJudgeVerdict, LoopJudgeVerdictResult } from '../types.js';
|
|
3
3
|
/**
|
|
4
4
|
* The Conscious Loop -- capture what your model was asked and answered, record
|
|
5
5
|
* whether it was right, and turn those judgements into training data.
|
|
@@ -238,6 +238,32 @@ export declare class Loop {
|
|
|
238
238
|
*/
|
|
239
239
|
createDataset(params: LoopDatasetCreateParams): Promise<LoopDataset>;
|
|
240
240
|
/** List training sets, newest first. */
|
|
241
|
+
/**
|
|
242
|
+
* Stand up a rule that builds a set whenever enough new work exists.
|
|
243
|
+
*
|
|
244
|
+
* The manual path asks somebody to notice that enough conversations have
|
|
245
|
+
* been reviewed, remember which filters describe the slice they want, and
|
|
246
|
+
* press build — every time. A rule is that instruction, stored.
|
|
247
|
+
*
|
|
248
|
+
* `spec` is the same selection `createDataset` takes and is replayed
|
|
249
|
+
* verbatim, so an automatic set is identical to a hand-made one.
|
|
250
|
+
*
|
|
251
|
+
* `min_new_rows` counts only work reviewed SINCE THE LAST BUILD. Counting
|
|
252
|
+
* the whole corpus would fire the rule every interval forever, because a
|
|
253
|
+
* total that has crossed a threshold stays across it.
|
|
254
|
+
*/
|
|
255
|
+
createBuildRule(params: LoopBuildRuleParams): Promise<LoopBuildRule>;
|
|
256
|
+
/**
|
|
257
|
+
* Every build rule, with what each one last did and why.
|
|
258
|
+
*
|
|
259
|
+
* `last_reason` is the field worth reading: a rule quiet because it is
|
|
260
|
+
* waiting looks exactly like one quiet because it is broken.
|
|
261
|
+
*/
|
|
262
|
+
listBuildRules(): Promise<LoopBuildRule[]>;
|
|
263
|
+
/** Stop a standing build rule. Sets it already produced are untouched. */
|
|
264
|
+
deleteBuildRule(id: string): Promise<{
|
|
265
|
+
deleted: boolean;
|
|
266
|
+
}>;
|
|
241
267
|
listDatasets(params?: LoopDatasetListParams): Promise<LoopDataset[]>;
|
|
242
268
|
/** Read one training set and its curation report. */
|
|
243
269
|
getDataset(id: string): Promise<LoopDataset>;
|
package/dist/resources/loop.js
CHANGED
|
@@ -113,6 +113,10 @@ export class Loop {
|
|
|
113
113
|
if (k && v)
|
|
114
114
|
q.append('attr', `${k}:${v}`);
|
|
115
115
|
}
|
|
116
|
+
if (params.model)
|
|
117
|
+
q.set('model', params.model);
|
|
118
|
+
if (params.origin)
|
|
119
|
+
q.set('origin', params.origin);
|
|
116
120
|
if (params.unlabelled)
|
|
117
121
|
q.set('unlabelled', 'true');
|
|
118
122
|
if (params.limit != null)
|
|
@@ -309,6 +313,39 @@ export class Loop {
|
|
|
309
313
|
return res.dataset;
|
|
310
314
|
}
|
|
311
315
|
/** List training sets, newest first. */
|
|
316
|
+
// ── build rules ───────────────────────────────────────────────────────
|
|
317
|
+
/**
|
|
318
|
+
* Stand up a rule that builds a set whenever enough new work exists.
|
|
319
|
+
*
|
|
320
|
+
* The manual path asks somebody to notice that enough conversations have
|
|
321
|
+
* been reviewed, remember which filters describe the slice they want, and
|
|
322
|
+
* press build — every time. A rule is that instruction, stored.
|
|
323
|
+
*
|
|
324
|
+
* `spec` is the same selection `createDataset` takes and is replayed
|
|
325
|
+
* verbatim, so an automatic set is identical to a hand-made one.
|
|
326
|
+
*
|
|
327
|
+
* `min_new_rows` counts only work reviewed SINCE THE LAST BUILD. Counting
|
|
328
|
+
* the whole corpus would fire the rule every interval forever, because a
|
|
329
|
+
* total that has crossed a threshold stays across it.
|
|
330
|
+
*/
|
|
331
|
+
async createBuildRule(params) {
|
|
332
|
+
const res = await this._http.fetchPost('/api/loop/build-rules', params);
|
|
333
|
+
return res.rule;
|
|
334
|
+
}
|
|
335
|
+
/**
|
|
336
|
+
* Every build rule, with what each one last did and why.
|
|
337
|
+
*
|
|
338
|
+
* `last_reason` is the field worth reading: a rule quiet because it is
|
|
339
|
+
* waiting looks exactly like one quiet because it is broken.
|
|
340
|
+
*/
|
|
341
|
+
async listBuildRules() {
|
|
342
|
+
const res = await this._http.fetchGet('/api/loop/build-rules');
|
|
343
|
+
return res.rules ?? [];
|
|
344
|
+
}
|
|
345
|
+
/** Stop a standing build rule. Sets it already produced are untouched. */
|
|
346
|
+
async deleteBuildRule(id) {
|
|
347
|
+
return this._http.fetchDelete(`/api/loop/build-rules/${encodeURIComponent(id)}`);
|
|
348
|
+
}
|
|
312
349
|
async listDatasets(params = {}) {
|
|
313
350
|
const q = new URLSearchParams();
|
|
314
351
|
if (params.method)
|
package/dist/types.d.ts
CHANGED
|
@@ -1226,6 +1226,17 @@ export interface GPUOptionsParams {
|
|
|
1226
1226
|
rlhfType?: RLHFAlgorithm | string;
|
|
1227
1227
|
modelParamsB?: number;
|
|
1228
1228
|
modelActiveParamsB?: number;
|
|
1229
|
+
/** Training sequence length the sizing should assume (tokens). */
|
|
1230
|
+
maxLength?: number;
|
|
1231
|
+
/**
|
|
1232
|
+
* Effective batch (samples per optimizer step) -- the quality decision made
|
|
1233
|
+
* before a GPU is chosen. Each option then answers with the per-device split
|
|
1234
|
+
* that runs it there (`recommended_micro_batch` x `recommended_grad_accum`
|
|
1235
|
+
* x `required_count`), and the minimum GPU count is sized at micro-batch 1.
|
|
1236
|
+
*/
|
|
1237
|
+
effectiveBatch?: number;
|
|
1238
|
+
/** Per-device batch to size as typed instead (ignored when effectiveBatch is set). */
|
|
1239
|
+
perDeviceTrainBatchSize?: number;
|
|
1229
1240
|
}
|
|
1230
1241
|
/** One model-aware GPU option with live stock and total-price context. */
|
|
1231
1242
|
export interface GPUOption {
|
|
@@ -1246,6 +1257,10 @@ export interface GPUOption {
|
|
|
1246
1257
|
bookable: boolean;
|
|
1247
1258
|
reason?: string;
|
|
1248
1259
|
checked_at?: string;
|
|
1260
|
+
/** Present when the request stated an effective batch: its split on this card at required_count. */
|
|
1261
|
+
effective_batch?: number;
|
|
1262
|
+
recommended_micro_batch?: number;
|
|
1263
|
+
recommended_grad_accum?: number;
|
|
1249
1264
|
}
|
|
1250
1265
|
/** Actionable alternative returned when no GPU option is currently bookable. */
|
|
1251
1266
|
export interface GPUOptionSuggestion {
|
|
@@ -1275,6 +1290,10 @@ export interface GPUOptionsResponse {
|
|
|
1275
1290
|
storage_gb: number;
|
|
1276
1291
|
price_per_hour_cents: number;
|
|
1277
1292
|
total_price_per_hour_cents: number;
|
|
1293
|
+
/** Present when the request stated an effective batch. */
|
|
1294
|
+
effective_batch?: number;
|
|
1295
|
+
per_device_train_batch_size?: number;
|
|
1296
|
+
gradient_accumulation_steps?: number;
|
|
1278
1297
|
};
|
|
1279
1298
|
suggestions?: GPUOptionSuggestion[];
|
|
1280
1299
|
}
|
|
@@ -2267,6 +2286,10 @@ export interface LoopTraceListParams {
|
|
|
2267
2286
|
unlabelled?: boolean;
|
|
2268
2287
|
limit?: number;
|
|
2269
2288
|
offset?: number;
|
|
2289
|
+
/** Only what ONE model answered — the filter distillation is made of. */
|
|
2290
|
+
model?: string;
|
|
2291
|
+
/** `captured` (our model's own behaviour) or `imported` (a file somebody brought). */
|
|
2292
|
+
origin?: 'captured' | 'imported';
|
|
2270
2293
|
}
|
|
2271
2294
|
export interface LoopTraceListResponse {
|
|
2272
2295
|
traces: LoopTrace[];
|
|
@@ -2295,6 +2318,10 @@ export interface LoopDatasetCreateParams {
|
|
|
2295
2318
|
attributes?: Record<string, string>;
|
|
2296
2319
|
/** Only the conversations nobody has described yet. */
|
|
2297
2320
|
unlabelled?: boolean;
|
|
2321
|
+
/** Only what ONE model answered — the filter distillation is made of. */
|
|
2322
|
+
model?: string;
|
|
2323
|
+
/** `captured` (our model's own behaviour) or `imported` (a file somebody brought). */
|
|
2324
|
+
origin?: 'captured' | 'imported';
|
|
2298
2325
|
}
|
|
2299
2326
|
export interface LoopDataset {
|
|
2300
2327
|
id: string;
|
|
@@ -2338,12 +2365,54 @@ export interface LoopConfig {
|
|
|
2338
2365
|
enabled_by: string | null;
|
|
2339
2366
|
enabled_at: string | null;
|
|
2340
2367
|
updated_at: string;
|
|
2368
|
+
auto_grade: boolean;
|
|
2369
|
+
}
|
|
2370
|
+
export interface LoopBuildRuleParams {
|
|
2371
|
+
name: string;
|
|
2372
|
+
method: string;
|
|
2373
|
+
/**
|
|
2374
|
+
* How many rows reviewed SINCE THE LAST BUILD must exist before this fires
|
|
2375
|
+
* again. Minimum 10. Counting the whole corpus instead would fire the rule
|
|
2376
|
+
* every interval forever, because a total that has crossed a threshold stays
|
|
2377
|
+
* across it.
|
|
2378
|
+
*/
|
|
2379
|
+
min_new_rows?: number;
|
|
2380
|
+
enabled?: boolean;
|
|
2381
|
+
/** The same selection `createDataset` takes, replayed verbatim. */
|
|
2382
|
+
spec?: LoopDatasetCreateParams;
|
|
2383
|
+
}
|
|
2384
|
+
export interface LoopBuildRule {
|
|
2385
|
+
id: string;
|
|
2386
|
+
workspace_id: string;
|
|
2387
|
+
name: string;
|
|
2388
|
+
method: string;
|
|
2389
|
+
spec: Record<string, unknown>;
|
|
2390
|
+
min_new_rows: number;
|
|
2391
|
+
enabled: boolean;
|
|
2392
|
+
last_built_at: string | null;
|
|
2393
|
+
last_dataset_id: string | null;
|
|
2394
|
+
/**
|
|
2395
|
+
* Why the rule did not fire last time it was checked. A rule quiet because
|
|
2396
|
+
* it is waiting looks exactly like one quiet because it is broken; this is
|
|
2397
|
+
* the difference.
|
|
2398
|
+
*/
|
|
2399
|
+
last_reason: string | null;
|
|
2400
|
+
last_checked_at: string | null;
|
|
2401
|
+
created_by: string | null;
|
|
2402
|
+
created_at: string;
|
|
2403
|
+
updated_at: string;
|
|
2341
2404
|
}
|
|
2342
2405
|
export interface LoopConfigParams {
|
|
2343
2406
|
enabled: boolean;
|
|
2344
2407
|
retention_days?: number;
|
|
2345
2408
|
/** Deterministic per conversation, so turns are never split. 0 < rate <= 1. */
|
|
2346
2409
|
sample_rate?: number;
|
|
2410
|
+
/**
|
|
2411
|
+
* Continuous rule-based scoring for this source. OMITTED MEANS UNCHANGED:
|
|
2412
|
+
* a caller saving retention must not switch grading off for a workspace
|
|
2413
|
+
* that turned it on.
|
|
2414
|
+
*/
|
|
2415
|
+
auto_grade?: boolean;
|
|
2347
2416
|
}
|
|
2348
2417
|
/** One thing a judge scores, separately from the others. */
|
|
2349
2418
|
export interface LoopJudgeDimension {
|