runbios-sdk 0.2.20-rc.284 → 0.2.20-rc.287
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 -32
- 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-rc.
|
|
39
|
+
export declare const VERSION = "0.2.20-rc.287";
|
|
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-rc.
|
|
39
|
+
export const VERSION = '0.2.20-rc.287';
|
|
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
|
@@ -2784,6 +2784,7 @@ export interface LoopMetricPoint {
|
|
|
2784
2784
|
mean_delta: number | null;
|
|
2785
2785
|
judge_incumbent_mean: number | null;
|
|
2786
2786
|
judge_candidate_mean: number | null;
|
|
2787
|
+
/** The trainer's loss on its validation slice, as {@link Evaluation.trainer_eval_loss}. */
|
|
2787
2788
|
trainer_eval_loss: number | null;
|
|
2788
2789
|
/** The bar this attempt had to clear, frozen with its report. */
|
|
2789
2790
|
promote_margin: number | null;
|
|
@@ -3005,6 +3006,7 @@ export interface TrainingRun {
|
|
|
3005
3006
|
train_rows: number | null;
|
|
3006
3007
|
holdout_rows: number | null;
|
|
3007
3008
|
train_dataset_id: string | null;
|
|
3009
|
+
/** Null on a run made since the held-back rows stopped leaving the loop; set on older runs. */
|
|
3008
3010
|
holdout_dataset_id: string | null;
|
|
3009
3011
|
training_job_id: string | null;
|
|
3010
3012
|
job_status: string | null;
|
|
@@ -3029,6 +3031,7 @@ export interface TrainingRun {
|
|
|
3029
3031
|
model_family: string | null;
|
|
3030
3032
|
/** Machine time the run held (training job plus comparison machine); null until known. */
|
|
3031
3033
|
gpu_seconds: number | null;
|
|
3034
|
+
/** The trainer's loss on its validation slice, as {@link Evaluation.trainer_eval_loss}. */
|
|
3032
3035
|
training_eval_loss: number | null;
|
|
3033
3036
|
candidate_deployment_id: string | null;
|
|
3034
3037
|
candidate_name: string | null;
|
|
@@ -3119,6 +3122,7 @@ export interface TrainingRunEvent {
|
|
|
3119
3122
|
export interface TrainingRunLinks {
|
|
3120
3123
|
training_job_url: string | null;
|
|
3121
3124
|
candidate_url: string | null;
|
|
3125
|
+
/** The console page of this attempt's comparison report, every conversation included. */
|
|
3122
3126
|
evaluation_url: string | null;
|
|
3123
3127
|
/** The TREND the benchmark number belongs to, not the one replay. */
|
|
3124
3128
|
benchmark_url: string | null;
|
|
@@ -3189,8 +3193,25 @@ export interface Evaluation {
|
|
|
3189
3193
|
mean_delta: number | null;
|
|
3190
3194
|
judge_incumbent_mean: number | null;
|
|
3191
3195
|
judge_candidate_mean: number | null;
|
|
3196
|
+
/**
|
|
3197
|
+
* An answer PASSED (score 0.70 or more) when the judge scored it at least
|
|
3198
|
+
* `pass_threshold`; an answer with no score never passes. `*_passed`
|
|
3199
|
+
* counts the conversations each side passed, and `*_pass_rate` is that
|
|
3200
|
+
* count over `rows_scored`. The counts are null until the report is
|
|
3201
|
+
* finished, and the rates also when nothing was scored.
|
|
3202
|
+
*/
|
|
3203
|
+
pass_threshold: number;
|
|
3204
|
+
incumbent_passed: number | null;
|
|
3205
|
+
candidate_passed: number | null;
|
|
3206
|
+
incumbent_pass_rate: number | null;
|
|
3207
|
+
candidate_pass_rate: number | null;
|
|
3192
3208
|
per_dimension: EvaluationDimensionScore[];
|
|
3193
|
-
/**
|
|
3209
|
+
/**
|
|
3210
|
+
* The trainer's loss on its validation slice: about 5% of the rows the
|
|
3211
|
+
* attempt trains on, kept aside to pick the best checkpoint. Informational:
|
|
3212
|
+
* there is no incumbent counterpart to compare it against, and it is not
|
|
3213
|
+
* measured on the held-back conversations this report compares.
|
|
3214
|
+
*/
|
|
3194
3215
|
trainer_eval_loss: number | null;
|
|
3195
3216
|
warnings: EvaluationWarning[];
|
|
3196
3217
|
verdict: TrainingVerdict | null;
|
|
@@ -3204,12 +3225,56 @@ export interface Evaluation {
|
|
|
3204
3225
|
created_at: string;
|
|
3205
3226
|
finished_at: string | null;
|
|
3206
3227
|
}
|
|
3228
|
+
/**
|
|
3229
|
+
* What the judge made of one answer: its overall score, one score per rubric
|
|
3230
|
+
* dimension (keyed as `judge_dimensions` names them), and the judge's reason
|
|
3231
|
+
* in its own words, with anything that looks like a credential or a personal
|
|
3232
|
+
* detail removed. `reason` is null when the judge gave none.
|
|
3233
|
+
*/
|
|
3234
|
+
export interface EvaluationItemJudge {
|
|
3235
|
+
overall: number;
|
|
3236
|
+
dimensions: Record<string, number>;
|
|
3237
|
+
reason: string | null;
|
|
3238
|
+
}
|
|
3239
|
+
/**
|
|
3240
|
+
* Where a conversation's reference answer came from: a person said the
|
|
3241
|
+
* model's own answer was `good`, a person's `correction`, or a `gold` answer
|
|
3242
|
+
* written as the right one.
|
|
3243
|
+
*/
|
|
3244
|
+
export type EvaluationReferenceKind = 'good' | 'correction' | 'gold';
|
|
3245
|
+
/**
|
|
3246
|
+
* What a person said the right answer is, frozen with the report and shown
|
|
3247
|
+
* to the judge beside both answers. Null on a conversation nobody gave one.
|
|
3248
|
+
*/
|
|
3249
|
+
export interface EvaluationReference {
|
|
3250
|
+
answer: string;
|
|
3251
|
+
kind: EvaluationReferenceKind;
|
|
3252
|
+
}
|
|
3253
|
+
/** Which answer the judge preferred in one order of showing them, and why. */
|
|
3254
|
+
export interface EvaluationPairwiseOrder {
|
|
3255
|
+
winner: EvaluationWinner;
|
|
3256
|
+
reason: string | null;
|
|
3257
|
+
}
|
|
3258
|
+
/**
|
|
3259
|
+
* The direct comparison, asked twice: once with the serving version's answer
|
|
3260
|
+
* shown first and once with the attempt's first. A win counts only when both
|
|
3261
|
+
* orders pick the same side (`agreed`); anything else is a `tie`, which is
|
|
3262
|
+
* what removes the judge's preference for whichever answer it reads first.
|
|
3263
|
+
*/
|
|
3264
|
+
export interface EvaluationItemPairwise {
|
|
3265
|
+
incumbent_first: EvaluationPairwiseOrder;
|
|
3266
|
+
candidate_first: EvaluationPairwiseOrder;
|
|
3267
|
+
winner: EvaluationWinner;
|
|
3268
|
+
agreed: boolean;
|
|
3269
|
+
}
|
|
3207
3270
|
/** One model's answer to one held-out conversation, with the scores it earned. */
|
|
3208
3271
|
export interface EvaluationItemSide {
|
|
3209
3272
|
completion: string | null;
|
|
3210
3273
|
tool_calls: TrainingToolCall[] | null;
|
|
3211
|
-
judge:
|
|
3274
|
+
judge: EvaluationItemJudge | null;
|
|
3212
3275
|
score: number | null;
|
|
3276
|
+
/** True when it passed (score 0.70 or more); null when it has no score. */
|
|
3277
|
+
passed: boolean | null;
|
|
3213
3278
|
model_version: string | null;
|
|
3214
3279
|
}
|
|
3215
3280
|
/**
|
|
@@ -3225,8 +3290,11 @@ export interface EvaluationItem {
|
|
|
3225
3290
|
trace_url: string | null;
|
|
3226
3291
|
prompt: TrainingMessage[];
|
|
3227
3292
|
tools: unknown[] | null;
|
|
3293
|
+
reference: EvaluationReference | null;
|
|
3228
3294
|
incumbent: EvaluationItemSide;
|
|
3229
3295
|
candidate: EvaluationItemSide;
|
|
3296
|
+
/** Null on a conversation compared before both orders were kept. */
|
|
3297
|
+
pairwise: EvaluationItemPairwise | null;
|
|
3230
3298
|
human_verdict: number | null;
|
|
3231
3299
|
winner: EvaluationWinner | null;
|
|
3232
3300
|
status: EvaluationItemStatus;
|
|
@@ -3351,11 +3419,16 @@ export interface BenchmarkItem {
|
|
|
3351
3419
|
/**
|
|
3352
3420
|
* One replay: this benchmark, on this training run, against both models.
|
|
3353
3421
|
*
|
|
3354
|
-
* IT
|
|
3355
|
-
*
|
|
3356
|
-
* cancels in its delta; an absolute
|
|
3357
|
-
*
|
|
3358
|
-
*
|
|
3422
|
+
* IT DECIDES A PROMOTION ONLY UNDER A POLICY THAT READS BENCHMARKS. The
|
|
3423
|
+
* paired comparison applies the judge to both sides of one conversation in
|
|
3424
|
+
* one pass, so most of the judge's variance cancels in its delta; an absolute
|
|
3425
|
+
* mean carries that variance whole. Under the default `holdout` policy a
|
|
3426
|
+
* replay is the number, the difference against what serves today on the same
|
|
3427
|
+
* set, and the history, and a person reads the trend. Under `all`, `primary`,
|
|
3428
|
+
* `k_of_n` or `weighted` the policy reads this replay's delta.
|
|
3429
|
+
*
|
|
3430
|
+
* Every conversation behind it, both answers and the judge's reasons, is
|
|
3431
|
+
* `listBenchmarkRunItems`.
|
|
3359
3432
|
*/
|
|
3360
3433
|
export interface BenchmarkRun {
|
|
3361
3434
|
id: string;
|
|
@@ -3375,6 +3448,25 @@ export interface BenchmarkRun {
|
|
|
3375
3448
|
incumbent_score: number | null;
|
|
3376
3449
|
score_delta: number | null;
|
|
3377
3450
|
per_dimension: BenchmarkDimensionScore[];
|
|
3451
|
+
/**
|
|
3452
|
+
* An answer PASSED (score 0.70 or more) when the judge scored it at least
|
|
3453
|
+
* `pass_threshold`. `*_passed` counts the conversations each side passed
|
|
3454
|
+
* and `*_pass_rate` is that count over `rows_scored`: null unless `status`
|
|
3455
|
+
* is `done`, like the scores.
|
|
3456
|
+
*/
|
|
3457
|
+
pass_threshold: number;
|
|
3458
|
+
incumbent_passed: number | null;
|
|
3459
|
+
candidate_passed: number | null;
|
|
3460
|
+
incumbent_pass_rate: number | null;
|
|
3461
|
+
candidate_pass_rate: number | null;
|
|
3462
|
+
/**
|
|
3463
|
+
* Conversations the attempt scored higher on (`wins`), lower on (`losses`),
|
|
3464
|
+
* or within the tie band promotion uses of the serving version (`ties`).
|
|
3465
|
+
* Null unless `status` is `done`.
|
|
3466
|
+
*/
|
|
3467
|
+
wins: number | null;
|
|
3468
|
+
losses: number | null;
|
|
3469
|
+
ties: number | null;
|
|
3378
3470
|
prompt_tokens: number;
|
|
3379
3471
|
completion_tokens: number;
|
|
3380
3472
|
spent_cents: number;
|
|
@@ -3406,11 +3498,53 @@ export interface BenchmarkHistoryPoint {
|
|
|
3406
3498
|
candidate_score: number | null;
|
|
3407
3499
|
incumbent_score: number | null;
|
|
3408
3500
|
score_delta: number | null;
|
|
3501
|
+
/** The share each side passed (score 0.70 or more); null when the replay has no score. */
|
|
3502
|
+
incumbent_pass_rate: number | null;
|
|
3503
|
+
candidate_pass_rate: number | null;
|
|
3409
3504
|
checkpoint_id: string | null;
|
|
3410
3505
|
decision: TrainingDecision | null;
|
|
3411
3506
|
status: BenchmarkRunStatus;
|
|
3412
3507
|
status_reason: string | null;
|
|
3413
3508
|
}
|
|
3509
|
+
/** One model's answer to one pinned conversation in a replay, and its score. */
|
|
3510
|
+
export interface BenchmarkRunItemSide {
|
|
3511
|
+
completion: string | null;
|
|
3512
|
+
judge: EvaluationItemJudge | null;
|
|
3513
|
+
score: number | null;
|
|
3514
|
+
/** True when it passed (score 0.70 or more); null when it has no score. */
|
|
3515
|
+
passed: boolean | null;
|
|
3516
|
+
}
|
|
3517
|
+
/**
|
|
3518
|
+
* One pinned conversation of one replay: the prompt, both answers, what the
|
|
3519
|
+
* judge made of each, and which side won it.
|
|
3520
|
+
*
|
|
3521
|
+
* `winner` compares the two scores: the side scoring higher by more than the
|
|
3522
|
+
* tie band promotion uses, `tie` inside it, and null until both are scored.
|
|
3523
|
+
* `source_trace_id` goes null once the conversation it was pinned from is
|
|
3524
|
+
* deleted; the pinned copy stays.
|
|
3525
|
+
*/
|
|
3526
|
+
export interface BenchmarkRunItem {
|
|
3527
|
+
id: number;
|
|
3528
|
+
benchmark_item_id: number;
|
|
3529
|
+
ordinal: number;
|
|
3530
|
+
source_trace_id: string | null;
|
|
3531
|
+
source_trace_url: string | null;
|
|
3532
|
+
prompt: TrainingMessage[];
|
|
3533
|
+
tools: unknown[] | null;
|
|
3534
|
+
reference: EvaluationReference | null;
|
|
3535
|
+
incumbent: BenchmarkRunItemSide;
|
|
3536
|
+
candidate: BenchmarkRunItemSide;
|
|
3537
|
+
winner: EvaluationWinner | null;
|
|
3538
|
+
status: EvaluationItemStatus;
|
|
3539
|
+
error: string | null;
|
|
3540
|
+
}
|
|
3541
|
+
/** Which conversations of a replay to read: the same three words a report's items take. */
|
|
3542
|
+
export interface BenchmarkRunItemListParams {
|
|
3543
|
+
winner?: EvaluationItemWinnerFilter;
|
|
3544
|
+
/** 50 when absent; at most 200. */
|
|
3545
|
+
limit?: number;
|
|
3546
|
+
offset?: number;
|
|
3547
|
+
}
|
|
3414
3548
|
/**
|
|
3415
3549
|
* Where the conversations are copied FROM. Read once, at creation, never again.
|
|
3416
3550
|
* A benchmark pins conversations by id; to make one from a file, import it
|
|
@@ -3506,6 +3640,10 @@ export type TrainingRuleRunRefusalCode = 'NOT_ENOUGH_SAMPLES' | 'PIPELINE_NEEDS_
|
|
|
3506
3640
|
* body (400, which names the field). The SDK's tests read them off the
|
|
3507
3641
|
* service. Nothing is saved when any of them is answered.
|
|
3508
3642
|
*
|
|
3643
|
+
* A `train_when.min_samples` is one of those 400s: the sample minimums are
|
|
3644
|
+
* fixed by the platform (`listModels` returns them as `floors`) and no body
|
|
3645
|
+
* sets them.
|
|
3646
|
+
*
|
|
3509
3647
|
* The name and tags:
|
|
3510
3648
|
* - `PIPELINE_NAME_TAKEN` (409): another pipeline in the workspace has the
|
|
3511
3649
|
* name, a deleted one included. Choose another name.
|
|
@@ -3520,11 +3658,9 @@ export type TrainingRuleRunRefusalCode = 'NOT_ENOUGH_SAMPLES' | 'PIPELINE_NEEDS_
|
|
|
3520
3658
|
* pipeline created before pipelines had them; its other settings can
|
|
3521
3659
|
* still change.
|
|
3522
3660
|
*
|
|
3523
|
-
* The model and
|
|
3661
|
+
* The model and how it is promoted:
|
|
3524
3662
|
* - `MODEL_NOT_TRAINABLE` (422): `model.id` or `challenger_model.id` is not a
|
|
3525
3663
|
* 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
3664
|
* - `NO_GPU_FITS` (422): no machines can train or serve the model right now.
|
|
3529
3665
|
* - `MODEL_REVISION_UNAVAILABLE` (422): the model could not be pinned to an
|
|
3530
3666
|
* exact revision because the training service did not answer. Try again
|
|
@@ -3552,7 +3688,7 @@ export type TrainingRuleRunRefusalCode = 'NOT_ENOUGH_SAMPLES' | 'PIPELINE_NEEDS_
|
|
|
3552
3688
|
* the key every comparison is scored with) did not answer just then. Try
|
|
3553
3689
|
* again in a minute.
|
|
3554
3690
|
*/
|
|
3555
|
-
export type TrainingRuleSaveRefusalCode = 'PIPELINE_NAME_TAKEN' | 'OWN_TAG_TAKEN' | 'REVISION_MISMATCH' | 'RUN_ACTIVE' | 'NOT_A_SIMPLE_PIPELINE' | 'MODEL_NOT_TRAINABLE' | '
|
|
3691
|
+
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
3692
|
/**
|
|
3557
3693
|
* The body of a manual run refused `409 MONTHLY_LIMIT_REACHED`, as
|
|
3558
3694
|
* `ApiError.body` carries it.
|
|
@@ -3671,6 +3807,9 @@ export interface PipelineVersion {
|
|
|
3671
3807
|
rows_scored: number | null;
|
|
3672
3808
|
win_rate: number | null;
|
|
3673
3809
|
mean_delta: number | null;
|
|
3810
|
+
/** The share of those conversations each side passed (score 0.70 or more). */
|
|
3811
|
+
candidate_pass_rate: number | null;
|
|
3812
|
+
incumbent_pass_rate: number | null;
|
|
3674
3813
|
/**
|
|
3675
3814
|
* The standing benchmark's replay of this version, when the rule has one.
|
|
3676
3815
|
* Only scores with `benchmark_comparable` sit on one axis.
|
|
@@ -3757,6 +3896,12 @@ export interface PipelineAttempt {
|
|
|
3757
3896
|
cost_up_to: boolean;
|
|
3758
3897
|
verdict: TrainingVerdict | null;
|
|
3759
3898
|
win_rate: number | null;
|
|
3899
|
+
/**
|
|
3900
|
+
* The share of the held-back conversations the attempt and the version it
|
|
3901
|
+
* was compared with passed (score 0.70 or more); null until it is compared.
|
|
3902
|
+
*/
|
|
3903
|
+
candidate_pass_rate: number | null;
|
|
3904
|
+
incumbent_pass_rate: number | null;
|
|
3760
3905
|
evaluation_id: string | null;
|
|
3761
3906
|
/** Its last sentence. */
|
|
3762
3907
|
reason: string | null;
|
|
@@ -3783,12 +3928,12 @@ export interface PipelineSchedule {
|
|
|
3783
3928
|
hour_utc: number;
|
|
3784
3929
|
}
|
|
3785
3930
|
/**
|
|
3786
|
-
* When a pipeline trains:
|
|
3787
|
-
*
|
|
3788
|
-
* is
|
|
3931
|
+
* When a pipeline trains: once it has the samples the platform's fixed
|
|
3932
|
+
* minimum asks for (`minimums` says how many, and how many it has) AND, when
|
|
3933
|
+
* there is a schedule, at its scheduled slot. A null schedule trains as soon
|
|
3934
|
+
* as the minimum is met. The minimum is not a setting: no body sets it.
|
|
3789
3935
|
*/
|
|
3790
3936
|
export interface PipelineTrainWhen {
|
|
3791
|
-
min_samples: number;
|
|
3792
3937
|
schedule: PipelineSchedule | null;
|
|
3793
3938
|
}
|
|
3794
3939
|
/** What is held back beyond max(50, 5% of the data): a larger percent, or a count. */
|
|
@@ -3796,9 +3941,15 @@ export interface PipelineHoldout {
|
|
|
3796
3941
|
min_rows: number;
|
|
3797
3942
|
}
|
|
3798
3943
|
/**
|
|
3799
|
-
* How far the data is from the next
|
|
3800
|
-
*
|
|
3801
|
-
*
|
|
3944
|
+
* How far the data is from the next attempt, by the platform's fixed
|
|
3945
|
+
* minimums (`floors` on `listModels`). READ-ONLY: no body changes them.
|
|
3946
|
+
*
|
|
3947
|
+
* `first_version`: `needed` usable samples the first attempt needs -- the
|
|
3948
|
+
* rows it trains on plus the ones held back to judge it. `new_rows`: `needed`
|
|
3949
|
+
* usable samples the last trained attempt did not have, which is
|
|
3950
|
+
* `floors.new_samples` or `floors.new_samples_percent` of the rows that
|
|
3951
|
+
* attempt trained on, whichever is more. `have`, `short` and `message` are
|
|
3952
|
+
* measured on the detail only.
|
|
3802
3953
|
*/
|
|
3803
3954
|
export interface PipelineMinimums {
|
|
3804
3955
|
basis: 'first_version' | 'new_rows';
|
|
@@ -3807,6 +3958,22 @@ export interface PipelineMinimums {
|
|
|
3807
3958
|
short: number | null;
|
|
3808
3959
|
message: string | null;
|
|
3809
3960
|
}
|
|
3961
|
+
/**
|
|
3962
|
+
* The state of the live version's deployment:
|
|
3963
|
+
* - `serving`: it answers.
|
|
3964
|
+
* - `starting`: it is on its way up.
|
|
3965
|
+
* - `stopped`, `paused_for_funds` (the wallet ran out) and `deleted`: it does
|
|
3966
|
+
* not answer and is not billed.
|
|
3967
|
+
* - `paused_by_platform`: the platform paused it because billing could not be
|
|
3968
|
+
* reached; it does not answer.
|
|
3969
|
+
* - `failed`: it does not answer.
|
|
3970
|
+
*/
|
|
3971
|
+
export type PipelineLiveDeploymentStatus = 'serving' | 'starting' | 'stopped' | 'paused_for_funds' | 'paused_by_platform' | 'failed' | 'deleted';
|
|
3972
|
+
/** The live version's deployment, as last checked (`checked_at`). */
|
|
3973
|
+
export interface PipelineLiveDeployment {
|
|
3974
|
+
status: PipelineLiveDeploymentStatus;
|
|
3975
|
+
checked_at: string;
|
|
3976
|
+
}
|
|
3810
3977
|
export interface Pipeline {
|
|
3811
3978
|
rule_id: string;
|
|
3812
3979
|
rule_name: string;
|
|
@@ -3842,6 +4009,12 @@ export interface Pipeline {
|
|
|
3842
4009
|
live_version: number | null;
|
|
3843
4010
|
/** The same number under its older name. */
|
|
3844
4011
|
champion_version: number | null;
|
|
4012
|
+
/**
|
|
4013
|
+
* Whether the deployment the live version answers from is up, as the
|
|
4014
|
+
* platform last checked it. Null when there is no live version, when what
|
|
4015
|
+
* serves is not a deployment, or before the first check of that deployment.
|
|
4016
|
+
*/
|
|
4017
|
+
live_deployment: PipelineLiveDeployment | null;
|
|
3845
4018
|
/** The name the app calls. It does not change when a version is promoted. */
|
|
3846
4019
|
serving_name: string;
|
|
3847
4020
|
/**
|
|
@@ -3903,10 +4076,10 @@ export interface TrainingRuleDeleteResponse {
|
|
|
3903
4076
|
deleted: boolean;
|
|
3904
4077
|
rule_id: string;
|
|
3905
4078
|
/**
|
|
3906
|
-
* The name this delete just spent. The
|
|
3907
|
-
*
|
|
3908
|
-
*
|
|
3909
|
-
*
|
|
4079
|
+
* The name this delete just spent. The pipeline's history is purged in the
|
|
4080
|
+
* background, but its record keeps the name after it has left every list
|
|
4081
|
+
* you can read, so no later pipeline in the workspace can be called that.
|
|
4082
|
+
* There is no undelete.
|
|
3910
4083
|
*/
|
|
3911
4084
|
retained_name: string;
|
|
3912
4085
|
cancelled_run_id: string | null;
|
|
@@ -3915,6 +4088,14 @@ export interface TrainingRunListResponse {
|
|
|
3915
4088
|
runs: TrainingRunSummary[];
|
|
3916
4089
|
total: number;
|
|
3917
4090
|
}
|
|
4091
|
+
/** One replay of a run on one of its pipeline's benchmarks, to link its report by. */
|
|
4092
|
+
export interface TrainingRunBenchmarkRun {
|
|
4093
|
+
benchmark_id: string;
|
|
4094
|
+
name: string;
|
|
4095
|
+
/** The replay's id: what `getBenchmarkRun` and `listBenchmarkRunItems` take. */
|
|
4096
|
+
run_id: string;
|
|
4097
|
+
status: BenchmarkRunStatus;
|
|
4098
|
+
}
|
|
3918
4099
|
export interface TrainingRunResponse {
|
|
3919
4100
|
run: TrainingRun;
|
|
3920
4101
|
timeline: TrainingRunEvent[];
|
|
@@ -3924,6 +4105,8 @@ export interface TrainingRunResponse {
|
|
|
3924
4105
|
* attached to the rule.
|
|
3925
4106
|
*/
|
|
3926
4107
|
benchmark: BenchmarkRun | null;
|
|
4108
|
+
/** Every benchmark this run was replayed on, the primary included. */
|
|
4109
|
+
benchmark_runs: TrainingRunBenchmarkRun[];
|
|
3927
4110
|
links: TrainingRunLinks;
|
|
3928
4111
|
available_actions: TrainingRunActions;
|
|
3929
4112
|
}
|
|
@@ -3936,6 +4119,12 @@ export interface EvaluationItemsResponse {
|
|
|
3936
4119
|
items: EvaluationItem[];
|
|
3937
4120
|
total: number;
|
|
3938
4121
|
}
|
|
4122
|
+
/** A page of one replay's conversations, in the benchmark's order. */
|
|
4123
|
+
export interface BenchmarkRunItemsResponse {
|
|
4124
|
+
items: BenchmarkRunItem[];
|
|
4125
|
+
/** Every conversation the filter matches, not only this page. */
|
|
4126
|
+
total: number;
|
|
4127
|
+
}
|
|
3939
4128
|
export interface InferenceAliasListResponse {
|
|
3940
4129
|
aliases: InferenceAlias[];
|
|
3941
4130
|
}
|
|
@@ -3996,9 +4185,12 @@ export interface PipelineWriteRequest {
|
|
|
3996
4185
|
} | null;
|
|
3997
4186
|
/** More tags whose conversations the pipeline trains on. On an edit the list replaces the old one. */
|
|
3998
4187
|
tags?: string[];
|
|
3999
|
-
/**
|
|
4188
|
+
/**
|
|
4189
|
+
* The schedule to wait for, beside the platform's fixed sample minimum.
|
|
4190
|
+
* There is no `min_samples`: the minimums are fixed, and a body that sends
|
|
4191
|
+
* one is refused 400 naming it.
|
|
4192
|
+
*/
|
|
4000
4193
|
train_when?: {
|
|
4001
|
-
min_samples?: number;
|
|
4002
4194
|
schedule?: {
|
|
4003
4195
|
every: 'day' | 'week';
|
|
4004
4196
|
weekday?: number;
|
|
@@ -4031,12 +4223,21 @@ export interface LoopModel {
|
|
|
4031
4223
|
/** Verified end to end on the platform for training and serving. */
|
|
4032
4224
|
recommended: boolean;
|
|
4033
4225
|
}
|
|
4034
|
-
/**
|
|
4226
|
+
/**
|
|
4227
|
+
* The fixed minimums a pipeline is held to, in samples
|
|
4228
|
+
* (`GET /api/loop/models`). READ-ONLY: they are the platform's, and no body
|
|
4229
|
+
* sets them.
|
|
4230
|
+
*/
|
|
4035
4231
|
export interface PipelineFloors {
|
|
4036
|
-
/** Samples a new pipeline's first attempt needs:
|
|
4232
|
+
/** Samples a new pipeline's first attempt needs: the rows it trains on plus the held-back set. */
|
|
4037
4233
|
first_version_samples: number;
|
|
4038
|
-
/**
|
|
4234
|
+
/** The fewest new samples any later attempt waits for. */
|
|
4039
4235
|
new_samples: number;
|
|
4236
|
+
/**
|
|
4237
|
+
* The share, in percent, of the rows the last trained attempt trained on
|
|
4238
|
+
* that a later attempt must add when that is more than `new_samples`.
|
|
4239
|
+
*/
|
|
4240
|
+
new_samples_percent: number;
|
|
4040
4241
|
}
|
|
4041
4242
|
export interface LoopModelsResponse {
|
|
4042
4243
|
models: LoopModel[];
|
|
@@ -4111,6 +4312,9 @@ export interface VersionBenchmarkScore {
|
|
|
4111
4312
|
items_digest: string | null;
|
|
4112
4313
|
comparable: boolean;
|
|
4113
4314
|
why: string | null;
|
|
4315
|
+
/** The share each side passed (score 0.70 or more); null when there is no score. */
|
|
4316
|
+
incumbent_pass_rate: number | null;
|
|
4317
|
+
candidate_pass_rate: number | null;
|
|
4114
4318
|
}
|
|
4115
4319
|
/** One measurement a promotion rule weighed. */
|
|
4116
4320
|
export interface PromotionMeasurement {
|
|
@@ -4136,6 +4340,15 @@ export interface PromotionOutcome {
|
|
|
4136
4340
|
weighted_delta: number | null;
|
|
4137
4341
|
measurements: PromotionMeasurement[];
|
|
4138
4342
|
}
|
|
4343
|
+
/** A version's head-to-head on the held-back conversations. */
|
|
4344
|
+
export interface VersionHoldout {
|
|
4345
|
+
rows_scored: number | null;
|
|
4346
|
+
win_rate: number | null;
|
|
4347
|
+
mean_delta: number | null;
|
|
4348
|
+
/** The share each side passed (score 0.70 or more). */
|
|
4349
|
+
incumbent_pass_rate: number | null;
|
|
4350
|
+
candidate_pass_rate: number | null;
|
|
4351
|
+
}
|
|
4139
4352
|
/** One version with every measurement it has. */
|
|
4140
4353
|
export interface VersionScores {
|
|
4141
4354
|
version: number;
|
|
@@ -4148,11 +4361,7 @@ export interface VersionScores {
|
|
|
4148
4361
|
verdict: string | null;
|
|
4149
4362
|
decision: string | null;
|
|
4150
4363
|
compared_at: string | null;
|
|
4151
|
-
holdout:
|
|
4152
|
-
rows_scored: number | null;
|
|
4153
|
-
win_rate: number | null;
|
|
4154
|
-
mean_delta: number | null;
|
|
4155
|
-
};
|
|
4364
|
+
holdout: VersionHoldout;
|
|
4156
4365
|
/** One entry per entry of the response's `benchmarks`, in the same order. */
|
|
4157
4366
|
benchmarks: VersionBenchmarkScore[];
|
|
4158
4367
|
promotion: PromotionOutcome | null;
|