runbios-sdk 0.3.0 → 0.4.0-rc.334
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/CHANGELOG.md +66 -0
- package/dist/client.js +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.js +1 -1
- package/dist/resources/inference.js +1 -1
- package/dist/resources/loop.d.ts +128 -17
- package/dist/resources/loop.js +168 -17
- package/dist/types.d.ts +632 -34
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,72 @@ surface is added, renamed or removed, the patch for a fix inside an unchanged
|
|
|
5
5
|
surface. The SDK, the Python SDK (`runbios-sdk` on PyPI) and the MCP server
|
|
6
6
|
(`runbios-mcp`) are released together, at one version.
|
|
7
7
|
|
|
8
|
+
## 0.4.0
|
|
9
|
+
|
|
10
|
+
Added
|
|
11
|
+
|
|
12
|
+
- Conscious Loop, saved datasets: `loop.listDatasets`, `getDataset`,
|
|
13
|
+
`createDataset`, `updateDataset`, `deleteDataset` and `previewDataset`. A
|
|
14
|
+
dataset is a saved set of conditions (tags, any or all of them; feedback;
|
|
15
|
+
where samples came from; the model that answered; when they were recorded)
|
|
16
|
+
and a live selection. `createDataset` takes `LoopDatasetCreate`, whose
|
|
17
|
+
`name` is required, as the API requires it; `updateDataset` takes
|
|
18
|
+
`LoopDatasetWrite`. A pipeline trains on its tags or the `datasets` it
|
|
19
|
+
adds, narrowed by its `conditions` (both on `createPipeline` and
|
|
20
|
+
`updatePipeline`, and read back on the pipeline); an attempt and a run
|
|
21
|
+
carry `trained_on`, what it trained on as it was then. `listTraces` takes
|
|
22
|
+
`dataset`.
|
|
23
|
+
- Conscious Loop, the judge's scoring of unreviewed samples, where the
|
|
24
|
+
platform scores samples (a pipeline's `auto_scoring` is not null): a
|
|
25
|
+
pipeline's `auto_scoring` (`status`, `picked`, `below_bar`, `unscored`,
|
|
26
|
+
`message`) and `minimums.picked_by_judge`; `auto_scoring: { enabled }` on
|
|
27
|
+
the pipeline writers; `listTraces({ judge: 'picked' | 'below_bar' |
|
|
28
|
+
'unscored' })`; a sample's `judge` (`score`, `picked`) and, on the judge's
|
|
29
|
+
own signal, `picked` and `reason_unavailable`; on attempts, versions and
|
|
30
|
+
the attempt in flight, `sample_scoring_cents` (inside `cost_cents`),
|
|
31
|
+
`sample_scored`, `sample_picked` and `train_rows_by_judge`; the run
|
|
32
|
+
detail's `cost.sample_scoring_cents`, and `sample_scoring_cents` on a run,
|
|
33
|
+
a runs-list row and a metrics-history point.
|
|
34
|
+
- Conscious Loop, what the console reads: a pipeline's `samples_total` and
|
|
35
|
+
`samples_recent` (the last 48 hours) and `live_deployment.deployment_id`;
|
|
36
|
+
the run detail's `explanation` and `traces_filter_attempt`;
|
|
37
|
+
`listTraces({ attempt, split })`, one attempt's own samples; each row of
|
|
38
|
+
`listTraces({ pipeline })` and each pipeline of `getTracePipelines` says what
|
|
39
|
+
happens to the sample there (`state`, a `LoopSampleStateName`: `held_back`,
|
|
40
|
+
`learned`, `trained`, `waiting` or `left_out`, with `attempt_no`,
|
|
41
|
+
`version_no` and `reason`, the sentence to show); the import answer's
|
|
42
|
+
`refused_reasons` (`LoopImportRefusal`: `code`, `count`, `sentence`);
|
|
43
|
+
`getMetricsHistory({ rule_id })`'s `samples`, the pipeline's samples per day
|
|
44
|
+
by feedback; the workspace's totals on `loop.stats()` (`samples_recent`,
|
|
45
|
+
`feedback`, a `LoopFeedbackCounts`, and `pipelines`, a
|
|
46
|
+
`LoopPipelineCounts`); and `listTrainingRuns` takes `result`, with each row
|
|
47
|
+
carrying `attempt`, the attempt as its pipeline's own list says it. The new
|
|
48
|
+
fields on existing answers are optional on their types.
|
|
49
|
+
- Conscious Loop, since 0.3.0 was published: `comparison_returned_cents` on
|
|
50
|
+
`TrainingRun`, `TrainingRunSummary`, `TrainingRunCost`, `PipelineAttempt`
|
|
51
|
+
and `PipelineActiveRun`, what was taken off for a comparison machine that
|
|
52
|
+
never started (it is not charged, and the figures beside it are already
|
|
53
|
+
net of it); `mean_change_needed` on `EvaluationMargin` and
|
|
54
|
+
`LoopMetricPoint`, the average score change an attempt actually had to
|
|
55
|
+
clear; and `billed` on `LoopStorage`, whether that storage figure is
|
|
56
|
+
charged (only the part in the platform's storage, and only where the
|
|
57
|
+
platform charges for it).
|
|
58
|
+
|
|
59
|
+
Changed
|
|
60
|
+
|
|
61
|
+
- `listTraces`' `signal`, `signalled` and `unsignalled` read a person's
|
|
62
|
+
feedback: the judge's score of an unreviewed sample is not feedback, so a
|
|
63
|
+
sample it scored stays unsignalled. `verdict_score` no longer reads as good
|
|
64
|
+
feedback above zero; whether a scored sample trains is `judge.picked`.
|
|
65
|
+
- `createPipeline` says what saving one consents to: the GPU time its
|
|
66
|
+
attempts use and, where the platform scores samples, the judge's scoring of
|
|
67
|
+
unreviewed samples, shown on the attempt it was for.
|
|
68
|
+
- `PipelineAttemptOutcome`, and `result` on `listPipelineAttempts` and
|
|
69
|
+
`listTrainingRuns`, gain `not_tested`: an attempt that ended before it was
|
|
70
|
+
tested (its comparison machine never started, or it expired first).
|
|
71
|
+
`inconclusive` is now only an attempt that was tested and could not be
|
|
72
|
+
decided, or compared nothing.
|
|
73
|
+
|
|
8
74
|
## 0.3.0
|
|
9
75
|
|
|
10
76
|
Added
|
package/dist/client.js
CHANGED
|
@@ -378,7 +378,7 @@ export class HttpClient {
|
|
|
378
378
|
constructor(config) {
|
|
379
379
|
// Default host stays api.runbios.ai for now; cutover to api.runbios.ai is
|
|
380
380
|
// planned once its DNS exists.
|
|
381
|
-
this.baseUrl = (config.baseUrl || envBaseUrl() || 'https://api.runbios.ai').replace(/\/+$/, '');
|
|
381
|
+
this.baseUrl = (config.baseUrl || envBaseUrl() || 'https://api-staging.runbios.ai').replace(/\/+$/, '');
|
|
382
382
|
this.apiKey = config.apiKey ?? envApiKey();
|
|
383
383
|
this.accessToken = config.accessToken;
|
|
384
384
|
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.
|
|
39
|
+
export declare const VERSION = "0.4.0-rc.334";
|
|
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 AnthropicMessageResponse, type LoopCaptureOption, type LoopSampleIdOnResult, LOOP_PIPELINE_HEADER, LOOP_SAMPLE_ID_HEADER, 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, TrainingStartFromParams, TrainingStartFrom, TrainingExportStep, TrainingListParams, TrainingListResponse, TrainingJob, TrainingMetrics, TrainingResourceMetrics, TrainingDeviceMetrics, MetricPoint, MetricGraphConfig, TrainingCheckpoint, TrainingLogs, TrainingLogEntry, TrainingStopResponse, TrainingResumeResponse, CanonicalTrainingRequest, TrainingPreflightDataset, TrainingPreflightWarning, TrainingPreflightResponse, TrainingCapabilityChoice, TrainingConfigFieldCapability, TrainingCapabilities, TrainingFeature, 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, EvaluationStatus, EvaluationItemStatus, ItemErrorCode, EvaluationWinner, EvaluationItemWinnerFilter, ReportStatusFilter, ReportSort, EvaluationWarningCode, TrainingToolCall, TrainingMessage, TrainingRuleServing, TrainingRunPromoteRequest, TrainingRunRejectRequest, TrainingRunRollbackRequest, TrainingRunCancelRequest, TrainingRunListParams, TrainingRun, TrainingRunSummary, TrainingRunEvent, TrainingRunLinks, TrainingRunActions, EvaluationRef, EvaluationDecoding, EvaluationJudgeDimension, EvaluationDimensionScore, EvaluationWarning, EvaluationMargin, Evaluation, EvaluationItemJudge, EvaluationReferenceKind, EvaluationReference, EvaluationPairwiseOrder, EvaluationItemPairwise, EvaluationItemSide, EvaluationItem, EvaluationItemListParams, BenchmarkStatus, BenchmarkSourceKind, BenchmarkRunStatus, BenchmarkScoring, BenchmarkCheck, BenchmarkDimensionScore, Benchmark, BenchmarkItem, BenchmarkRun, BenchmarkRunItemSide, BenchmarkRunItem, BenchmarkRunItemListParams, BenchmarkHistoryPoint, BenchmarkSource, BenchmarkCreateParams, BenchmarkListParams, BenchmarkItemListParams, BenchmarkHistoryParams, BenchmarkRetireParams, InferenceAlias, InferenceAliasRequest, TrainingRuleDeleteResponse, TrainingRunListResponse, TrainingRunBenchmarkRun, TrainingRunResponse, TrainingRunActionResponse, EvaluationItemsResponse, BenchmarkRunItemsResponse, InferenceAliasListResponse, InferenceAliasResponse, InferenceAliasDeleteResponse, BenchmarkListResponse, BenchmarkItemsResponse, BenchmarkHistoryResponse, TrainingRuleRunRefusalCode, TrainingRuleSaveRefusalCode, TrainingRuleMonthlyLimitRefusal, PipelineStatus, PipelineActiveRun, PipelineVersion, PipelineAttempt, AttemptExplanation, PipelineAttemptListParams, PipelineAttemptListResponse, PipelineAttemptModelFilter, PipelineAttemptResultFilter, PipelineAttemptTrigger, Lineage, PipelineChain, PipelineChainRebuild, TrainingRunRollbackRefusalCode, LoopTraceRebuild, LoopTraceDeleteResponse, PipelineAttemptOutcome, PipelineLiveDeploymentStatus, PipelineLiveDeployment, LoopStorageWhere, LoopStorage, Pipeline, PipelineListParams, PipelineListStatus, PipelineListResponse, PipelineTrainingSettings, PipelineTrainingDefaults, PipelineTrainingRequest, PipelineResponse, PipelineTrainWhen, PipelineSchedule, PipelineWriteRequest, PipelineMutationResponse, PipelineImportParams, PipelineFloors, HeldBackFloors, LoopModel, LoopModelsResponse, LoopUnavailableModel, LoopUnavailableReasonCode, LoopTracePipeline, LoopTracePipelinesResponse, LoopMetricsHistoryParams, LoopMetricPoint, LoopSignalDay, LoopMetricsHistory, LoopCaptureFeedback, LoopFeedbackWord, LoopCaptureHealth, LoopCaptureMiss, LoopSignalManyItem, LoopSignalManyResult, PromotionPolicyState, RuleBenchmark, PipelineBenchmarksResponse, PipelineBenchmarkAttachParams, PipelineBenchmarkMoveParams, CompareBenchmark, VersionBenchmarkScore, PromotionMeasurement, PromotionOutcome, VersionHoldout, VersionScores, VersionScoreDifference, VersionCompareResponse, VersionCompareParams, TrainingRunPromotion, VerdictCheck, VerdictCheckKey, VerdictChecksWithheld, TrainingRunCost, AttemptDirection, AttemptHoldout, AttemptCompareSide, AttemptSharedSample, AttemptSharedFigures, AttemptBenchmarkSide, AttemptCompareBenchmark, AttemptCompareItemSide, AttemptCompareItem, AttemptCompareResponse, AttemptCompareParams, } from './types.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, TrainingStartFromParams, TrainingStartFrom, TrainingExportStep, TrainingListParams, TrainingListResponse, TrainingJob, TrainingMetrics, TrainingResourceMetrics, TrainingDeviceMetrics, MetricPoint, MetricGraphConfig, TrainingCheckpoint, TrainingLogs, TrainingLogEntry, TrainingStopResponse, TrainingResumeResponse, CanonicalTrainingRequest, TrainingPreflightDataset, TrainingPreflightWarning, TrainingPreflightResponse, TrainingCapabilityChoice, TrainingConfigFieldCapability, TrainingCapabilities, TrainingFeature, 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, EvaluationStatus, EvaluationItemStatus, ItemErrorCode, EvaluationWinner, EvaluationItemWinnerFilter, ReportStatusFilter, ReportSort, EvaluationWarningCode, TrainingToolCall, TrainingMessage, TrainingRuleServing, TrainingRunPromoteRequest, TrainingRunRejectRequest, TrainingRunRollbackRequest, TrainingRunCancelRequest, TrainingRunListParams, TrainingRun, TrainingRunSummary, TrainingRunEvent, TrainingRunLinks, TrainingRunActions, EvaluationRef, EvaluationDecoding, EvaluationJudgeDimension, EvaluationDimensionScore, EvaluationWarning, EvaluationMargin, Evaluation, EvaluationItemJudge, EvaluationReferenceKind, EvaluationReference, EvaluationPairwiseOrder, EvaluationItemPairwise, EvaluationItemSide, EvaluationItem, EvaluationItemListParams, BenchmarkStatus, BenchmarkSourceKind, BenchmarkRunStatus, BenchmarkScoring, BenchmarkCheck, BenchmarkDimensionScore, Benchmark, BenchmarkItem, BenchmarkRun, BenchmarkRunItemSide, BenchmarkRunItem, BenchmarkRunItemListParams, BenchmarkHistoryPoint, BenchmarkSource, BenchmarkCreateParams, BenchmarkListParams, BenchmarkItemListParams, BenchmarkHistoryParams, BenchmarkRetireParams, InferenceAlias, InferenceAliasRequest, TrainingRuleDeleteResponse, TrainingRunListResponse, TrainingRunBenchmarkRun, TrainingRunResponse, TrainingRunActionResponse, EvaluationItemsResponse, BenchmarkRunItemsResponse, InferenceAliasListResponse, InferenceAliasResponse, InferenceAliasDeleteResponse, BenchmarkListResponse, BenchmarkItemsResponse, BenchmarkHistoryResponse, TrainingRuleRunRefusalCode, TrainingRuleSaveRefusalCode, TrainingRuleMonthlyLimitRefusal, PipelineStatus, PipelineActiveRun, PipelineVersion, PipelineAttempt, AttemptExplanation, PipelineAttemptListParams, PipelineAttemptListResponse, PipelineAttemptModelFilter, PipelineAttemptResultFilter, PipelineAttemptTrigger, Lineage, PipelineChain, PipelineChainRebuild, TrainingRunRollbackRefusalCode, LoopTraceRebuild, LoopTraceDeleteResponse, PipelineAttemptOutcome, PipelineLiveDeploymentStatus, PipelineLiveDeployment, LoopStorageWhere, LoopStorage, Pipeline, PipelineListParams, PipelineListStatus, PipelineListResponse, PipelineTrainingSettings, PipelineTrainingDefaults, PipelineTrainingRequest, PipelineResponse, PipelineTrainWhen, PipelineSchedule, PipelineWriteRequest, PipelineMutationResponse, PipelineImportParams, PipelineFloors, HeldBackFloors, LoopModel, LoopModelsResponse, LoopUnavailableModel, LoopUnavailableReasonCode, LoopTracePipeline, LoopTracePipelinesResponse, LoopMetricsHistoryParams, LoopMetricPoint, LoopSignalDay, LoopMetricsHistory, LoopCaptureFeedback, LoopFeedbackWord, LoopCaptureHealth, LoopCaptureMiss, LoopSignalManyItem, LoopSignalManyResult, PromotionPolicyState, RuleBenchmark, PipelineBenchmarksResponse, PipelineBenchmarkAttachParams, PipelineBenchmarkMoveParams, CompareBenchmark, VersionBenchmarkScore, PromotionMeasurement, PromotionOutcome, VersionHoldout, VersionScores, VersionScoreDifference, VersionCompareResponse, VersionCompareParams, TrainingRunPromotion, VerdictCheck, VerdictCheckKey, VerdictChecksWithheld, TrainingRunCost, AttemptDirection, AttemptHoldout, AttemptCompareSide, AttemptSharedSample, AttemptSharedFigures, AttemptBenchmarkSide, AttemptCompareBenchmark, AttemptCompareItemSide, AttemptCompareItem, AttemptCompareResponse, AttemptCompareParams, LoopTraceJudge, LoopJudgeFilter, LoopSampleState, LoopSampleStateName, LoopSampleDay, LoopImportRefusal, PipelineAutoScoring, PipelineAutoScoringStatus, LoopDatasetFeedback, LoopSampleOrigin, LoopFeedbackCounts, LoopPipelineCounts, LoopDatasetPipelineRef, LoopDataset, LoopDatasetWrite, LoopDatasetCreate, LoopDatasetPreviewParams, LoopDatasetPreviewModel, LoopDatasetPreview, LoopDatasetListParams, LoopDatasetListResponse, LoopDatasetDeleteResponse, PipelineDatasetRef, PipelineConditions, PipelineConditionsWrite, TrainedOnDataset, TrainedOn, } 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.
|
|
39
|
+
export const VERSION = '0.4.0-rc.334';
|
|
40
40
|
export class RunBiOS {
|
|
41
41
|
/** Search models, fetch configs, check adapter compatibility. */
|
|
42
42
|
models;
|
|
@@ -373,7 +373,7 @@ export class Inference {
|
|
|
373
373
|
this.key = config.inferenceKey || envInferenceKey() || envApiKey();
|
|
374
374
|
// Same default host as HttpClient (api.runbios.ai); api.runbios.ai cutover
|
|
375
375
|
// is planned once its DNS exists — update both call sites together.
|
|
376
|
-
this.baseUrl = (config.baseUrl || envBaseUrl() || 'https://api.runbios.ai').replace(/\/+$/, '');
|
|
376
|
+
this.baseUrl = (config.baseUrl || envBaseUrl() || 'https://api-staging.runbios.ai').replace(/\/+$/, '');
|
|
377
377
|
this.timeout = config.timeout ?? 900_000;
|
|
378
378
|
this._http = http;
|
|
379
379
|
}
|
package/dist/resources/loop.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type HttpClient } from '../client.js';
|
|
2
|
-
import type { LoopTrace, LoopTraceDeleteResponse, LoopTraceListResponse, LoopTraceListParams, LoopCaptureParams, LoopCaptureResult, LoopImportParams, LoopImportResult, LoopSignal, LoopSignalParams, LoopSignalManyItem, LoopSignalManyResult, LoopLabel, LoopLabelCount, LoopConfig, LoopConfigParams, LoopStats, LoopTracePipelinesResponse, LoopMetricsHistory, LoopMetricsHistoryParams, TrainingRuleDeleteResponse, TrainingRunListParams, TrainingRunListResponse, TrainingRunResponse, TrainingRunActionResponse, TrainingRunPromoteRequest, TrainingRunRejectRequest, TrainingRunRollbackRequest, TrainingRunCancelRequest, Evaluation, EvaluationItemListParams, EvaluationItemsResponse, Benchmark, BenchmarkCreateParams, BenchmarkHistoryParams, BenchmarkHistoryResponse, BenchmarkItemListParams, BenchmarkItemsResponse, BenchmarkListParams, BenchmarkListResponse, BenchmarkRetireParams, BenchmarkRun, BenchmarkRunItemListParams, BenchmarkRunItemsResponse, Pipeline, PipelineAttemptListParams, PipelineAttemptListResponse, PipelineListParams, PipelineListResponse, PipelineWriteRequest, PipelineMutationResponse, LoopModelsResponse, PipelineImportParams, PipelineBenchmarksResponse, PipelineBenchmarkAttachParams, PipelineBenchmarkMoveParams, VersionCompareResponse, VersionCompareParams, AttemptCompareResponse, AttemptCompareParams } from '../types.js';
|
|
2
|
+
import type { LoopTrace, LoopTraceDeleteResponse, LoopTraceListResponse, LoopTraceListParams, LoopCaptureParams, LoopCaptureResult, LoopImportParams, LoopImportResult, LoopSignal, LoopSignalParams, LoopSignalManyItem, LoopSignalManyResult, LoopLabel, LoopLabelCount, LoopConfig, LoopConfigParams, LoopStats, LoopTracePipelinesResponse, LoopMetricsHistory, LoopMetricsHistoryParams, TrainingRuleDeleteResponse, TrainingRunListParams, TrainingRunListResponse, TrainingRunResponse, TrainingRunActionResponse, TrainingRunPromoteRequest, TrainingRunRejectRequest, TrainingRunRollbackRequest, TrainingRunCancelRequest, Evaluation, EvaluationItemListParams, EvaluationItemsResponse, Benchmark, BenchmarkCreateParams, BenchmarkHistoryParams, BenchmarkHistoryResponse, BenchmarkItemListParams, BenchmarkItemsResponse, BenchmarkListParams, BenchmarkListResponse, BenchmarkRetireParams, BenchmarkRun, BenchmarkRunItemListParams, BenchmarkRunItemsResponse, Pipeline, PipelineAttemptListParams, PipelineAttemptListResponse, PipelineListParams, PipelineListResponse, PipelineWriteRequest, PipelineMutationResponse, LoopModelsResponse, PipelineImportParams, PipelineBenchmarksResponse, PipelineBenchmarkAttachParams, PipelineBenchmarkMoveParams, VersionCompareResponse, VersionCompareParams, AttemptCompareResponse, AttemptCompareParams, LoopDataset, LoopDatasetWrite, LoopDatasetCreate, LoopDatasetListParams, LoopDatasetListResponse, LoopDatasetDeleteResponse, LoopDatasetPreview, LoopDatasetPreviewParams } from '../types.js';
|
|
3
3
|
export declare class Loop {
|
|
4
4
|
private readonly _http;
|
|
5
5
|
/** @internal */
|
|
@@ -66,7 +66,9 @@ export declare class Loop {
|
|
|
66
66
|
* an earlier import already had, and the sentences in `notes` are written
|
|
67
67
|
* from those counts, so the numbers and the prose describe the same call and
|
|
68
68
|
* a re-send cannot report a reviewed conversation as waiting for review.
|
|
69
|
-
* `refused` is rows whose shape could not be read, which the file fixes
|
|
69
|
+
* `refused` is rows whose shape could not be read, which the file fixes,
|
|
70
|
+
* and `refused_reasons` says why, one plain `sentence` per reason with its
|
|
71
|
+
* `count` (show those, never the codes);
|
|
70
72
|
* `not_saved` is rows that were understood and then could not be stored,
|
|
71
73
|
* which the file cannot fix.
|
|
72
74
|
*
|
|
@@ -98,11 +100,33 @@ export declare class Loop {
|
|
|
98
100
|
* in every message, the answer and its tool calls. Samples kept in your own
|
|
99
101
|
* storage cannot be searched; a search answers how many were left out as
|
|
100
102
|
* `unsearched`.
|
|
103
|
+
*
|
|
104
|
+
* `signal` (`good`, `bad`, `corrected`), `signalled` and `unsignalled` read
|
|
105
|
+
* a PERSON's feedback: the judge's score of an unreviewed sample is not
|
|
106
|
+
* feedback, so a sample it scored stays in `unsignalled`. `judge` splits
|
|
107
|
+
* those unreviewed samples: `picked` (scored 0.8 or more, trained on),
|
|
108
|
+
* `below_bar` (not trained on) and `unscored`; the three add up to
|
|
109
|
+
* `unsignalled`. A row the judge scored carries `judge` (`score`,
|
|
110
|
+
* `picked`).
|
|
111
|
+
*
|
|
112
|
+
* `pipeline` lists what one pipeline trains on (its tags or its datasets,
|
|
113
|
+
* narrowed by its conditions), each row with `state`: what happens to it in
|
|
114
|
+
* that pipeline (`held_back`, `learned`, `trained`, `waiting` or
|
|
115
|
+
* `left_out`, with `reason`, the sentence to show). `dataset` lists what
|
|
116
|
+
* one saved dataset selects; not with `pipeline`. `attempt` (a run id)
|
|
117
|
+
* with `split` (`train` or `held_back`) lists the samples one attempt
|
|
118
|
+
* trained on or held back.
|
|
101
119
|
*/
|
|
102
120
|
listTraces(params?: LoopTraceListParams): Promise<LoopTraceListResponse>;
|
|
103
121
|
/**
|
|
104
122
|
* Read one conversation, with every verdict and tag recorded on it.
|
|
105
123
|
*
|
|
124
|
+
* When the judge scored it, `judge` carries the score and whether it was
|
|
125
|
+
* picked, and `signals` holds the judge's score (source `judge`, verdict
|
|
126
|
+
* `scored`) with `picked`, its per-aspect `metadata.scores` and its
|
|
127
|
+
* `reason`; `reason_unavailable` means the reason could not be read from
|
|
128
|
+
* storage just now. A person's feedback decides over it.
|
|
129
|
+
*
|
|
106
130
|
* A conversation kept in your own storage carries `payload_stored_externally`.
|
|
107
131
|
* When its text could not be read just now it also carries
|
|
108
132
|
* `payload_unavailable`, with `messages` null and `completion` empty: it is
|
|
@@ -199,13 +223,20 @@ export declare class Loop {
|
|
|
199
223
|
/** Every verdict on one conversation, oldest first. */
|
|
200
224
|
listSignals(traceId: string): Promise<LoopSignal[]>;
|
|
201
225
|
/**
|
|
202
|
-
* The pipelines one conversation feeds: every live pipeline whose tags
|
|
203
|
-
* select it, and whether each is
|
|
226
|
+
* The pipelines one conversation feeds: every live pipeline whose tags or
|
|
227
|
+
* datasets select it (and whose conditions keep it), and whether each is
|
|
228
|
+
* switched on.
|
|
204
229
|
*
|
|
205
230
|
* Being listed means the pipeline would select it, not that it will be
|
|
206
231
|
* trained on -- a set still drops answers it cannot use and duplicates, and
|
|
207
|
-
* holds some back to judge by; `note` says so.
|
|
208
|
-
*
|
|
232
|
+
* holds some back to judge by; `note` says so. Each pipeline's `state` says
|
|
233
|
+
* what happens to it there: `held_back` (to test its attempts),
|
|
234
|
+
* `learned` (by version `version_no`), `trained` (by attempt `attempt_no`,
|
|
235
|
+
* which did not go live), `waiting` (for the next attempt) or `left_out`;
|
|
236
|
+
* `reason` is the sentence to show (for `left_out`, why). An empty list is
|
|
237
|
+
* a real answer: the conversation
|
|
238
|
+
* trains nothing until it carries a pipeline's tag or joins one of its
|
|
239
|
+
* datasets.
|
|
209
240
|
*/
|
|
210
241
|
getTracePipelines(traceId: string): Promise<LoopTracePipelinesResponse>;
|
|
211
242
|
/**
|
|
@@ -292,6 +323,12 @@ export declare class Loop {
|
|
|
292
323
|
* every call was recorded. Rows are per tag: a call naming two tags is
|
|
293
324
|
* counted under each, so never add them up as calls. One pipeline's share
|
|
294
325
|
* is `capture` on its detail.
|
|
326
|
+
*
|
|
327
|
+
* The workspace's totals: `samples_recent` (recorded in the last 48
|
|
328
|
+
* hours), `feedback` (every sample by the feedback a person gave it: good,
|
|
329
|
+
* bad, corrected or unreviewed; they add up to `traces`) and `pipelines`
|
|
330
|
+
* (how many there are, and how many are training, waiting on you
|
|
331
|
+
* (`needs_you`), serving or paused).
|
|
295
332
|
*/
|
|
296
333
|
stats(): Promise<LoopStats>;
|
|
297
334
|
/**
|
|
@@ -299,11 +336,18 @@ export declare class Loop {
|
|
|
299
336
|
* its attempt number, the version it became (null when it did not), its
|
|
300
337
|
* base model, its win rate, what it cost -- and each day's feedback counted
|
|
301
338
|
* by verdict. `rule_id` narrows the attempts to one pipeline; the feedback
|
|
302
|
-
* counts are the workspace's. `
|
|
303
|
-
* `
|
|
339
|
+
* counts are the workspace's. `samples` is the samples recorded each day
|
|
340
|
+
* over `days`, by their feedback today (`good`, `bad`, `corrected`,
|
|
341
|
+
* `unreviewed`): with `rule_id`, that pipeline's. `truncated` says older
|
|
342
|
+
* attempts exist beyond `limit`.
|
|
304
343
|
*/
|
|
305
344
|
getMetricsHistory(params?: LoopMetricsHistoryParams): Promise<LoopMetricsHistory>;
|
|
306
|
-
/**
|
|
345
|
+
/**
|
|
346
|
+
* Every pipeline's attempts, newest first. Filter by pipeline (`rule_id`),
|
|
347
|
+
* by the state they are sitting in, or by what became of them (`result`,
|
|
348
|
+
* as {@link listPipelineAttempts} takes it). Each row carries `attempt`:
|
|
349
|
+
* the attempt as its pipeline's own list says it, `explanation` included.
|
|
350
|
+
*/
|
|
307
351
|
listTrainingRuns(params?: TrainingRunListParams): Promise<TrainingRunListResponse>;
|
|
308
352
|
/**
|
|
309
353
|
* One run with its timeline, the addresses of everything it created, and
|
|
@@ -312,7 +356,11 @@ export declare class Loop {
|
|
|
312
356
|
* `timeline` is written in the same transaction as each state change, so it
|
|
313
357
|
* is the record of what actually happened rather than a reconstruction.
|
|
314
358
|
* `available_actions` is the honest answer to "can I promote this": a button
|
|
315
|
-
* that cannot work should never be offered.
|
|
359
|
+
* that cannot work should never be offered. `explanation` is what became
|
|
360
|
+
* of it in plain words, as on the pipeline's attempts; `run.trained_on` is
|
|
361
|
+
* what it trained on, as it was then (its tags, conditions and each
|
|
362
|
+
* dataset at its revision); `traces_filter_attempt` true means
|
|
363
|
+
* `listTraces({ attempt: id, split })` lists its samples.
|
|
316
364
|
*/
|
|
317
365
|
getTrainingRun(id: string): Promise<TrainingRunResponse>;
|
|
318
366
|
/**
|
|
@@ -353,8 +401,9 @@ export declare class Loop {
|
|
|
353
401
|
* The workspace's pipelines, a page at a time: its versions (the attempts
|
|
354
402
|
* that became the live model), its latest 5 attempts (`attempts_total` says
|
|
355
403
|
* how many; {@link listPipelineAttempts} pages through every one), which
|
|
356
|
-
* version is live, the attempt in flight,
|
|
357
|
-
* for
|
|
404
|
+
* version is live, the attempt in flight, what the pipeline is waiting
|
|
405
|
+
* for (`minimums`), and how many samples it has recorded (`samples_total`,
|
|
406
|
+
* `samples_recent` in the last 48 hours).
|
|
358
407
|
*
|
|
359
408
|
* `limit` is 100 when absent and at most 100; `q` matches the name, the tag
|
|
360
409
|
* or the model (case-insensitive); `status` keeps the pipelines `training`,
|
|
@@ -375,6 +424,12 @@ export declare class Loop {
|
|
|
375
424
|
* somebody does (`paused`, with `paused_reason` saying why; `complete` at
|
|
376
425
|
* `max_versions`). The monthly safety limit is the platform's and has no
|
|
377
426
|
* field: when it holds the pipeline, `next_reason` says so.
|
|
427
|
+
*
|
|
428
|
+
* What it trains on: its `tags`, the `datasets` it adds, and the
|
|
429
|
+
* `conditions` that narrow both. `auto_scoring` is the judge's scoring of
|
|
430
|
+
* its unreviewed samples (null where the platform does not score them):
|
|
431
|
+
* `message` is the service's sentence for it, and `minimums.picked_by_judge`
|
|
432
|
+
* how many of the samples it has the judge picked.
|
|
378
433
|
*/
|
|
379
434
|
getPipeline(id: string): Promise<Pipeline>;
|
|
380
435
|
/**
|
|
@@ -382,7 +437,8 @@ export declare class Loop {
|
|
|
382
437
|
* it made, winner or not, each the shape `attempts` has on the pipeline
|
|
383
438
|
* (with its `explanation` in plain words). `limit` is 50 when absent and at
|
|
384
439
|
* most 200. Narrow by `result` (`became_version`, `not_better`,
|
|
385
|
-
* `inconclusive
|
|
440
|
+
* `inconclusive` -- tested, could not decide --, `not_tested` -- ended
|
|
441
|
+
* before it was tested --, `failed`, `stopped`, `running` -- which includes one
|
|
386
442
|
* waiting for a decision -- or `waiting_for_review`) and by `model` (`main`,
|
|
387
443
|
* or `second` for the second model's attempts); `total` follows the
|
|
388
444
|
* filters.
|
|
@@ -423,12 +479,21 @@ export declare class Loop {
|
|
|
423
479
|
* version, on what it has not learned plus a replay of what it already
|
|
424
480
|
* learned (about half of what it trains on, picked at random); a winner
|
|
425
481
|
* is merged in.
|
|
426
|
-
* What is charged is the GPU time the
|
|
427
|
-
*
|
|
482
|
+
* What is charged is the GPU time the attempts actually use and, where the
|
|
483
|
+
* platform scores samples, the judge's scoring of unreviewed samples, shown
|
|
484
|
+
* on the attempt it was for; the platform's own per-run and monthly limits
|
|
485
|
+
* stop a run that goes wrong. `holdout.percent`
|
|
428
486
|
* (5 to 20, default 5) is the share of its samples held back to judge each
|
|
429
487
|
* attempt and never trained on. `training` sets any of its training
|
|
430
488
|
* settings (`epochs`, `learning_rate`, `lora_rank`, `lora_alpha`,
|
|
431
489
|
* `replay_percent`); left out, or null, every one is automatic.
|
|
490
|
+
* `datasets` (ids from {@link listDatasets}) adds their samples to what its
|
|
491
|
+
* tags select, and `conditions` narrows both. The judge's scoring of
|
|
492
|
+
* unreviewed samples is on unless `auto_scoring: { enabled: false }`.
|
|
493
|
+
* Where the platform scores samples (the pipeline's `auto_scoring` is not
|
|
494
|
+
* null), while the pipeline is short of the samples its next attempt
|
|
495
|
+
* needs, the judge scores samples nobody reviewed and the ones scoring 0.8
|
|
496
|
+
* or more are trained on; what it cost shows on the attempt it was for.
|
|
432
497
|
*/
|
|
433
498
|
createPipeline(params: PipelineWriteRequest): Promise<PipelineMutationResponse>;
|
|
434
499
|
/**
|
|
@@ -442,7 +507,12 @@ export declare class Loop {
|
|
|
442
507
|
* `training: null` puts every one back to automatic; the next attempt
|
|
443
508
|
* trains with them, and earlier attempts keep the settings they trained
|
|
444
509
|
* with. Out of range is 422 `TRAINING_SETTING_OUT_OF_RANGE`, naming the
|
|
445
|
-
* field.
|
|
510
|
+
* field. `datasets` (`[]` takes every one off) and `conditions` (null
|
|
511
|
+
* clears them) change what it trains on from the next attempt: nothing is
|
|
512
|
+
* trained again, versions already made keep what they learned, and to make
|
|
513
|
+
* the live version forget samples, delete them ({@link deleteTrace}).
|
|
514
|
+
* `auto_scoring: { enabled: false }` stops the judge's scoring of
|
|
515
|
+
* unreviewed samples. Saving is the authorization, as on a create.
|
|
446
516
|
*/
|
|
447
517
|
updatePipeline(id: string, params: PipelineWriteRequest): Promise<PipelineMutationResponse>;
|
|
448
518
|
/**
|
|
@@ -479,6 +549,47 @@ export declare class Loop {
|
|
|
479
549
|
* that brought no verdict of its own as a good example to learn from.
|
|
480
550
|
*/
|
|
481
551
|
importIntoPipeline(id: string, params: PipelineImportParams): Promise<LoopImportResult>;
|
|
552
|
+
/** The workspace's datasets, the most recently changed first: `{ datasets, total, limit, offset }`. */
|
|
553
|
+
listDatasets(params?: LoopDatasetListParams): Promise<LoopDatasetListResponse>;
|
|
554
|
+
/**
|
|
555
|
+
* One dataset: its conditions, how many samples it selects now (`samples`,
|
|
556
|
+
* the same number `listTraces({ dataset: id })` totals) by feedback, how
|
|
557
|
+
* many are in a benchmark (never trained on), and the pipelines that train
|
|
558
|
+
* on it (`used_by`).
|
|
559
|
+
*/
|
|
560
|
+
getDataset(id: string): Promise<LoopDataset>;
|
|
561
|
+
/**
|
|
562
|
+
* Save a dataset: a `name` (unique in the workspace, whatever its case:
|
|
563
|
+
* 409 `DATASET_NAME_TAKEN`) and any of its conditions. Nothing trains on
|
|
564
|
+
* it until a pipeline adds it.
|
|
565
|
+
*/
|
|
566
|
+
createDataset(params: LoopDatasetCreate): Promise<LoopDataset>;
|
|
567
|
+
/**
|
|
568
|
+
* Change a dataset: only the fields sent change (null clears `origin`,
|
|
569
|
+
* `model`, `from` or `to`; `[]` clears `tags` or `feedback`). Pass
|
|
570
|
+
* `expected_revision` to be refused 409 `REVISION_MISMATCH` rather than
|
|
571
|
+
* overwrite someone else's edit. Every pipeline in `used_by` trains on the
|
|
572
|
+
* new selection from its next attempt: samples that join count as new
|
|
573
|
+
* samples, nothing is trained again, and versions already made keep what
|
|
574
|
+
* they learned.
|
|
575
|
+
*/
|
|
576
|
+
updateDataset(id: string, params: LoopDatasetWrite): Promise<LoopDataset>;
|
|
577
|
+
/**
|
|
578
|
+
* Delete a dataset. Its samples stay. Every pipeline that trained on it
|
|
579
|
+
* (`removed_from`) stops taking its samples from its next attempt; versions
|
|
580
|
+
* already made keep what they learned. It cannot be undone.
|
|
581
|
+
*/
|
|
582
|
+
deleteDataset(id: string): Promise<LoopDatasetDeleteResponse>;
|
|
583
|
+
/**
|
|
584
|
+
* Count what a set of conditions selects, before saving anything: the
|
|
585
|
+
* samples, by feedback, how many are in a benchmark, and the models that
|
|
586
|
+
* answered them. `datasets` adds saved datasets' samples, as a pipeline
|
|
587
|
+
* does, so a pipeline's tags, datasets and conditions can be counted in
|
|
588
|
+
* one call. The counts are before duplicates and over-long conversations
|
|
589
|
+
* are set aside; a pipeline's own `minimums` are the exact training
|
|
590
|
+
* numbers. It writes nothing.
|
|
591
|
+
*/
|
|
592
|
+
previewDataset(params?: LoopDatasetPreviewParams): Promise<LoopDatasetPreview>;
|
|
482
593
|
/** The pipeline's benchmarks in priority order (1 is the primary), the ones it stopped using, and its promotion policy. */
|
|
483
594
|
listPipelineBenchmarks(id: string): Promise<PipelineBenchmarksResponse>;
|
|
484
595
|
/** Add a benchmark to a pipeline, last unless `priority` says where. Every version from now on is replayed on it. */
|
|
@@ -504,7 +615,7 @@ export declare class Loop {
|
|
|
504
615
|
* and `.b` are each attempt's mean and pass rate over those same
|
|
505
616
|
* conversations -- the like-for-like figures; each side's `holdout` is over
|
|
506
617
|
* its own, possibly larger, set. When the two were scored differently
|
|
507
|
-
* (another
|
|
618
|
+
* (another judge or rubric), `shared_sample.comparable` is false,
|
|
508
619
|
* `why` says so, no direction is given and `filter` is refused (400); a
|
|
509
620
|
* conversation whose right answer changed between them has no direction
|
|
510
621
|
* either. Numbers and ids only: read an answer with `listEvaluationItems`.
|