runbios-sdk 0.2.17 → 0.2.18-dev.271
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.d.ts +10 -6
- package/dist/client.js +11 -7
- package/dist/index.d.ts +2 -2
- 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/resources/loop.d.ts +150 -543
- package/dist/resources/loop.js +204 -723
- package/dist/types.d.ts +620 -1070
- package/dist/types.js +1 -1
- package/package.json +1 -1
package/dist/client.d.ts
CHANGED
|
@@ -118,14 +118,18 @@ export type CapacityUnavailableError = GpuRejectionError;
|
|
|
118
118
|
* Machine codes the services answer with while a surface is pre-launch
|
|
119
119
|
* (HTTP 403): TRAINING_COMING_SOON from POST /api/training/jobs,
|
|
120
120
|
* DATASETS_COMING_SOON from the dataset creation endpoints (upload,
|
|
121
|
-
* uploads/initiate, register-hf, integration import)
|
|
121
|
+
* uploads/initiate, register-hf, integration import), and LOOP_COMING_SOON
|
|
122
|
+
* from EVERY Conscious Loop route (`client.loop.*`) where the loop is not
|
|
123
|
+
* offered — it is offered on the development environment only.
|
|
122
124
|
*/
|
|
123
|
-
export declare const COMING_SOON_CODES: readonly ["TRAINING_COMING_SOON", "DATASETS_COMING_SOON"];
|
|
125
|
+
export declare const COMING_SOON_CODES: readonly ["TRAINING_COMING_SOON", "DATASETS_COMING_SOON", "LOOP_COMING_SOON"];
|
|
124
126
|
/**
|
|
125
|
-
* Raised when a pre-launch surface rejects a
|
|
126
|
-
*
|
|
127
|
-
*
|
|
128
|
-
* (list, get, status, stop, resume, delete, preview) are unaffected.
|
|
127
|
+
* Raised when a pre-launch surface rejects a call: fine-tuning and datasets
|
|
128
|
+
* launch soon, so training.create and dataset upload/import/register answer 403
|
|
129
|
+
* with one of {@link COMING_SOON_CODES}, and their read and lifecycle methods
|
|
130
|
+
* (list, get, status, stop, resume, delete, preview) are unaffected. The
|
|
131
|
+
* Conscious Loop is offered on the development environment only; everywhere
|
|
132
|
+
* else EVERY `client.loop.*` method, reads included, answers LOOP_COMING_SOON.
|
|
129
133
|
*
|
|
130
134
|
* The service is the authority: the SDK never blocks client-side, so when the
|
|
131
135
|
* gate lifts at launch every SDK version works again without an upgrade. This
|
package/dist/client.js
CHANGED
|
@@ -171,14 +171,18 @@ export const CapacityUnavailableError = GpuRejectionError;
|
|
|
171
171
|
* Machine codes the services answer with while a surface is pre-launch
|
|
172
172
|
* (HTTP 403): TRAINING_COMING_SOON from POST /api/training/jobs,
|
|
173
173
|
* DATASETS_COMING_SOON from the dataset creation endpoints (upload,
|
|
174
|
-
* uploads/initiate, register-hf, integration import)
|
|
174
|
+
* uploads/initiate, register-hf, integration import), and LOOP_COMING_SOON
|
|
175
|
+
* from EVERY Conscious Loop route (`client.loop.*`) where the loop is not
|
|
176
|
+
* offered — it is offered on the development environment only.
|
|
175
177
|
*/
|
|
176
|
-
export const COMING_SOON_CODES = ['TRAINING_COMING_SOON', 'DATASETS_COMING_SOON'];
|
|
178
|
+
export const COMING_SOON_CODES = ['TRAINING_COMING_SOON', 'DATASETS_COMING_SOON', 'LOOP_COMING_SOON'];
|
|
177
179
|
/**
|
|
178
|
-
* Raised when a pre-launch surface rejects a
|
|
179
|
-
*
|
|
180
|
-
*
|
|
181
|
-
* (list, get, status, stop, resume, delete, preview) are unaffected.
|
|
180
|
+
* Raised when a pre-launch surface rejects a call: fine-tuning and datasets
|
|
181
|
+
* launch soon, so training.create and dataset upload/import/register answer 403
|
|
182
|
+
* with one of {@link COMING_SOON_CODES}, and their read and lifecycle methods
|
|
183
|
+
* (list, get, status, stop, resume, delete, preview) are unaffected. The
|
|
184
|
+
* Conscious Loop is offered on the development environment only; everywhere
|
|
185
|
+
* else EVERY `client.loop.*` method, reads included, answers LOOP_COMING_SOON.
|
|
182
186
|
*
|
|
183
187
|
* The service is the authority: the SDK never blocks client-side, so when the
|
|
184
188
|
* gate lifts at launch every SDK version works again without an upgrade. This
|
|
@@ -340,7 +344,7 @@ export class HttpClient {
|
|
|
340
344
|
constructor(config) {
|
|
341
345
|
// Default host stays api.runbios.ai for now; cutover to api.runbios.ai is
|
|
342
346
|
// planned once its DNS exists.
|
|
343
|
-
this.baseUrl = (config.baseUrl || envBaseUrl() || 'https://api.runbios.ai').replace(/\/+$/, '');
|
|
347
|
+
this.baseUrl = (config.baseUrl || envBaseUrl() || 'https://api-dev.runbios.ai').replace(/\/+$/, '');
|
|
344
348
|
this.apiKey = config.apiKey ?? envApiKey();
|
|
345
349
|
this.accessToken = config.accessToken;
|
|
346
350
|
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.18-dev.271";
|
|
40
40
|
export declare class RunBiOS {
|
|
41
41
|
/** Search models, fetch configs, check adapter compatibility. */
|
|
42
42
|
readonly models: Models;
|
|
@@ -75,7 +75,7 @@ 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, type InferenceVerbParams, type CompletionParams, type EmbeddingParams, type RerankParams, type AnthropicMessageParams, type ServerlessUsageWindow, type ServerlessTimeseriesMetric, type ServerlessWorkspaceLimits, type ServerlessUsageEnvelope, type ServerlessUsageOverviewResponse, type ServerlessUsageRowsResponse, type ServerlessUsageTimeseriesResponse, type ServerlessUsageDailyResponse, type ServerlessSavingsTotals, type ServerlessSavingsPeriod, type ServerlessUsageSavingsResponse, } from './resources/inference.js';
|
|
78
|
-
export type { BiOSConfig, PaginatedResponse, ApiErrorBody, AvailableGpuAlternative, CapacityMinimumRequirement, InferenceBookingAccepted, Model, ModelSearchParams, ModelSearchResponse, ModelDetailResponse, InferenceModel, InferenceModelListResponse, 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, TrainingRecommendParams, TrainingAdvisorVerdict, TrainingAdvisorRecommendation, TrainingAdvisorUserShape, TrainingAdvisorJustification, TrainingAdvisorBasis, 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,
|
|
78
|
+
export type { BiOSConfig, PaginatedResponse, ApiErrorBody, AvailableGpuAlternative, CapacityMinimumRequirement, InferenceBookingAccepted, Model, ModelSearchParams, ModelSearchResponse, ModelDetailResponse, InferenceModel, InferenceModelListResponse, 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, TrainingRecommendParams, TrainingAdvisorVerdict, TrainingAdvisorRecommendation, TrainingAdvisorUserShape, TrainingAdvisorJustification, TrainingAdvisorBasis, 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, ServingKind, TrainingRulePausedReason, TrainingTrigger, TrainingRecipe, TrainingRunState, TrainingVerdict, TrainingDecision, NotifyState, EvaluationStatus, EvaluationItemStatus, EvaluationWinner, EvaluationItemWinnerFilter, EvaluationWarningCode, TrainingToolCall, TrainingMessage, TrainingRuleServing, TrainingRunPromoteRequest, TrainingRunRejectRequest, TrainingRunRollbackRequest, TrainingRunCancelRequest, TrainingRunListParams, TrainingRun, TrainingRunSummary, TrainingRunEvent, TrainingRunLinks, TrainingRunActions, EvaluationRef, EvaluationDecoding, EvaluationJudgeDimension, EvaluationDimensionScore, EvaluationWarning, EvaluationMargin, JudgeAgreementDimension, JudgeAgreement, Evaluation, EvaluationItemSide, EvaluationItem, EvaluationItemListParams, BenchmarkStatus, BenchmarkSourceKind, BenchmarkRunStatus, BenchmarkScoring, BenchmarkDimensionScore, Benchmark, BenchmarkItem, BenchmarkRun, BenchmarkHistoryPoint, BenchmarkSource, BenchmarkCreateParams, BenchmarkListParams, BenchmarkItemListParams, BenchmarkHistoryParams, BenchmarkRetireParams, InferenceAlias, InferenceAliasRequest, TrainingRuleDeleteResponse, TrainingRunListResponse, TrainingRunResponse, TrainingRunActionResponse, EvaluationItemsResponse, InferenceAliasListResponse, InferenceAliasResponse, InferenceAliasDeleteResponse, BenchmarkListResponse, BenchmarkItemsResponse, BenchmarkHistoryResponse, TrainingRuleRunRefusalCode, TrainingRuleSaveRefusalCode, TrainingRuleMonthlyLimitRefusal, PipelineStatus, PipelineActiveRun, PipelineVersion, PipelineAttempt, PipelineAttemptTrigger, PipelineAttemptOutcome, Pipeline, PipelineListParams, PipelineListResponse, PipelineResponse, PipelineTrainWhen, PipelineSchedule, PipelineWriteRequest, PipelineMutationResponse, PipelineImportParams, PipelineFloors, LoopModel, LoopModelsResponse, LoopTracePipeline, LoopTracePipelinesResponse, LoopMetricsHistoryParams, LoopMetricPoint, LoopSignalDay, LoopMetricsHistory, PromotionPolicyState, RuleBenchmark, PipelineBenchmarksResponse, PipelineBenchmarkAttachParams, PipelineBenchmarkMoveParams, CompareBenchmark, VersionBenchmarkScore, PromotionMeasurement, PromotionOutcome, VersionScores, VersionScoreDifference, VersionCompareResponse, VersionCompareParams, } from './types.js';
|
|
79
79
|
/** The closed set of run states a training run never leaves. */
|
|
80
80
|
export { TERMINAL_RUN_STATES } from './types.js';
|
|
81
81
|
/** The most versions a pipeline may be set to make. */
|
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.18-dev.271';
|
|
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, DatasetTrainingField } 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
|
*
|
|
@@ -259,45 +259,6 @@ export class Datasets {
|
|
|
259
259
|
});
|
|
260
260
|
return normalizeDataset(result);
|
|
261
261
|
}
|
|
262
|
-
/**
|
|
263
|
-
* Turn a curated Conscious Loop set into a dataset training can use.
|
|
264
|
-
*
|
|
265
|
-
* Without this, using a loop set from code meant downloading the JSONL and
|
|
266
|
-
* uploading it again as an unrelated dataset. That works, and it throws away
|
|
267
|
-
* the one thing that made the set worth having: which conversations, which
|
|
268
|
-
* verdicts and which judges produced it. Registering keeps that link.
|
|
269
|
-
*
|
|
270
|
-
* The set is then put through the SAME validation every uploaded dataset
|
|
271
|
-
* gets, so it comes back `processing` rather than ready -- poll
|
|
272
|
-
* {@link getStatus} before training on it. Registering the same set and split
|
|
273
|
-
* twice is refused rather than billed twice, and an empty set is refused
|
|
274
|
-
* rather than registered as something that would fail inside the trainer.
|
|
275
|
-
*
|
|
276
|
-
* @example
|
|
277
|
-
* ```ts
|
|
278
|
-
* const train = await client.datasets.registerLoop({
|
|
279
|
-
* loopDatasetId: 'd244894c-7ab4-4b3d-bfda-e0bb4c563ceb',
|
|
280
|
-
* name: 'extract-v1 distill SFT',
|
|
281
|
-
* split: 'train',
|
|
282
|
-
* });
|
|
283
|
-
* ```
|
|
284
|
-
*/
|
|
285
|
-
async registerLoop(params) {
|
|
286
|
-
const raw = params;
|
|
287
|
-
const loopDatasetId = String(raw.loopDatasetId || raw.loop_dataset_id || '');
|
|
288
|
-
if (!loopDatasetId)
|
|
289
|
-
throw new Error('RunBiOS: loopDatasetId is required');
|
|
290
|
-
const workspaceId = String(raw.workspaceId || raw.workspace_id || '')
|
|
291
|
-
|| this._http.workspaceId
|
|
292
|
-
|| await this._http.resolveWorkspaceId();
|
|
293
|
-
const result = await this._http.fetchPost('/api/datasets/register-loop', {
|
|
294
|
-
loop_dataset_id: loopDatasetId,
|
|
295
|
-
workspace_id: workspaceId,
|
|
296
|
-
split: raw.split ?? 'all',
|
|
297
|
-
...(raw.name !== undefined && { name: raw.name }),
|
|
298
|
-
});
|
|
299
|
-
return normalizeDataset(result);
|
|
300
|
-
}
|
|
301
262
|
/**
|
|
302
263
|
* Get the processing status of a dataset.
|
|
303
264
|
*
|
|
@@ -336,7 +336,7 @@ export class Inference {
|
|
|
336
336
|
this.key = config.inferenceKey || envInferenceKey() || envApiKey();
|
|
337
337
|
// Same default host as HttpClient (api.runbios.ai); api.runbios.ai cutover
|
|
338
338
|
// is planned once its DNS exists — update both call sites together.
|
|
339
|
-
this.baseUrl = (config.baseUrl || envBaseUrl() || 'https://api.runbios.ai').replace(/\/+$/, '');
|
|
339
|
+
this.baseUrl = (config.baseUrl || envBaseUrl() || 'https://api-dev.runbios.ai').replace(/\/+$/, '');
|
|
340
340
|
this.timeout = config.timeout ?? 900_000;
|
|
341
341
|
this._http = http;
|
|
342
342
|
}
|