runbios-sdk 0.2.20-dev.283 → 0.2.20-dev.289
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 +36 -9
- package/dist/resources/loop.js +45 -8
- package/dist/types.d.ts +241 -40
- 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.20-dev.
|
|
39
|
+
export declare const VERSION = "0.2.20-dev.289";
|
|
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, ServingKind, TrainingRulePausedReason, TrainingTrigger, TrainingRecipe, TrainingRunState, TrainingVerdict, TrainingDecision, EvaluationStatus, EvaluationItemStatus, EvaluationWinner, EvaluationItemWinnerFilter, EvaluationWarningCode, TrainingToolCall, TrainingMessage, TrainingRuleServing, TrainingRunPromoteRequest, TrainingRunRejectRequest, TrainingRunRollbackRequest, TrainingRunCancelRequest, TrainingRunListParams, TrainingRun, TrainingRunSummary, TrainingRunEvent, TrainingRunLinks, TrainingRunActions, EvaluationRef, EvaluationDecoding, EvaluationJudgeDimension, EvaluationDimensionScore, EvaluationWarning, EvaluationMargin, 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';
|
|
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, EvaluationStatus, EvaluationItemStatus, EvaluationWinner, EvaluationItemWinnerFilter, 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, 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, PipelineAttemptTrigger, PipelineAttemptOutcome, PipelineLiveDeploymentStatus, PipelineLiveDeployment, 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, VersionHoldout, 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.20-dev.
|
|
39
|
+
export const VERSION = '0.2.20-dev.289';
|
|
40
40
|
export class RunBiOS {
|
|
41
41
|
/** Search models, fetch configs, check adapter compatibility. */
|
|
42
42
|
models;
|
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, 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, Pipeline, PipelineListParams, PipelineListResponse, PipelineWriteRequest, PipelineMutationResponse, LoopModelsResponse, PipelineImportParams, PipelineBenchmarksResponse, PipelineBenchmarkAttachParams, PipelineBenchmarkMoveParams, VersionCompareResponse, VersionCompareParams } from '../types.js';
|
|
2
|
+
import type { LoopTrace, LoopTraceListResponse, LoopTraceListParams, LoopCaptureParams, LoopCaptureResult, LoopImportParams, LoopImportResult, LoopSignal, LoopSignalParams, 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, PipelineListParams, PipelineListResponse, PipelineWriteRequest, PipelineMutationResponse, LoopModelsResponse, PipelineImportParams, PipelineBenchmarksResponse, PipelineBenchmarkAttachParams, PipelineBenchmarkMoveParams, VersionCompareResponse, VersionCompareParams } from '../types.js';
|
|
3
3
|
/**
|
|
4
4
|
* The Conscious Loop -- pipelines that keep improving a model from the
|
|
5
5
|
* conversations you send them.
|
|
@@ -368,8 +368,10 @@ export declare class Loop {
|
|
|
368
368
|
* The base models a pipeline can train: only those the engine trains with
|
|
369
369
|
* LoRA SFT and the platform can serve for the comparison, recommended first.
|
|
370
370
|
* The one list {@link createPipeline} accepts a `model.id` from, with the
|
|
371
|
-
* `floors` a
|
|
372
|
-
* the
|
|
371
|
+
* fixed `floors` a pipeline is held to: the samples its first attempt
|
|
372
|
+
* needs, and the new samples each later attempt waits for
|
|
373
|
+
* (`new_samples`, or `new_samples_percent` of the rows the last trained
|
|
374
|
+
* attempt trained on when that is more). They are read-only.
|
|
373
375
|
*/
|
|
374
376
|
listModels(): Promise<LoopModelsResponse>;
|
|
375
377
|
/**
|
|
@@ -391,9 +393,17 @@ export declare class Loop {
|
|
|
391
393
|
*/
|
|
392
394
|
updatePipeline(id: string, params: PipelineWriteRequest): Promise<PipelineMutationResponse>;
|
|
393
395
|
/**
|
|
394
|
-
* Delete a pipeline: an attempt still running is cancelled
|
|
395
|
-
*
|
|
396
|
-
*
|
|
396
|
+
* Delete a pipeline: an attempt still running is cancelled, the deployment
|
|
397
|
+
* its live version answers from is stopped and deleted -- it stops
|
|
398
|
+
* answering and is no longer billed -- unless another pipeline or model
|
|
399
|
+
* name of yours answers from it too. If one does, that deployment keeps
|
|
400
|
+
* running and billed until you stop it on Deployments, and its trained
|
|
401
|
+
* checkpoint is kept (and billed as storage) until that deployment is
|
|
402
|
+
* deleted. Its history is deleted with it: the checkpoints its attempts
|
|
403
|
+
* trained, the sets they trained on, and every conversation of their
|
|
404
|
+
* comparison and benchmark reports. That happens in the background after
|
|
405
|
+
* this returns. Your samples and their tags are kept. Recording to its own
|
|
406
|
+
* tag stops. It cannot be undone.
|
|
397
407
|
*/
|
|
398
408
|
deletePipeline(id: string): Promise<TrainingRuleDeleteResponse>;
|
|
399
409
|
/**
|
|
@@ -437,12 +447,16 @@ export declare class Loop {
|
|
|
437
447
|
* your own reviewers, is reported with the warning that says so rather than
|
|
438
448
|
* withheld. `margin_used` is the thresholds this verdict was measured
|
|
439
449
|
* against, frozen with the report, so a later policy change cannot rewrite
|
|
440
|
-
* what a past decision meant.
|
|
450
|
+
* what a past decision meant. `candidate_pass_rate` and
|
|
451
|
+
* `incumbent_pass_rate` are the share of conversations each side passed
|
|
452
|
+
* (score 0.70 or more).
|
|
441
453
|
*/
|
|
442
454
|
getEvaluation(id: string): Promise<Evaluation>;
|
|
443
455
|
/**
|
|
444
|
-
* The paired conversations behind the numbers: one prompt,
|
|
445
|
-
*
|
|
456
|
+
* The paired conversations behind the numbers: one prompt, the reference a
|
|
457
|
+
* person gave for it, both answers, what the judge made of each (its scores,
|
|
458
|
+
* its reason, and whether the answer passed: score 0.70 or more), the
|
|
459
|
+
* direct comparison in both orders, and which won.
|
|
446
460
|
*
|
|
447
461
|
* Filter by `winner` -- `candidate` (the attempt won), `serving` (the version
|
|
448
462
|
* serving today won; the item itself says `incumbent`) or `tie` -- and read
|
|
@@ -526,4 +540,17 @@ export declare class Loop {
|
|
|
526
540
|
* different set, which is the exact defect a standing benchmark removes.
|
|
527
541
|
*/
|
|
528
542
|
getBenchmarkRun(id: string): Promise<BenchmarkRun>;
|
|
543
|
+
/**
|
|
544
|
+
* The conversations behind one replay, in the benchmark's order: the pinned
|
|
545
|
+
* prompt and its reference, both answers, what the judge made of each (its
|
|
546
|
+
* scores, its reason, and whether the answer passed: score 0.70 or more),
|
|
547
|
+
* and which side won it.
|
|
548
|
+
*
|
|
549
|
+
* Filter by `winner` -- `candidate` (the attempt won), `serving` (the
|
|
550
|
+
* version serving today won; the item itself says `incumbent`) or `tie` --
|
|
551
|
+
* exactly as on a comparison report's items. `limit` is 50 when absent and
|
|
552
|
+
* at most 200. A replay that stopped before it began has no conversations:
|
|
553
|
+
* its `status_reason` says why.
|
|
554
|
+
*/
|
|
555
|
+
listBenchmarkRunItems(id: string, params?: BenchmarkRunItemListParams): Promise<BenchmarkRunItemsResponse>;
|
|
529
556
|
}
|
package/dist/resources/loop.js
CHANGED
|
@@ -512,8 +512,10 @@ export class Loop {
|
|
|
512
512
|
* The base models a pipeline can train: only those the engine trains with
|
|
513
513
|
* LoRA SFT and the platform can serve for the comparison, recommended first.
|
|
514
514
|
* The one list {@link createPipeline} accepts a `model.id` from, with the
|
|
515
|
-
* `floors` a
|
|
516
|
-
* the
|
|
515
|
+
* fixed `floors` a pipeline is held to: the samples its first attempt
|
|
516
|
+
* needs, and the new samples each later attempt waits for
|
|
517
|
+
* (`new_samples`, or `new_samples_percent` of the rows the last trained
|
|
518
|
+
* attempt trained on when that is more). They are read-only.
|
|
517
519
|
*/
|
|
518
520
|
async listModels() {
|
|
519
521
|
const res = await this._http.fetchGet('/api/loop/models');
|
|
@@ -542,9 +544,17 @@ export class Loop {
|
|
|
542
544
|
return this._http.fetchPut(`/api/loop/pipelines/${encodeURIComponent(id)}`, params);
|
|
543
545
|
}
|
|
544
546
|
/**
|
|
545
|
-
* Delete a pipeline: an attempt still running is cancelled
|
|
546
|
-
*
|
|
547
|
-
*
|
|
547
|
+
* Delete a pipeline: an attempt still running is cancelled, the deployment
|
|
548
|
+
* its live version answers from is stopped and deleted -- it stops
|
|
549
|
+
* answering and is no longer billed -- unless another pipeline or model
|
|
550
|
+
* name of yours answers from it too. If one does, that deployment keeps
|
|
551
|
+
* running and billed until you stop it on Deployments, and its trained
|
|
552
|
+
* checkpoint is kept (and billed as storage) until that deployment is
|
|
553
|
+
* deleted. Its history is deleted with it: the checkpoints its attempts
|
|
554
|
+
* trained, the sets they trained on, and every conversation of their
|
|
555
|
+
* comparison and benchmark reports. That happens in the background after
|
|
556
|
+
* this returns. Your samples and their tags are kept. Recording to its own
|
|
557
|
+
* tag stops. It cannot be undone.
|
|
548
558
|
*/
|
|
549
559
|
async deletePipeline(id) {
|
|
550
560
|
return this._http.fetchDelete(`/api/loop/pipelines/${encodeURIComponent(id)}`);
|
|
@@ -612,14 +622,18 @@ export class Loop {
|
|
|
612
622
|
* your own reviewers, is reported with the warning that says so rather than
|
|
613
623
|
* withheld. `margin_used` is the thresholds this verdict was measured
|
|
614
624
|
* against, frozen with the report, so a later policy change cannot rewrite
|
|
615
|
-
* what a past decision meant.
|
|
625
|
+
* what a past decision meant. `candidate_pass_rate` and
|
|
626
|
+
* `incumbent_pass_rate` are the share of conversations each side passed
|
|
627
|
+
* (score 0.70 or more).
|
|
616
628
|
*/
|
|
617
629
|
async getEvaluation(id) {
|
|
618
630
|
return this._http.fetchGet(`/api/loop/evaluations/${encodeURIComponent(id)}`);
|
|
619
631
|
}
|
|
620
632
|
/**
|
|
621
|
-
* The paired conversations behind the numbers: one prompt,
|
|
622
|
-
*
|
|
633
|
+
* The paired conversations behind the numbers: one prompt, the reference a
|
|
634
|
+
* person gave for it, both answers, what the judge made of each (its scores,
|
|
635
|
+
* its reason, and whether the answer passed: score 0.70 or more), the
|
|
636
|
+
* direct comparison in both orders, and which won.
|
|
623
637
|
*
|
|
624
638
|
* Filter by `winner` -- `candidate` (the attempt won), `serving` (the version
|
|
625
639
|
* serving today won; the item itself says `incumbent`) or `tie` -- and read
|
|
@@ -752,4 +766,27 @@ export class Loop {
|
|
|
752
766
|
const res = await this._http.fetchGet(`/api/loop/benchmark-runs/${encodeURIComponent(id)}`);
|
|
753
767
|
return res.benchmark_run;
|
|
754
768
|
}
|
|
769
|
+
/**
|
|
770
|
+
* The conversations behind one replay, in the benchmark's order: the pinned
|
|
771
|
+
* prompt and its reference, both answers, what the judge made of each (its
|
|
772
|
+
* scores, its reason, and whether the answer passed: score 0.70 or more),
|
|
773
|
+
* and which side won it.
|
|
774
|
+
*
|
|
775
|
+
* Filter by `winner` -- `candidate` (the attempt won), `serving` (the
|
|
776
|
+
* version serving today won; the item itself says `incumbent`) or `tie` --
|
|
777
|
+
* exactly as on a comparison report's items. `limit` is 50 when absent and
|
|
778
|
+
* at most 200. A replay that stopped before it began has no conversations:
|
|
779
|
+
* its `status_reason` says why.
|
|
780
|
+
*/
|
|
781
|
+
async listBenchmarkRunItems(id, params = {}) {
|
|
782
|
+
const q = new URLSearchParams();
|
|
783
|
+
if (params.winner)
|
|
784
|
+
q.set('winner', params.winner);
|
|
785
|
+
if (params.limit != null)
|
|
786
|
+
q.set('limit', String(params.limit));
|
|
787
|
+
if (params.offset != null)
|
|
788
|
+
q.set('offset', String(params.offset));
|
|
789
|
+
const qs = q.toString();
|
|
790
|
+
return this._http.fetchGet(`/api/loop/benchmark-runs/${encodeURIComponent(id)}/items${qs ? `?${qs}` : ''}`);
|
|
791
|
+
}
|
|
755
792
|
}
|
package/dist/types.d.ts
CHANGED
|
@@ -178,14 +178,6 @@ export interface Model {
|
|
|
178
178
|
/** Run BiOS-side usage rollups for this model. */
|
|
179
179
|
train_count?: number;
|
|
180
180
|
inference_count?: number;
|
|
181
|
-
verified_at?: string | null;
|
|
182
|
-
/** Per-surface verification badges plus the image build that passed. */
|
|
183
|
-
training_verified?: boolean;
|
|
184
|
-
training_verified_at?: string | null;
|
|
185
|
-
training_verified_image?: string;
|
|
186
|
-
inference_verified?: boolean;
|
|
187
|
-
inference_verified_at?: string | null;
|
|
188
|
-
inference_verified_image?: string;
|
|
189
181
|
updated_at?: string;
|
|
190
182
|
/**
|
|
191
183
|
* Native max context window in tokens -- the ceiling a deployment's
|
|
@@ -2784,6 +2776,7 @@ export interface LoopMetricPoint {
|
|
|
2784
2776
|
mean_delta: number | null;
|
|
2785
2777
|
judge_incumbent_mean: number | null;
|
|
2786
2778
|
judge_candidate_mean: number | null;
|
|
2779
|
+
/** The trainer's loss on its validation slice, as {@link Evaluation.trainer_eval_loss}. */
|
|
2787
2780
|
trainer_eval_loss: number | null;
|
|
2788
2781
|
/** The bar this attempt had to clear, frozen with its report. */
|
|
2789
2782
|
promote_margin: number | null;
|
|
@@ -3005,6 +2998,7 @@ export interface TrainingRun {
|
|
|
3005
2998
|
train_rows: number | null;
|
|
3006
2999
|
holdout_rows: number | null;
|
|
3007
3000
|
train_dataset_id: string | null;
|
|
3001
|
+
/** Null on a run made since the held-back rows stopped leaving the loop; set on older runs. */
|
|
3008
3002
|
holdout_dataset_id: string | null;
|
|
3009
3003
|
training_job_id: string | null;
|
|
3010
3004
|
job_status: string | null;
|
|
@@ -3029,6 +3023,7 @@ export interface TrainingRun {
|
|
|
3029
3023
|
model_family: string | null;
|
|
3030
3024
|
/** Machine time the run held (training job plus comparison machine); null until known. */
|
|
3031
3025
|
gpu_seconds: number | null;
|
|
3026
|
+
/** The trainer's loss on its validation slice, as {@link Evaluation.trainer_eval_loss}. */
|
|
3032
3027
|
training_eval_loss: number | null;
|
|
3033
3028
|
candidate_deployment_id: string | null;
|
|
3034
3029
|
candidate_name: string | null;
|
|
@@ -3119,6 +3114,7 @@ export interface TrainingRunEvent {
|
|
|
3119
3114
|
export interface TrainingRunLinks {
|
|
3120
3115
|
training_job_url: string | null;
|
|
3121
3116
|
candidate_url: string | null;
|
|
3117
|
+
/** The console page of this attempt's comparison report, every conversation included. */
|
|
3122
3118
|
evaluation_url: string | null;
|
|
3123
3119
|
/** The TREND the benchmark number belongs to, not the one replay. */
|
|
3124
3120
|
benchmark_url: string | null;
|
|
@@ -3189,8 +3185,25 @@ export interface Evaluation {
|
|
|
3189
3185
|
mean_delta: number | null;
|
|
3190
3186
|
judge_incumbent_mean: number | null;
|
|
3191
3187
|
judge_candidate_mean: number | null;
|
|
3188
|
+
/**
|
|
3189
|
+
* An answer PASSED (score 0.70 or more) when the judge scored it at least
|
|
3190
|
+
* `pass_threshold`; an answer with no score never passes. `*_passed`
|
|
3191
|
+
* counts the conversations each side passed, and `*_pass_rate` is that
|
|
3192
|
+
* count over `rows_scored`. The counts are null until the report is
|
|
3193
|
+
* finished, and the rates also when nothing was scored.
|
|
3194
|
+
*/
|
|
3195
|
+
pass_threshold: number;
|
|
3196
|
+
incumbent_passed: number | null;
|
|
3197
|
+
candidate_passed: number | null;
|
|
3198
|
+
incumbent_pass_rate: number | null;
|
|
3199
|
+
candidate_pass_rate: number | null;
|
|
3192
3200
|
per_dimension: EvaluationDimensionScore[];
|
|
3193
|
-
/**
|
|
3201
|
+
/**
|
|
3202
|
+
* The trainer's loss on its validation slice: about 5% of the rows the
|
|
3203
|
+
* attempt trains on, kept aside to pick the best checkpoint. Informational:
|
|
3204
|
+
* there is no incumbent counterpart to compare it against, and it is not
|
|
3205
|
+
* measured on the held-back conversations this report compares.
|
|
3206
|
+
*/
|
|
3194
3207
|
trainer_eval_loss: number | null;
|
|
3195
3208
|
warnings: EvaluationWarning[];
|
|
3196
3209
|
verdict: TrainingVerdict | null;
|
|
@@ -3204,12 +3217,56 @@ export interface Evaluation {
|
|
|
3204
3217
|
created_at: string;
|
|
3205
3218
|
finished_at: string | null;
|
|
3206
3219
|
}
|
|
3220
|
+
/**
|
|
3221
|
+
* What the judge made of one answer: its overall score, one score per rubric
|
|
3222
|
+
* dimension (keyed as `judge_dimensions` names them), and the judge's reason
|
|
3223
|
+
* in its own words, with anything that looks like a credential or a personal
|
|
3224
|
+
* detail removed. `reason` is null when the judge gave none.
|
|
3225
|
+
*/
|
|
3226
|
+
export interface EvaluationItemJudge {
|
|
3227
|
+
overall: number;
|
|
3228
|
+
dimensions: Record<string, number>;
|
|
3229
|
+
reason: string | null;
|
|
3230
|
+
}
|
|
3231
|
+
/**
|
|
3232
|
+
* Where a conversation's reference answer came from: a person said the
|
|
3233
|
+
* model's own answer was `good`, a person's `correction`, or a `gold` answer
|
|
3234
|
+
* written as the right one.
|
|
3235
|
+
*/
|
|
3236
|
+
export type EvaluationReferenceKind = 'good' | 'correction' | 'gold';
|
|
3237
|
+
/**
|
|
3238
|
+
* What a person said the right answer is, frozen with the report and shown
|
|
3239
|
+
* to the judge beside both answers. Null on a conversation nobody gave one.
|
|
3240
|
+
*/
|
|
3241
|
+
export interface EvaluationReference {
|
|
3242
|
+
answer: string;
|
|
3243
|
+
kind: EvaluationReferenceKind;
|
|
3244
|
+
}
|
|
3245
|
+
/** Which answer the judge preferred in one order of showing them, and why. */
|
|
3246
|
+
export interface EvaluationPairwiseOrder {
|
|
3247
|
+
winner: EvaluationWinner;
|
|
3248
|
+
reason: string | null;
|
|
3249
|
+
}
|
|
3250
|
+
/**
|
|
3251
|
+
* The direct comparison, asked twice: once with the serving version's answer
|
|
3252
|
+
* shown first and once with the attempt's first. A win counts only when both
|
|
3253
|
+
* orders pick the same side (`agreed`); anything else is a `tie`, which is
|
|
3254
|
+
* what removes the judge's preference for whichever answer it reads first.
|
|
3255
|
+
*/
|
|
3256
|
+
export interface EvaluationItemPairwise {
|
|
3257
|
+
incumbent_first: EvaluationPairwiseOrder;
|
|
3258
|
+
candidate_first: EvaluationPairwiseOrder;
|
|
3259
|
+
winner: EvaluationWinner;
|
|
3260
|
+
agreed: boolean;
|
|
3261
|
+
}
|
|
3207
3262
|
/** One model's answer to one held-out conversation, with the scores it earned. */
|
|
3208
3263
|
export interface EvaluationItemSide {
|
|
3209
3264
|
completion: string | null;
|
|
3210
3265
|
tool_calls: TrainingToolCall[] | null;
|
|
3211
|
-
judge:
|
|
3266
|
+
judge: EvaluationItemJudge | null;
|
|
3212
3267
|
score: number | null;
|
|
3268
|
+
/** True when it passed (score 0.70 or more); null when it has no score. */
|
|
3269
|
+
passed: boolean | null;
|
|
3213
3270
|
model_version: string | null;
|
|
3214
3271
|
}
|
|
3215
3272
|
/**
|
|
@@ -3225,8 +3282,11 @@ export interface EvaluationItem {
|
|
|
3225
3282
|
trace_url: string | null;
|
|
3226
3283
|
prompt: TrainingMessage[];
|
|
3227
3284
|
tools: unknown[] | null;
|
|
3285
|
+
reference: EvaluationReference | null;
|
|
3228
3286
|
incumbent: EvaluationItemSide;
|
|
3229
3287
|
candidate: EvaluationItemSide;
|
|
3288
|
+
/** Null on a conversation compared before both orders were kept. */
|
|
3289
|
+
pairwise: EvaluationItemPairwise | null;
|
|
3230
3290
|
human_verdict: number | null;
|
|
3231
3291
|
winner: EvaluationWinner | null;
|
|
3232
3292
|
status: EvaluationItemStatus;
|
|
@@ -3351,11 +3411,16 @@ export interface BenchmarkItem {
|
|
|
3351
3411
|
/**
|
|
3352
3412
|
* One replay: this benchmark, on this training run, against both models.
|
|
3353
3413
|
*
|
|
3354
|
-
* IT
|
|
3355
|
-
*
|
|
3356
|
-
* cancels in its delta; an absolute
|
|
3357
|
-
*
|
|
3358
|
-
*
|
|
3414
|
+
* IT DECIDES A PROMOTION ONLY UNDER A POLICY THAT READS BENCHMARKS. The
|
|
3415
|
+
* paired comparison applies the judge to both sides of one conversation in
|
|
3416
|
+
* one pass, so most of the judge's variance cancels in its delta; an absolute
|
|
3417
|
+
* mean carries that variance whole. Under the default `holdout` policy a
|
|
3418
|
+
* replay is the number, the difference against what serves today on the same
|
|
3419
|
+
* set, and the history, and a person reads the trend. Under `all`, `primary`,
|
|
3420
|
+
* `k_of_n` or `weighted` the policy reads this replay's delta.
|
|
3421
|
+
*
|
|
3422
|
+
* Every conversation behind it, both answers and the judge's reasons, is
|
|
3423
|
+
* `listBenchmarkRunItems`.
|
|
3359
3424
|
*/
|
|
3360
3425
|
export interface BenchmarkRun {
|
|
3361
3426
|
id: string;
|
|
@@ -3375,6 +3440,25 @@ export interface BenchmarkRun {
|
|
|
3375
3440
|
incumbent_score: number | null;
|
|
3376
3441
|
score_delta: number | null;
|
|
3377
3442
|
per_dimension: BenchmarkDimensionScore[];
|
|
3443
|
+
/**
|
|
3444
|
+
* An answer PASSED (score 0.70 or more) when the judge scored it at least
|
|
3445
|
+
* `pass_threshold`. `*_passed` counts the conversations each side passed
|
|
3446
|
+
* and `*_pass_rate` is that count over `rows_scored`: null unless `status`
|
|
3447
|
+
* is `done`, like the scores.
|
|
3448
|
+
*/
|
|
3449
|
+
pass_threshold: number;
|
|
3450
|
+
incumbent_passed: number | null;
|
|
3451
|
+
candidate_passed: number | null;
|
|
3452
|
+
incumbent_pass_rate: number | null;
|
|
3453
|
+
candidate_pass_rate: number | null;
|
|
3454
|
+
/**
|
|
3455
|
+
* Conversations the attempt scored higher on (`wins`), lower on (`losses`),
|
|
3456
|
+
* or within the tie band promotion uses of the serving version (`ties`).
|
|
3457
|
+
* Null unless `status` is `done`.
|
|
3458
|
+
*/
|
|
3459
|
+
wins: number | null;
|
|
3460
|
+
losses: number | null;
|
|
3461
|
+
ties: number | null;
|
|
3378
3462
|
prompt_tokens: number;
|
|
3379
3463
|
completion_tokens: number;
|
|
3380
3464
|
spent_cents: number;
|
|
@@ -3406,11 +3490,53 @@ export interface BenchmarkHistoryPoint {
|
|
|
3406
3490
|
candidate_score: number | null;
|
|
3407
3491
|
incumbent_score: number | null;
|
|
3408
3492
|
score_delta: number | null;
|
|
3493
|
+
/** The share each side passed (score 0.70 or more); null when the replay has no score. */
|
|
3494
|
+
incumbent_pass_rate: number | null;
|
|
3495
|
+
candidate_pass_rate: number | null;
|
|
3409
3496
|
checkpoint_id: string | null;
|
|
3410
3497
|
decision: TrainingDecision | null;
|
|
3411
3498
|
status: BenchmarkRunStatus;
|
|
3412
3499
|
status_reason: string | null;
|
|
3413
3500
|
}
|
|
3501
|
+
/** One model's answer to one pinned conversation in a replay, and its score. */
|
|
3502
|
+
export interface BenchmarkRunItemSide {
|
|
3503
|
+
completion: string | null;
|
|
3504
|
+
judge: EvaluationItemJudge | null;
|
|
3505
|
+
score: number | null;
|
|
3506
|
+
/** True when it passed (score 0.70 or more); null when it has no score. */
|
|
3507
|
+
passed: boolean | null;
|
|
3508
|
+
}
|
|
3509
|
+
/**
|
|
3510
|
+
* One pinned conversation of one replay: the prompt, both answers, what the
|
|
3511
|
+
* judge made of each, and which side won it.
|
|
3512
|
+
*
|
|
3513
|
+
* `winner` compares the two scores: the side scoring higher by more than the
|
|
3514
|
+
* tie band promotion uses, `tie` inside it, and null until both are scored.
|
|
3515
|
+
* `source_trace_id` goes null once the conversation it was pinned from is
|
|
3516
|
+
* deleted; the pinned copy stays.
|
|
3517
|
+
*/
|
|
3518
|
+
export interface BenchmarkRunItem {
|
|
3519
|
+
id: number;
|
|
3520
|
+
benchmark_item_id: number;
|
|
3521
|
+
ordinal: number;
|
|
3522
|
+
source_trace_id: string | null;
|
|
3523
|
+
source_trace_url: string | null;
|
|
3524
|
+
prompt: TrainingMessage[];
|
|
3525
|
+
tools: unknown[] | null;
|
|
3526
|
+
reference: EvaluationReference | null;
|
|
3527
|
+
incumbent: BenchmarkRunItemSide;
|
|
3528
|
+
candidate: BenchmarkRunItemSide;
|
|
3529
|
+
winner: EvaluationWinner | null;
|
|
3530
|
+
status: EvaluationItemStatus;
|
|
3531
|
+
error: string | null;
|
|
3532
|
+
}
|
|
3533
|
+
/** Which conversations of a replay to read: the same three words a report's items take. */
|
|
3534
|
+
export interface BenchmarkRunItemListParams {
|
|
3535
|
+
winner?: EvaluationItemWinnerFilter;
|
|
3536
|
+
/** 50 when absent; at most 200. */
|
|
3537
|
+
limit?: number;
|
|
3538
|
+
offset?: number;
|
|
3539
|
+
}
|
|
3414
3540
|
/**
|
|
3415
3541
|
* Where the conversations are copied FROM. Read once, at creation, never again.
|
|
3416
3542
|
* A benchmark pins conversations by id; to make one from a file, import it
|
|
@@ -3506,6 +3632,10 @@ export type TrainingRuleRunRefusalCode = 'NOT_ENOUGH_SAMPLES' | 'PIPELINE_NEEDS_
|
|
|
3506
3632
|
* body (400, which names the field). The SDK's tests read them off the
|
|
3507
3633
|
* service. Nothing is saved when any of them is answered.
|
|
3508
3634
|
*
|
|
3635
|
+
* A `train_when.min_samples` is one of those 400s: the sample minimums are
|
|
3636
|
+
* fixed by the platform (`listModels` returns them as `floors`) and no body
|
|
3637
|
+
* sets them.
|
|
3638
|
+
*
|
|
3509
3639
|
* The name and tags:
|
|
3510
3640
|
* - `PIPELINE_NAME_TAKEN` (409): another pipeline in the workspace has the
|
|
3511
3641
|
* name, a deleted one included. Choose another name.
|
|
@@ -3520,11 +3650,9 @@ export type TrainingRuleRunRefusalCode = 'NOT_ENOUGH_SAMPLES' | 'PIPELINE_NEEDS_
|
|
|
3520
3650
|
* pipeline created before pipelines had them; its other settings can
|
|
3521
3651
|
* still change.
|
|
3522
3652
|
*
|
|
3523
|
-
* The model and
|
|
3653
|
+
* The model and how it is promoted:
|
|
3524
3654
|
* - `MODEL_NOT_TRAINABLE` (422): `model.id` or `challenger_model.id` is not a
|
|
3525
3655
|
* model `listModels` offers, or the challenger is the model itself.
|
|
3526
|
-
* - `MIN_SAMPLES_TOO_LOW` (422): `train_when.min_samples` is under the floor
|
|
3527
|
-
* `listModels` returns as `floors.new_samples`.
|
|
3528
3656
|
* - `NO_GPU_FITS` (422): no machines can train or serve the model right now.
|
|
3529
3657
|
* - `MODEL_REVISION_UNAVAILABLE` (422): the model could not be pinned to an
|
|
3530
3658
|
* exact revision because the training service did not answer. Try again
|
|
@@ -3552,7 +3680,7 @@ export type TrainingRuleRunRefusalCode = 'NOT_ENOUGH_SAMPLES' | 'PIPELINE_NEEDS_
|
|
|
3552
3680
|
* the key every comparison is scored with) did not answer just then. Try
|
|
3553
3681
|
* again in a minute.
|
|
3554
3682
|
*/
|
|
3555
|
-
export type TrainingRuleSaveRefusalCode = 'PIPELINE_NAME_TAKEN' | 'OWN_TAG_TAKEN' | 'REVISION_MISMATCH' | 'RUN_ACTIVE' | 'NOT_A_SIMPLE_PIPELINE' | 'MODEL_NOT_TRAINABLE' | '
|
|
3683
|
+
export type TrainingRuleSaveRefusalCode = 'PIPELINE_NAME_TAKEN' | 'OWN_TAG_TAKEN' | 'REVISION_MISMATCH' | 'RUN_ACTIVE' | 'NOT_A_SIMPLE_PIPELINE' | 'MODEL_NOT_TRAINABLE' | 'NO_GPU_FITS' | 'MODEL_REVISION_UNAVAILABLE' | 'NO_JUDGE_MODEL' | 'PROMOTION_POLICY_UNKNOWN' | 'PROMOTION_K_REQUIRED' | 'PROMOTION_K_UNREACHABLE' | 'PROMOTION_POLICY_NEEDS_BENCHMARK' | 'TRAINING_NOT_ENABLED' | 'METHOD_NOT_ENABLED' | 'CEILING_TOO_LOW' | 'MODELS_UNAVAILABLE' | 'GPU_OPTIONS_UNAVAILABLE' | 'AGENT_COULD_NOT_START';
|
|
3556
3684
|
/**
|
|
3557
3685
|
* The body of a manual run refused `409 MONTHLY_LIMIT_REACHED`, as
|
|
3558
3686
|
* `ApiError.body` carries it.
|
|
@@ -3671,6 +3799,9 @@ export interface PipelineVersion {
|
|
|
3671
3799
|
rows_scored: number | null;
|
|
3672
3800
|
win_rate: number | null;
|
|
3673
3801
|
mean_delta: number | null;
|
|
3802
|
+
/** The share of those conversations each side passed (score 0.70 or more). */
|
|
3803
|
+
candidate_pass_rate: number | null;
|
|
3804
|
+
incumbent_pass_rate: number | null;
|
|
3674
3805
|
/**
|
|
3675
3806
|
* The standing benchmark's replay of this version, when the rule has one.
|
|
3676
3807
|
* Only scores with `benchmark_comparable` sit on one axis.
|
|
@@ -3757,6 +3888,12 @@ export interface PipelineAttempt {
|
|
|
3757
3888
|
cost_up_to: boolean;
|
|
3758
3889
|
verdict: TrainingVerdict | null;
|
|
3759
3890
|
win_rate: number | null;
|
|
3891
|
+
/**
|
|
3892
|
+
* The share of the held-back conversations the attempt and the version it
|
|
3893
|
+
* was compared with passed (score 0.70 or more); null until it is compared.
|
|
3894
|
+
*/
|
|
3895
|
+
candidate_pass_rate: number | null;
|
|
3896
|
+
incumbent_pass_rate: number | null;
|
|
3760
3897
|
evaluation_id: string | null;
|
|
3761
3898
|
/** Its last sentence. */
|
|
3762
3899
|
reason: string | null;
|
|
@@ -3783,12 +3920,12 @@ export interface PipelineSchedule {
|
|
|
3783
3920
|
hour_utc: number;
|
|
3784
3921
|
}
|
|
3785
3922
|
/**
|
|
3786
|
-
* When a pipeline trains:
|
|
3787
|
-
*
|
|
3788
|
-
* is
|
|
3923
|
+
* When a pipeline trains: once it has the samples the platform's fixed
|
|
3924
|
+
* minimum asks for (`minimums` says how many, and how many it has) AND, when
|
|
3925
|
+
* there is a schedule, at its scheduled slot. A null schedule trains as soon
|
|
3926
|
+
* as the minimum is met. The minimum is not a setting: no body sets it.
|
|
3789
3927
|
*/
|
|
3790
3928
|
export interface PipelineTrainWhen {
|
|
3791
|
-
min_samples: number;
|
|
3792
3929
|
schedule: PipelineSchedule | null;
|
|
3793
3930
|
}
|
|
3794
3931
|
/** What is held back beyond max(50, 5% of the data): a larger percent, or a count. */
|
|
@@ -3796,9 +3933,15 @@ export interface PipelineHoldout {
|
|
|
3796
3933
|
min_rows: number;
|
|
3797
3934
|
}
|
|
3798
3935
|
/**
|
|
3799
|
-
* How far the data is from the next
|
|
3800
|
-
*
|
|
3801
|
-
*
|
|
3936
|
+
* How far the data is from the next attempt, by the platform's fixed
|
|
3937
|
+
* minimums (`floors` on `listModels`). READ-ONLY: no body changes them.
|
|
3938
|
+
*
|
|
3939
|
+
* `first_version`: `needed` usable samples the first attempt needs -- the
|
|
3940
|
+
* rows it trains on plus the ones held back to judge it. `new_rows`: `needed`
|
|
3941
|
+
* usable samples the last trained attempt did not have, which is
|
|
3942
|
+
* `floors.new_samples` or `floors.new_samples_percent` of the rows that
|
|
3943
|
+
* attempt trained on, whichever is more. `have`, `short` and `message` are
|
|
3944
|
+
* measured on the detail only.
|
|
3802
3945
|
*/
|
|
3803
3946
|
export interface PipelineMinimums {
|
|
3804
3947
|
basis: 'first_version' | 'new_rows';
|
|
@@ -3807,6 +3950,22 @@ export interface PipelineMinimums {
|
|
|
3807
3950
|
short: number | null;
|
|
3808
3951
|
message: string | null;
|
|
3809
3952
|
}
|
|
3953
|
+
/**
|
|
3954
|
+
* The state of the live version's deployment:
|
|
3955
|
+
* - `serving`: it answers.
|
|
3956
|
+
* - `starting`: it is on its way up.
|
|
3957
|
+
* - `stopped`, `paused_for_funds` (the wallet ran out) and `deleted`: it does
|
|
3958
|
+
* not answer and is not billed.
|
|
3959
|
+
* - `paused_by_platform`: the platform paused it because billing could not be
|
|
3960
|
+
* reached; it does not answer.
|
|
3961
|
+
* - `failed`: it does not answer.
|
|
3962
|
+
*/
|
|
3963
|
+
export type PipelineLiveDeploymentStatus = 'serving' | 'starting' | 'stopped' | 'paused_for_funds' | 'paused_by_platform' | 'failed' | 'deleted';
|
|
3964
|
+
/** The live version's deployment, as last checked (`checked_at`). */
|
|
3965
|
+
export interface PipelineLiveDeployment {
|
|
3966
|
+
status: PipelineLiveDeploymentStatus;
|
|
3967
|
+
checked_at: string;
|
|
3968
|
+
}
|
|
3810
3969
|
export interface Pipeline {
|
|
3811
3970
|
rule_id: string;
|
|
3812
3971
|
rule_name: string;
|
|
@@ -3842,6 +4001,12 @@ export interface Pipeline {
|
|
|
3842
4001
|
live_version: number | null;
|
|
3843
4002
|
/** The same number under its older name. */
|
|
3844
4003
|
champion_version: number | null;
|
|
4004
|
+
/**
|
|
4005
|
+
* Whether the deployment the live version answers from is up, as the
|
|
4006
|
+
* platform last checked it. Null when there is no live version, when what
|
|
4007
|
+
* serves is not a deployment, or before the first check of that deployment.
|
|
4008
|
+
*/
|
|
4009
|
+
live_deployment: PipelineLiveDeployment | null;
|
|
3845
4010
|
/** The name the app calls. It does not change when a version is promoted. */
|
|
3846
4011
|
serving_name: string;
|
|
3847
4012
|
/**
|
|
@@ -3903,10 +4068,10 @@ export interface TrainingRuleDeleteResponse {
|
|
|
3903
4068
|
deleted: boolean;
|
|
3904
4069
|
rule_id: string;
|
|
3905
4070
|
/**
|
|
3906
|
-
* The name this delete just spent. The
|
|
3907
|
-
*
|
|
3908
|
-
*
|
|
3909
|
-
*
|
|
4071
|
+
* The name this delete just spent. The pipeline's history is purged in the
|
|
4072
|
+
* background, but its record keeps the name after it has left every list
|
|
4073
|
+
* you can read, so no later pipeline in the workspace can be called that.
|
|
4074
|
+
* There is no undelete.
|
|
3910
4075
|
*/
|
|
3911
4076
|
retained_name: string;
|
|
3912
4077
|
cancelled_run_id: string | null;
|
|
@@ -3915,6 +4080,14 @@ export interface TrainingRunListResponse {
|
|
|
3915
4080
|
runs: TrainingRunSummary[];
|
|
3916
4081
|
total: number;
|
|
3917
4082
|
}
|
|
4083
|
+
/** One replay of a run on one of its pipeline's benchmarks, to link its report by. */
|
|
4084
|
+
export interface TrainingRunBenchmarkRun {
|
|
4085
|
+
benchmark_id: string;
|
|
4086
|
+
name: string;
|
|
4087
|
+
/** The replay's id: what `getBenchmarkRun` and `listBenchmarkRunItems` take. */
|
|
4088
|
+
run_id: string;
|
|
4089
|
+
status: BenchmarkRunStatus;
|
|
4090
|
+
}
|
|
3918
4091
|
export interface TrainingRunResponse {
|
|
3919
4092
|
run: TrainingRun;
|
|
3920
4093
|
timeline: TrainingRunEvent[];
|
|
@@ -3924,6 +4097,8 @@ export interface TrainingRunResponse {
|
|
|
3924
4097
|
* attached to the rule.
|
|
3925
4098
|
*/
|
|
3926
4099
|
benchmark: BenchmarkRun | null;
|
|
4100
|
+
/** Every benchmark this run was replayed on, the primary included. */
|
|
4101
|
+
benchmark_runs: TrainingRunBenchmarkRun[];
|
|
3927
4102
|
links: TrainingRunLinks;
|
|
3928
4103
|
available_actions: TrainingRunActions;
|
|
3929
4104
|
}
|
|
@@ -3936,6 +4111,12 @@ export interface EvaluationItemsResponse {
|
|
|
3936
4111
|
items: EvaluationItem[];
|
|
3937
4112
|
total: number;
|
|
3938
4113
|
}
|
|
4114
|
+
/** A page of one replay's conversations, in the benchmark's order. */
|
|
4115
|
+
export interface BenchmarkRunItemsResponse {
|
|
4116
|
+
items: BenchmarkRunItem[];
|
|
4117
|
+
/** Every conversation the filter matches, not only this page. */
|
|
4118
|
+
total: number;
|
|
4119
|
+
}
|
|
3939
4120
|
export interface InferenceAliasListResponse {
|
|
3940
4121
|
aliases: InferenceAlias[];
|
|
3941
4122
|
}
|
|
@@ -3996,9 +4177,12 @@ export interface PipelineWriteRequest {
|
|
|
3996
4177
|
} | null;
|
|
3997
4178
|
/** More tags whose conversations the pipeline trains on. On an edit the list replaces the old one. */
|
|
3998
4179
|
tags?: string[];
|
|
3999
|
-
/**
|
|
4180
|
+
/**
|
|
4181
|
+
* The schedule to wait for, beside the platform's fixed sample minimum.
|
|
4182
|
+
* There is no `min_samples`: the minimums are fixed, and a body that sends
|
|
4183
|
+
* one is refused 400 naming it.
|
|
4184
|
+
*/
|
|
4000
4185
|
train_when?: {
|
|
4001
|
-
min_samples?: number;
|
|
4002
4186
|
schedule?: {
|
|
4003
4187
|
every: 'day' | 'week';
|
|
4004
4188
|
weekday?: number;
|
|
@@ -4031,12 +4215,21 @@ export interface LoopModel {
|
|
|
4031
4215
|
/** Verified end to end on the platform for training and serving. */
|
|
4032
4216
|
recommended: boolean;
|
|
4033
4217
|
}
|
|
4034
|
-
/**
|
|
4218
|
+
/**
|
|
4219
|
+
* The fixed minimums a pipeline is held to, in samples
|
|
4220
|
+
* (`GET /api/loop/models`). READ-ONLY: they are the platform's, and no body
|
|
4221
|
+
* sets them.
|
|
4222
|
+
*/
|
|
4035
4223
|
export interface PipelineFloors {
|
|
4036
|
-
/** Samples a new pipeline's first attempt needs:
|
|
4224
|
+
/** Samples a new pipeline's first attempt needs: the rows it trains on plus the held-back set. */
|
|
4037
4225
|
first_version_samples: number;
|
|
4038
|
-
/**
|
|
4226
|
+
/** The fewest new samples any later attempt waits for. */
|
|
4039
4227
|
new_samples: number;
|
|
4228
|
+
/**
|
|
4229
|
+
* The share, in percent, of the rows the last trained attempt trained on
|
|
4230
|
+
* that a later attempt must add when that is more than `new_samples`.
|
|
4231
|
+
*/
|
|
4232
|
+
new_samples_percent: number;
|
|
4040
4233
|
}
|
|
4041
4234
|
export interface LoopModelsResponse {
|
|
4042
4235
|
models: LoopModel[];
|
|
@@ -4111,6 +4304,9 @@ export interface VersionBenchmarkScore {
|
|
|
4111
4304
|
items_digest: string | null;
|
|
4112
4305
|
comparable: boolean;
|
|
4113
4306
|
why: string | null;
|
|
4307
|
+
/** The share each side passed (score 0.70 or more); null when there is no score. */
|
|
4308
|
+
incumbent_pass_rate: number | null;
|
|
4309
|
+
candidate_pass_rate: number | null;
|
|
4114
4310
|
}
|
|
4115
4311
|
/** One measurement a promotion rule weighed. */
|
|
4116
4312
|
export interface PromotionMeasurement {
|
|
@@ -4136,6 +4332,15 @@ export interface PromotionOutcome {
|
|
|
4136
4332
|
weighted_delta: number | null;
|
|
4137
4333
|
measurements: PromotionMeasurement[];
|
|
4138
4334
|
}
|
|
4335
|
+
/** A version's head-to-head on the held-back conversations. */
|
|
4336
|
+
export interface VersionHoldout {
|
|
4337
|
+
rows_scored: number | null;
|
|
4338
|
+
win_rate: number | null;
|
|
4339
|
+
mean_delta: number | null;
|
|
4340
|
+
/** The share each side passed (score 0.70 or more). */
|
|
4341
|
+
incumbent_pass_rate: number | null;
|
|
4342
|
+
candidate_pass_rate: number | null;
|
|
4343
|
+
}
|
|
4139
4344
|
/** One version with every measurement it has. */
|
|
4140
4345
|
export interface VersionScores {
|
|
4141
4346
|
version: number;
|
|
@@ -4148,11 +4353,7 @@ export interface VersionScores {
|
|
|
4148
4353
|
verdict: string | null;
|
|
4149
4354
|
decision: string | null;
|
|
4150
4355
|
compared_at: string | null;
|
|
4151
|
-
holdout:
|
|
4152
|
-
rows_scored: number | null;
|
|
4153
|
-
win_rate: number | null;
|
|
4154
|
-
mean_delta: number | null;
|
|
4155
|
-
};
|
|
4356
|
+
holdout: VersionHoldout;
|
|
4156
4357
|
/** One entry per entry of the response's `benchmarks`, in the same order. */
|
|
4157
4358
|
benchmarks: VersionBenchmarkScore[];
|
|
4158
4359
|
promotion: PromotionOutcome | null;
|