runbios-sdk 0.2.1-dev.113 → 0.2.1-dev.115
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 +2 -2
- package/dist/index.js +1 -1
- package/dist/resources/loop.d.ts +11 -2
- package/dist/resources/loop.js +26 -4
- package/dist/types.d.ts +47 -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.115";
|
|
40
40
|
export declare class RunBiOS {
|
|
41
41
|
/** Search models, fetch configs, check adapter compatibility. */
|
|
42
42
|
readonly models: Models;
|
|
@@ -75,4 +75,4 @@ export { Training } from './resources/training.js';
|
|
|
75
75
|
export { Wallet } from './resources/wallet.js';
|
|
76
76
|
export { GPU, type GPURecommendation } from './resources/gpu.js';
|
|
77
77
|
export { Inference, validateChatRequest, parseSSE, buildInferenceRequest, contextSizingBasis, type ContextSizingBasis, CONTEXT_DEFAULT_CEILING, CONTEXT_EDITABLE_FLOOR, type ChatMessage, type FunctionTool, type ChatCompletionParams, type ChatCompletionResponse, type ChatCompletionChunk, } from './resources/inference.js';
|
|
78
|
-
export type { BiOSConfig, PaginatedResponse, ApiErrorBody, AvailableGpuAlternative, CapacityMinimumRequirement, InferenceBookingAccepted, Model, ModelSearchParams, ModelSearchResponse, ModelDetailResponse, ModelConfig, Dataset, DatasetListParams, DatasetListResponse, DatasetUploadParams, DatasetPreview, DatasetPreviewParams, DatasetImportHFParams, DatasetRegisterHFParams, DatasetHubSearchParams, DatasetHubPreviewParams, DatasetValidation, DatasetFormatVariant, DatasetFormatSpec, DatasetFormatSpecs, DatasetStorageUsage, TrainingMethod, RLHFAlgorithm, AdapterType, TrainingJobStatus, TrainingStatusFilter, TrainingCreateParams, TrainingListParams, TrainingListResponse, TrainingJob, TrainingMetrics, MetricPoint, MetricGraphConfig, TrainingCheckpoint, TrainingLogs, TrainingLogEntry, TrainingStopResponse, TrainingResumeResponse, CanonicalTrainingRequest, TrainingPreflightDataset, TrainingPreflightWarning, TrainingPreflightResponse, TrainingCapabilityChoice, TrainingConfigFieldCapability, TrainingCapabilities, GPUChoice, WalletBalance, Transaction, TransactionListResponse, TransactionListParams, GPUInfo, GPUPricingResponse, GPUOptionsParams, GPUOption, GPUOptionSuggestion, GPUOptionsResponse, InferenceStatus, InferenceCreateParams, InferenceUpdateParams, InferenceDeployment, InferenceDeploymentSummary, InferenceCreateResponse, InferenceListResponse, InferenceUpdateResponse, InferenceLifecycleResponse, InferenceDeleteResponse, InferenceGPUOptionMarket, InferenceGPUOption, InferenceGPUAlternative, InferenceGPUOptionsParams, InferenceGPUOptionsResponse, InferenceCanonicalRequest, InferencePreflightWarning, InferencePreflightResponse, AdapterCompatibility, AdapterCompatibilityResponse, AdapterCompatibilityParams, SupportedArchitecture, ArchitectureScope, SupportedArchitecturesResponse, ApiKey, ApiKeyScope, ApiKeyIntrospection, Organization, OrgMember, OrgInvite, Workspace, Integration, IntegrationCreateParams, StorageUsage, StorageObject, PromptTokensDetails, ChatCompletionUsage, } from './types.js';
|
|
78
|
+
export type { BiOSConfig, PaginatedResponse, ApiErrorBody, AvailableGpuAlternative, CapacityMinimumRequirement, InferenceBookingAccepted, Model, ModelSearchParams, ModelSearchResponse, ModelDetailResponse, ModelConfig, Dataset, DatasetListParams, DatasetListResponse, DatasetUploadParams, DatasetPreview, DatasetPreviewParams, DatasetImportHFParams, DatasetRegisterHFParams, DatasetHubSearchParams, DatasetHubPreviewParams, DatasetValidation, DatasetFormatVariant, DatasetFormatSpec, DatasetFormatSpecs, DatasetStorageUsage, TrainingMethod, RLHFAlgorithm, AdapterType, TrainingJobStatus, TrainingStatusFilter, TrainingCreateParams, TrainingListParams, TrainingListResponse, TrainingJob, TrainingMetrics, TrainingResourceMetrics, TrainingDeviceMetrics, MetricPoint, MetricGraphConfig, TrainingCheckpoint, TrainingLogs, TrainingLogEntry, TrainingStopResponse, TrainingResumeResponse, CanonicalTrainingRequest, TrainingPreflightDataset, TrainingPreflightWarning, TrainingPreflightResponse, TrainingCapabilityChoice, TrainingConfigFieldCapability, TrainingCapabilities, GPUChoice, WalletBalance, Transaction, TransactionListResponse, TransactionListParams, GPUInfo, GPUPricingResponse, GPUOptionsParams, GPUOption, GPUOptionSuggestion, GPUOptionsResponse, InferenceStatus, InferenceCreateParams, InferenceUpdateParams, InferenceDeployment, InferenceDeploymentSummary, InferenceCreateResponse, InferenceListResponse, InferenceUpdateResponse, InferenceLifecycleResponse, InferenceDeleteResponse, InferenceGPUOptionMarket, InferenceGPUOption, InferenceGPUAlternative, InferenceGPUOptionsParams, InferenceGPUOptionsResponse, InferenceCanonicalRequest, InferencePreflightWarning, InferencePreflightResponse, AdapterCompatibility, AdapterCompatibilityResponse, AdapterCompatibilityParams, SupportedArchitecture, ArchitectureScope, SupportedArchitecturesResponse, ApiKey, ApiKeyScope, ApiKeyIntrospection, Organization, OrgMember, OrgInvite, Workspace, Integration, IntegrationCreateParams, StorageUsage, StorageObject, PromptTokensDetails, ChatCompletionUsage, } from './types.js';
|
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.115';
|
|
40
40
|
export class RunBiOS {
|
|
41
41
|
/** Search models, fetch configs, check adapter compatibility. */
|
|
42
42
|
models;
|
package/dist/resources/loop.d.ts
CHANGED
|
@@ -171,9 +171,18 @@ export declare class Loop {
|
|
|
171
171
|
*
|
|
172
172
|
* Labels are lowercased and trimmed, so `Refunds` and `refunds` are one label.
|
|
173
173
|
*/
|
|
174
|
-
label(traceId: string, labels: string[], parent?: string): Promise<LoopLabel[]>;
|
|
175
|
-
|
|
174
|
+
label(traceId: string, labels: string[], parent?: string, attributes?: Record<string, string>): Promise<LoopLabel[]>;
|
|
175
|
+
/**
|
|
176
|
+
* Set named dimensions on a conversation: `{ category: 'billing',
|
|
177
|
+
* language: 'es' }`.
|
|
178
|
+
*
|
|
179
|
+
* An upsert per dimension, so correcting `category` leaves `task` and any
|
|
180
|
+
* bare tags exactly where they were — no delete-then-add.
|
|
181
|
+
*/
|
|
182
|
+
setAttributes(traceId: string, attributes: Record<string, string>): Promise<LoopLabel[]>;
|
|
183
|
+
unlabel(traceId: string, label: string, key?: string): Promise<{
|
|
176
184
|
deleted: boolean;
|
|
185
|
+
key: string;
|
|
177
186
|
label: string;
|
|
178
187
|
}>;
|
|
179
188
|
/** Every label in the workspace, with how many conversations carry it. */
|
package/dist/resources/loop.js
CHANGED
|
@@ -76,6 +76,16 @@ export class Loop {
|
|
|
76
76
|
q.set('to', params.to);
|
|
77
77
|
if (params.signalled)
|
|
78
78
|
q.set('signalled', 'true');
|
|
79
|
+
if (params.label)
|
|
80
|
+
q.set('label', params.label);
|
|
81
|
+
// Repeated rather than comma-joined: a value containing a comma would
|
|
82
|
+
// otherwise silently split into two filters that match nothing.
|
|
83
|
+
for (const [k, v] of Object.entries(params.attributes ?? {})) {
|
|
84
|
+
if (k && v)
|
|
85
|
+
q.append('attr', `${k}:${v}`);
|
|
86
|
+
}
|
|
87
|
+
if (params.unlabelled)
|
|
88
|
+
q.set('unlabelled', 'true');
|
|
79
89
|
if (params.limit != null)
|
|
80
90
|
q.set('limit', String(params.limit));
|
|
81
91
|
if (params.offset != null)
|
|
@@ -218,12 +228,24 @@ export class Loop {
|
|
|
218
228
|
*
|
|
219
229
|
* Labels are lowercased and trimmed, so `Refunds` and `refunds` are one label.
|
|
220
230
|
*/
|
|
221
|
-
async label(traceId, labels, parent) {
|
|
222
|
-
const res = await this._http.fetchPost(`/api/loop/traces/${encodeURIComponent(traceId)}/labels`, { labels, parent });
|
|
231
|
+
async label(traceId, labels, parent, attributes) {
|
|
232
|
+
const res = await this._http.fetchPost(`/api/loop/traces/${encodeURIComponent(traceId)}/labels`, { labels, parent, attributes });
|
|
223
233
|
return res.labels;
|
|
224
234
|
}
|
|
225
|
-
|
|
226
|
-
|
|
235
|
+
/**
|
|
236
|
+
* Set named dimensions on a conversation: `{ category: 'billing',
|
|
237
|
+
* language: 'es' }`.
|
|
238
|
+
*
|
|
239
|
+
* An upsert per dimension, so correcting `category` leaves `task` and any
|
|
240
|
+
* bare tags exactly where they were — no delete-then-add.
|
|
241
|
+
*/
|
|
242
|
+
async setAttributes(traceId, attributes) {
|
|
243
|
+
const res = await this._http.fetchPost(`/api/loop/traces/${encodeURIComponent(traceId)}/labels`, { attributes });
|
|
244
|
+
return res.labels;
|
|
245
|
+
}
|
|
246
|
+
async unlabel(traceId, label, key) {
|
|
247
|
+
const q = key ? `?key=${encodeURIComponent(key)}` : '';
|
|
248
|
+
return this._http.fetchDelete(`/api/loop/traces/${encodeURIComponent(traceId)}/labels/${encodeURIComponent(label)}${q}`);
|
|
227
249
|
}
|
|
228
250
|
/** Every label in the workspace, with how many conversations carry it. */
|
|
229
251
|
async listLabels() {
|
package/dist/types.d.ts
CHANGED
|
@@ -759,12 +759,37 @@ export interface TrainingListResponse {
|
|
|
759
759
|
limit: number;
|
|
760
760
|
offset: number;
|
|
761
761
|
}
|
|
762
|
+
export interface TrainingDeviceMetrics {
|
|
763
|
+
memory_used_mib: number | null;
|
|
764
|
+
memory_total_mib: number | null;
|
|
765
|
+
utilization_pct: number | null;
|
|
766
|
+
temperature_c: number | null;
|
|
767
|
+
}
|
|
768
|
+
export interface TrainingResourceMetrics {
|
|
769
|
+
scope: 'worker';
|
|
770
|
+
sampled_at: string | null;
|
|
771
|
+
received_at: string;
|
|
772
|
+
gpu_count: number | null;
|
|
773
|
+
gpu_memory_used_mib: number | null;
|
|
774
|
+
gpu_memory_total_mib: number | null;
|
|
775
|
+
gpu_utilization_pct: number | null;
|
|
776
|
+
gpu_temperature_c: number | null;
|
|
777
|
+
host_ram_used_gib: number | null;
|
|
778
|
+
host_ram_limit_gib: number | null;
|
|
779
|
+
host_ram_pct: number | null;
|
|
780
|
+
host_cpu_usage_pct: number | null;
|
|
781
|
+
host_cpu_limit_cores: number | null;
|
|
782
|
+
disk_used_gib: number | null;
|
|
783
|
+
disk_total_gib: number | null;
|
|
784
|
+
gpus: TrainingDeviceMetrics[];
|
|
785
|
+
}
|
|
762
786
|
/** Training metrics for a job. */
|
|
763
787
|
export interface TrainingMetrics {
|
|
764
788
|
metrics: MetricPoint[];
|
|
765
789
|
training_method?: string | null;
|
|
766
790
|
rlhf_type?: string | null;
|
|
767
791
|
graph_configs: MetricGraphConfig[];
|
|
792
|
+
resource_metrics?: TrainingResourceMetrics | null;
|
|
768
793
|
/** @deprecated Use metrics. Populated as a compatibility alias. */
|
|
769
794
|
steps?: MetricPoint[];
|
|
770
795
|
}
|
|
@@ -921,6 +946,8 @@ export interface TrainingConfigFieldCapability {
|
|
|
921
946
|
label: string;
|
|
922
947
|
type: 'integer' | 'number' | 'boolean' | 'string' | 'string_array' | 'string_or_string_array' | 'object';
|
|
923
948
|
default: unknown;
|
|
949
|
+
default_by_adapter?: Record<string, number>;
|
|
950
|
+
requires_step_horizon?: boolean;
|
|
924
951
|
enabled: boolean;
|
|
925
952
|
disabled_reason?: string;
|
|
926
953
|
aliases?: string[];
|
|
@@ -2073,6 +2100,15 @@ export interface LoopTraceListParams {
|
|
|
2073
2100
|
to?: string;
|
|
2074
2101
|
/** Only conversations that already carry a verdict. */
|
|
2075
2102
|
signalled?: boolean;
|
|
2103
|
+
/** One bare tag. A tag with children matches them too. */
|
|
2104
|
+
label?: string;
|
|
2105
|
+
/**
|
|
2106
|
+
* Named dimensions, ANDed together: `{ category: 'billing', language: 'es' }`.
|
|
2107
|
+
* Exact within their key — `source=support` does not match `team=support`.
|
|
2108
|
+
*/
|
|
2109
|
+
attributes?: Record<string, string>;
|
|
2110
|
+
/** Only the conversations nobody has described yet. */
|
|
2111
|
+
unlabelled?: boolean;
|
|
2076
2112
|
limit?: number;
|
|
2077
2113
|
offset?: number;
|
|
2078
2114
|
}
|
|
@@ -2095,6 +2131,14 @@ export interface LoopDatasetCreateParams {
|
|
|
2095
2131
|
/** Holds back your most recent work, not a random slice. 0-50. */
|
|
2096
2132
|
holdout_percent?: number;
|
|
2097
2133
|
max_items?: number;
|
|
2134
|
+
/**
|
|
2135
|
+
* Named dimensions, ANDed with each other and with `label`:
|
|
2136
|
+
* `{ category: 'billing', language: 'es' }`. This is what turns one captured
|
|
2137
|
+
* corpus into a different dataset for every task somebody trains for.
|
|
2138
|
+
*/
|
|
2139
|
+
attributes?: Record<string, string>;
|
|
2140
|
+
/** Only the conversations nobody has described yet. */
|
|
2141
|
+
unlabelled?: boolean;
|
|
2098
2142
|
}
|
|
2099
2143
|
export interface LoopDataset {
|
|
2100
2144
|
id: string;
|
|
@@ -2358,9 +2402,12 @@ export interface LoopLabel {
|
|
|
2358
2402
|
parent: string | null;
|
|
2359
2403
|
created_by: string | null;
|
|
2360
2404
|
created_at: string;
|
|
2405
|
+
/** The dimension this value belongs to. `tag` for a bare name. */
|
|
2406
|
+
key: string;
|
|
2361
2407
|
}
|
|
2362
2408
|
export interface LoopLabelCount {
|
|
2363
2409
|
label: string;
|
|
2364
2410
|
parent: string | null;
|
|
2365
2411
|
traces: number;
|
|
2412
|
+
key: string;
|
|
2366
2413
|
}
|