openpond-sdk 0.12.20 → 0.12.22
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/OPENTELEMETRY.md +85 -0
- package/README.md +4 -0
- package/TASK_INGESTION.md +135 -0
- package/TRAINING_WORKFLOWS.md +14 -0
- package/dist/advanced-refiner-evaluations.js +2 -2
- package/dist/{chunk-RN5MK7NH.js → chunk-6EZAGTZG.js} +4 -4
- package/dist/{chunk-3MDNVNBM.js → chunk-BNBPKCIR.js} +6 -6
- package/dist/chunk-NZRGRUYG.js +140 -0
- package/dist/chunk-NZRGRUYG.js.map +1 -0
- package/dist/{chunk-RT7SQHO4.js → chunk-SP7DQEQM.js} +2 -2
- package/dist/connected-evidence.js +3 -3
- package/dist/dataset-workspaces.js +125 -36
- package/dist/dataset-workspaces.js.map +1 -1
- package/dist/experiment-evaluation-schedules.js +5 -5
- package/dist/experiments.js +5 -5
- package/dist/index.js +51 -36
- package/dist/index.js.map +1 -1
- package/dist/opentelemetry.js +92 -0
- package/dist/opentelemetry.js.map +1 -0
- package/dist/taskset-drafts.js +1 -1
- package/dist/taskset-packages.js +13 -13
- package/dist/training-bundle.js +10 -10
- package/dist/training.js +31 -8
- package/dist/training.js.map +1 -1
- package/dist/types/packages/sdk/src/dataset-task-ingestion.d.ts +86 -0
- package/dist/types/packages/sdk/src/dataset-task-ingestion.d.ts.map +1 -0
- package/dist/types/packages/sdk/src/dataset-workspace-client.d.ts +152 -140
- package/dist/types/packages/sdk/src/dataset-workspace-client.d.ts.map +1 -1
- package/dist/types/packages/sdk/src/dataset-workspaces.d.ts +1 -0
- package/dist/types/packages/sdk/src/dataset-workspaces.d.ts.map +1 -1
- package/dist/types/packages/sdk/src/experiment-client.d.ts +77 -77
- package/dist/types/packages/sdk/src/experiment-draft-storage.d.ts +112 -0
- package/dist/types/packages/sdk/src/experiment-draft-storage.d.ts.map +1 -1
- package/dist/types/packages/sdk/src/experiment-evaluation-schedules.d.ts +216 -216
- package/dist/types/packages/sdk/src/index.d.ts +4 -0
- package/dist/types/packages/sdk/src/index.d.ts.map +1 -1
- package/dist/types/packages/sdk/src/managed-decision-executions.d.ts +339 -339
- package/dist/types/packages/sdk/src/model-taskset-runs.d.ts +216 -216
- package/dist/types/packages/sdk/src/opentelemetry.d.ts +39 -0
- package/dist/types/packages/sdk/src/opentelemetry.d.ts.map +1 -0
- package/dist/types/packages/sdk/src/taskset-draft-client.d.ts +120 -120
- package/dist/types/packages/sdk/src/taskset-draft-source.d.ts +20 -20
- package/dist/types/packages/sdk/src/training-experiment-setup.d.ts +77 -0
- package/dist/types/packages/sdk/src/training-experiment-setup.d.ts.map +1 -1
- package/dist/types/packages/sdk/src/training-qualification-preparation.d.ts +25 -25
- package/dist/types/packages/sdk/src/training.d.ts +4466 -4466
- package/dist/types/packages/sdk/src/training.d.ts.map +1 -1
- package/dist/types/packages/sdk/src/types.d.ts +2 -0
- package/dist/types/packages/sdk/src/types.d.ts.map +1 -1
- package/fixtures/python-foundation/operation-matrix.json +17 -0
- package/fixtures/python-foundation/schemas.json +5941 -5001
- package/package.json +18 -3
- /package/dist/{chunk-RN5MK7NH.js.map → chunk-6EZAGTZG.js.map} +0 -0
- /package/dist/{chunk-3MDNVNBM.js.map → chunk-BNBPKCIR.js.map} +0 -0
- /package/dist/{chunk-RT7SQHO4.js.map → chunk-SP7DQEQM.js.map} +0 -0
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import "./chunk-YLJ4XMA6.js";
|
|
2
|
+
|
|
3
|
+
// src/opentelemetry.ts
|
|
4
|
+
var OpenPondSpanExportError = class extends Error {
|
|
5
|
+
constructor(failures) {
|
|
6
|
+
super(`OpenPond could not export ${failures.length} selected span(s).`);
|
|
7
|
+
this.failures = failures;
|
|
8
|
+
this.name = "OpenPondSpanExportError";
|
|
9
|
+
}
|
|
10
|
+
failures;
|
|
11
|
+
};
|
|
12
|
+
var OpenPondSpanExporter = class {
|
|
13
|
+
#options;
|
|
14
|
+
#maxBatchSize;
|
|
15
|
+
#timeout;
|
|
16
|
+
#exportTimeout;
|
|
17
|
+
#closed = false;
|
|
18
|
+
#active;
|
|
19
|
+
lastExportError;
|
|
20
|
+
constructor(options) {
|
|
21
|
+
if (!options.datasetId.trim()) throw new Error("A dataset ID is required.");
|
|
22
|
+
this.#maxBatchSize = options.maxExportBatchSize ?? 512;
|
|
23
|
+
this.#timeout = options.requestTimeoutMillis ?? 1e4;
|
|
24
|
+
this.#exportTimeout = options.exportTimeoutMillis ?? 25e3;
|
|
25
|
+
if (!Number.isSafeInteger(this.#maxBatchSize) || this.#maxBatchSize < 1 || this.#maxBatchSize > 4096) throw new Error("maxExportBatchSize must be between 1 and 4096.");
|
|
26
|
+
if (!Number.isSafeInteger(this.#timeout) || this.#timeout < 1 || this.#timeout > 3e5) throw new Error("requestTimeoutMillis must be between 1 and 300000.");
|
|
27
|
+
if (!Number.isSafeInteger(this.#exportTimeout) || this.#exportTimeout < 1 || this.#exportTimeout > 3e5) throw new Error("exportTimeoutMillis must be between 1 and 300000.");
|
|
28
|
+
this.#options = { ...options };
|
|
29
|
+
}
|
|
30
|
+
export(spans, resultCallback) {
|
|
31
|
+
if (this.#closed || this.#active || spans.length > this.#maxBatchSize) {
|
|
32
|
+
const error = new Error(this.#closed ? "OpenPond exporter is shut down." : this.#active ? "OpenPond exporter already has an active batch." : "OpenPond export batch exceeds its configured limit.");
|
|
33
|
+
this.lastExportError = error;
|
|
34
|
+
resultCallback({ code: 1, error });
|
|
35
|
+
return;
|
|
36
|
+
}
|
|
37
|
+
const operation = Promise.resolve().then(() => this.#exportBatch(spans));
|
|
38
|
+
const settled = operation.then(() => void 0, () => void 0);
|
|
39
|
+
this.#active = settled;
|
|
40
|
+
void operation.then(
|
|
41
|
+
() => {
|
|
42
|
+
this.lastExportError = void 0;
|
|
43
|
+
return { code: 0 };
|
|
44
|
+
},
|
|
45
|
+
(error) => {
|
|
46
|
+
this.lastExportError = error;
|
|
47
|
+
return { code: 1, error };
|
|
48
|
+
}
|
|
49
|
+
).then((result) => {
|
|
50
|
+
if (this.#active === settled) this.#active = void 0;
|
|
51
|
+
resultCallback(result);
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
async #exportBatch(spans) {
|
|
55
|
+
const failures = [];
|
|
56
|
+
const completed = /* @__PURE__ */ new Set();
|
|
57
|
+
const deadline = performance.now() + this.#exportTimeout;
|
|
58
|
+
for (const span of spans) {
|
|
59
|
+
const { traceId, spanId } = span.spanContext();
|
|
60
|
+
const eventId = `${traceId}:${spanId}`;
|
|
61
|
+
if (completed.has(eventId)) continue;
|
|
62
|
+
try {
|
|
63
|
+
if (!/^[0-9a-f]{32}$/.test(traceId) || !/^[0-9a-f]{16}$/.test(spanId) || /^0+$/.test(traceId) || /^0+$/.test(spanId)) throw new Error("A valid OTel span context is required.");
|
|
64
|
+
const remaining = Math.floor(deadline - performance.now());
|
|
65
|
+
if (remaining <= 0) throw new Error("OpenPond export batch deadline exceeded.");
|
|
66
|
+
const task = this.#options.projectSpan(span);
|
|
67
|
+
if (task == null) continue;
|
|
68
|
+
const signal = AbortSignal.timeout(Math.min(this.#timeout, remaining));
|
|
69
|
+
await this.#options.client.addTask(this.#options.datasetId, {
|
|
70
|
+
...task,
|
|
71
|
+
source: { kind: "opentelemetry", eventId }
|
|
72
|
+
}, { idempotencyKey: `otel:${eventId}`, signal });
|
|
73
|
+
completed.add(eventId);
|
|
74
|
+
} catch (error) {
|
|
75
|
+
failures.push({ traceId, spanId, error });
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
if (failures.length) throw new OpenPondSpanExportError(failures);
|
|
79
|
+
}
|
|
80
|
+
async forceFlush() {
|
|
81
|
+
await this.#active;
|
|
82
|
+
}
|
|
83
|
+
async shutdown() {
|
|
84
|
+
this.#closed = true;
|
|
85
|
+
await this.forceFlush();
|
|
86
|
+
}
|
|
87
|
+
};
|
|
88
|
+
export {
|
|
89
|
+
OpenPondSpanExportError,
|
|
90
|
+
OpenPondSpanExporter
|
|
91
|
+
};
|
|
92
|
+
//# sourceMappingURL=opentelemetry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/opentelemetry.ts"],"sourcesContent":["import type { ReadableSpan, SpanExporter } from \"@opentelemetry/sdk-trace\";\nimport type { AddTaskOptions, DatasetTaskAppendReceipt, DatasetTaskInput } from \"./dataset-task-ingestion.js\";\n\nexport type OpenPondSpanExporterOptions = {\n client: {\n addTask(datasetId: string, task: DatasetTaskInput, options?: AddTaskOptions): Promise<DatasetTaskAppendReceipt>;\n };\n datasetId: string;\n /** Select useful completed runs and redact content. Return null to skip. */\n projectSpan(span: ReadableSpan): DatasetTaskInput | null | undefined;\n /** Match the BatchSpanProcessor limit. Larger batches fail without uploading. */\n maxExportBatchSize?: number;\n /** Per-task request deadline. Projection must be synchronous and bounded. */\n requestTimeoutMillis?: number;\n /** Overall batch deadline, including all task submissions. */\n exportTimeoutMillis?: number;\n};\n\nexport type OpenPondSpanFailure = { traceId: string; spanId: string; error: unknown };\n\nexport class OpenPondSpanExportError extends Error {\n constructor(readonly failures: readonly OpenPondSpanFailure[]) {\n super(`OpenPond could not export ${failures.length} selected span(s).`);\n this.name = \"OpenPondSpanExportError\";\n }\n}\n\n/**\n * Optional OTel exporter, not an OTLP receiver or automatic instrumentation.\n * Register with BatchSpanProcessor for its bounded background queue. Only the\n * explicit projection is uploaded; no attributes, events, or secrets are copied.\n */\nexport class OpenPondSpanExporter implements SpanExporter {\n readonly #options: OpenPondSpanExporterOptions;\n readonly #maxBatchSize: number;\n readonly #timeout: number;\n readonly #exportTimeout: number;\n #closed = false;\n #active: Promise<void> | undefined;\n lastExportError: Error | undefined;\n\n constructor(options: OpenPondSpanExporterOptions) {\n if (!options.datasetId.trim()) throw new Error(\"A dataset ID is required.\");\n this.#maxBatchSize = options.maxExportBatchSize ?? 512;\n this.#timeout = options.requestTimeoutMillis ?? 10_000;\n this.#exportTimeout = options.exportTimeoutMillis ?? 25_000;\n if (!Number.isSafeInteger(this.#maxBatchSize) || this.#maxBatchSize < 1 || this.#maxBatchSize > 4096) throw new Error(\"maxExportBatchSize must be between 1 and 4096.\");\n if (!Number.isSafeInteger(this.#timeout) || this.#timeout < 1 || this.#timeout > 300_000) throw new Error(\"requestTimeoutMillis must be between 1 and 300000.\");\n if (!Number.isSafeInteger(this.#exportTimeout) || this.#exportTimeout < 1 || this.#exportTimeout > 300_000) throw new Error(\"exportTimeoutMillis must be between 1 and 300000.\");\n this.#options = { ...options };\n }\n\n export(spans: ReadableSpan[], resultCallback: Parameters<SpanExporter[\"export\"]>[1]): void {\n if (this.#closed || this.#active || spans.length > this.#maxBatchSize) {\n const error = new Error(this.#closed ? \"OpenPond exporter is shut down.\" : this.#active ? \"OpenPond exporter already has an active batch.\" : \"OpenPond export batch exceeds its configured limit.\");\n this.lastExportError = error;\n resultCallback({ code: 1, error });\n return;\n }\n // Reserve the active slot before user projection executes.\n const operation = Promise.resolve().then(() => this.#exportBatch(spans));\n const settled = operation.then(() => undefined, () => undefined);\n this.#active = settled;\n void operation.then(\n () => { this.lastExportError = undefined; return { code: 0 as const }; },\n (error: Error) => { this.lastExportError = error; return { code: 1 as const, error }; },\n ).then(result => {\n if (this.#active === settled) this.#active = undefined;\n resultCallback(result);\n });\n }\n\n async #exportBatch(spans: ReadableSpan[]): Promise<void> {\n const failures: OpenPondSpanFailure[] = [];\n const completed = new Set<string>();\n const deadline = performance.now() + this.#exportTimeout;\n for (const span of spans) {\n const { traceId, spanId } = span.spanContext();\n const eventId = `${traceId}:${spanId}`;\n if (completed.has(eventId)) continue;\n try {\n if (!/^[0-9a-f]{32}$/.test(traceId) || !/^[0-9a-f]{16}$/.test(spanId) || /^0+$/.test(traceId) || /^0+$/.test(spanId)) throw new Error(\"A valid OTel span context is required.\");\n const remaining = Math.floor(deadline - performance.now());\n if (remaining <= 0) throw new Error(\"OpenPond export batch deadline exceeded.\");\n const task = this.#options.projectSpan(span);\n if (task == null) continue;\n const signal = AbortSignal.timeout(Math.min(this.#timeout, remaining));\n await this.#options.client.addTask(this.#options.datasetId, {\n ...task, source: { kind: \"opentelemetry\", eventId },\n }, { idempotencyKey: `otel:${eventId}`, signal });\n completed.add(eventId);\n } catch (error) {\n failures.push({ traceId, spanId, error });\n }\n }\n if (failures.length) throw new OpenPondSpanExportError(failures);\n }\n\n async forceFlush(): Promise<void> { await this.#active; }\n\n async shutdown(): Promise<void> {\n this.#closed = true;\n await this.forceFlush();\n }\n}\n"],"mappings":"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","names":[]}
|
package/dist/taskset-drafts.js
CHANGED
|
@@ -112,7 +112,6 @@ import {
|
|
|
112
112
|
assertTasksetCalibrationClosures,
|
|
113
113
|
resolveTasksetCalibrationFixture
|
|
114
114
|
} from "./chunk-ZQ6QTYRE.js";
|
|
115
|
-
import "./chunk-Z252BNAZ.js";
|
|
116
115
|
import {
|
|
117
116
|
ModelTasksetDraftRequestSchema,
|
|
118
117
|
TasksetDraftFileInfoSchema,
|
|
@@ -120,6 +119,7 @@ import {
|
|
|
120
119
|
TasksetDraftFilePathSchema,
|
|
121
120
|
TasksetDraftFileSchema
|
|
122
121
|
} from "./chunk-TK3DXH7A.js";
|
|
122
|
+
import "./chunk-Z252BNAZ.js";
|
|
123
123
|
import "./chunk-H3367ISL.js";
|
|
124
124
|
import "./chunk-MVAEE5EI.js";
|
|
125
125
|
import "./chunk-CL3IOOVL.js";
|
package/dist/taskset-packages.js
CHANGED
|
@@ -11,7 +11,16 @@ import {
|
|
|
11
11
|
materializeTasksetDraftWorkspace,
|
|
12
12
|
prepareDatasetTrainingReview,
|
|
13
13
|
prepareTasksetDraftSource
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-SP7DQEQM.js";
|
|
15
|
+
import {
|
|
16
|
+
OpenPondTasksetPackageClient,
|
|
17
|
+
OpenPondTasksetPackageError,
|
|
18
|
+
TasksetPackageModelConfigurationSchema,
|
|
19
|
+
TasksetPackagePublicationSchema,
|
|
20
|
+
TasksetPackageReadbackSchema,
|
|
21
|
+
TasksetPackageReceiptSchema,
|
|
22
|
+
TasksetReleasePackageReadbackSchema
|
|
23
|
+
} from "./chunk-7G47YXQT.js";
|
|
15
24
|
import {
|
|
16
25
|
DatasetTrainingReviewReceiptContentSchema,
|
|
17
26
|
DatasetTrainingReviewReceiptSchema,
|
|
@@ -24,15 +33,6 @@ import {
|
|
|
24
33
|
projectLearningBatchGraders,
|
|
25
34
|
tasksetPackageSourceId
|
|
26
35
|
} from "./chunk-GBDBKGXW.js";
|
|
27
|
-
import {
|
|
28
|
-
OpenPondTasksetPackageClient,
|
|
29
|
-
OpenPondTasksetPackageError,
|
|
30
|
-
TasksetPackageModelConfigurationSchema,
|
|
31
|
-
TasksetPackagePublicationSchema,
|
|
32
|
-
TasksetPackageReadbackSchema,
|
|
33
|
-
TasksetPackageReceiptSchema,
|
|
34
|
-
TasksetReleasePackageReadbackSchema
|
|
35
|
-
} from "./chunk-7G47YXQT.js";
|
|
36
36
|
import {
|
|
37
37
|
ModelBatchReviewInspectionSchema,
|
|
38
38
|
ModelBatchReviewReceiptSchema,
|
|
@@ -45,7 +45,8 @@ import {
|
|
|
45
45
|
prepareAuthoredTasksetSource,
|
|
46
46
|
prepareModelTasksetDraft,
|
|
47
47
|
publishModelTasksetDraftPackage
|
|
48
|
-
} from "./chunk-
|
|
48
|
+
} from "./chunk-BNBPKCIR.js";
|
|
49
|
+
import "./chunk-Q4RGCEOI.js";
|
|
49
50
|
import {
|
|
50
51
|
materializePortableTasksetRelease,
|
|
51
52
|
portableTasksetEnvironment,
|
|
@@ -54,7 +55,6 @@ import {
|
|
|
54
55
|
projectPreferenceComparisonRelease,
|
|
55
56
|
resolvePortableTasksetRewardExecution
|
|
56
57
|
} from "./chunk-GWXJSBWR.js";
|
|
57
|
-
import "./chunk-Q4RGCEOI.js";
|
|
58
58
|
import "./chunk-GCUWJUUM.js";
|
|
59
59
|
import {
|
|
60
60
|
MAX_TASKSET_PACKAGE_BYTES,
|
|
@@ -73,7 +73,6 @@ import {
|
|
|
73
73
|
validateTasksetLearningResources,
|
|
74
74
|
validateTasksetPackage
|
|
75
75
|
} from "./chunk-ZQ6QTYRE.js";
|
|
76
|
-
import "./chunk-Z252BNAZ.js";
|
|
77
76
|
import {
|
|
78
77
|
ModelTasksetAuthoringOwnerSchema,
|
|
79
78
|
ModelTasksetAuthoringSchema,
|
|
@@ -85,6 +84,7 @@ import {
|
|
|
85
84
|
TasksetDraftFilePathSchema,
|
|
86
85
|
TasksetDraftFileSchema
|
|
87
86
|
} from "./chunk-TK3DXH7A.js";
|
|
87
|
+
import "./chunk-Z252BNAZ.js";
|
|
88
88
|
import "./chunk-H3367ISL.js";
|
|
89
89
|
import "./chunk-QTNYXOJW.js";
|
|
90
90
|
import "./chunk-MVAEE5EI.js";
|
package/dist/training-bundle.js
CHANGED
|
@@ -14,16 +14,6 @@ import {
|
|
|
14
14
|
import {
|
|
15
15
|
ManagedSftRecipeSchema
|
|
16
16
|
} from "./chunk-YV6PPDXZ.js";
|
|
17
|
-
import {
|
|
18
|
-
TrainingHandoffOriginSchema
|
|
19
|
-
} from "./chunk-BJMENXR4.js";
|
|
20
|
-
import {
|
|
21
|
-
HarnessSourceSelectionSchema,
|
|
22
|
-
createAgentSnapshot,
|
|
23
|
-
createHarnessRelease,
|
|
24
|
-
validateHarnessPolicySourcePackage,
|
|
25
|
-
validateHarnessSourcePackage
|
|
26
|
-
} from "./chunk-774OWTCD.js";
|
|
27
17
|
import {
|
|
28
18
|
prepareImportedTasksetPackage,
|
|
29
19
|
projectLearningBatchGraders
|
|
@@ -45,7 +35,17 @@ import {
|
|
|
45
35
|
} from "./chunk-ZQ6QTYRE.js";
|
|
46
36
|
import "./chunk-TK3DXH7A.js";
|
|
47
37
|
import "./chunk-H3367ISL.js";
|
|
38
|
+
import {
|
|
39
|
+
TrainingHandoffOriginSchema
|
|
40
|
+
} from "./chunk-BJMENXR4.js";
|
|
48
41
|
import "./chunk-ZQFROKKS.js";
|
|
42
|
+
import {
|
|
43
|
+
HarnessSourceSelectionSchema,
|
|
44
|
+
createAgentSnapshot,
|
|
45
|
+
createHarnessRelease,
|
|
46
|
+
validateHarnessPolicySourcePackage,
|
|
47
|
+
validateHarnessSourcePackage
|
|
48
|
+
} from "./chunk-774OWTCD.js";
|
|
49
49
|
import "./chunk-QTNYXOJW.js";
|
|
50
50
|
import "./chunk-GS5HEE4M.js";
|
|
51
51
|
import "./chunk-ZRTNR4U7.js";
|
package/dist/training.js
CHANGED
|
@@ -71,14 +71,6 @@ import {
|
|
|
71
71
|
TrainingSftImageCapabilitiesSchema,
|
|
72
72
|
supportsTrainingSftRecipe
|
|
73
73
|
} from "./chunk-YV6PPDXZ.js";
|
|
74
|
-
import {
|
|
75
|
-
TrainingHandoffOriginSchema,
|
|
76
|
-
createPostTrainingClient
|
|
77
|
-
} from "./chunk-BJMENXR4.js";
|
|
78
|
-
import {
|
|
79
|
-
validateHarnessPolicySourcePackage,
|
|
80
|
-
validateHarnessSourcePackage
|
|
81
|
-
} from "./chunk-774OWTCD.js";
|
|
82
74
|
import {
|
|
83
75
|
DatasetTrainingReviewReceiptContentSchema,
|
|
84
76
|
DatasetTrainingReviewReceiptSchema,
|
|
@@ -89,7 +81,15 @@ import "./chunk-GPQLBVQC.js";
|
|
|
89
81
|
import {
|
|
90
82
|
TasksetCatalogReleaseRefSchema
|
|
91
83
|
} from "./chunk-Z252BNAZ.js";
|
|
84
|
+
import {
|
|
85
|
+
TrainingHandoffOriginSchema,
|
|
86
|
+
createPostTrainingClient
|
|
87
|
+
} from "./chunk-BJMENXR4.js";
|
|
92
88
|
import "./chunk-ZQFROKKS.js";
|
|
89
|
+
import {
|
|
90
|
+
validateHarnessPolicySourcePackage,
|
|
91
|
+
validateHarnessSourcePackage
|
|
92
|
+
} from "./chunk-774OWTCD.js";
|
|
93
93
|
import "./chunk-QTNYXOJW.js";
|
|
94
94
|
import {
|
|
95
95
|
ExperimentDefinitionSchema,
|
|
@@ -3594,11 +3594,22 @@ var TrainingExperimentFormDraftSchema = z36.object({
|
|
|
3594
3594
|
policy: LearningRevisionRefSchema2
|
|
3595
3595
|
}).strict().optional()
|
|
3596
3596
|
}).strict();
|
|
3597
|
+
var ModelSetupDraftSchema = z36.object({
|
|
3598
|
+
workflow: z36.enum(["sft", "rl", "decision"]),
|
|
3599
|
+
adapter: z36.enum(["lora", "engram", "neuron-training"]),
|
|
3600
|
+
continualLearning: z36.boolean(),
|
|
3601
|
+
dataset: z36.object({
|
|
3602
|
+
id: z36.string().trim().min(1).max(240),
|
|
3603
|
+
revision: z36.number().int().positive()
|
|
3604
|
+
}).strict().optional(),
|
|
3605
|
+
section: z36.enum(["model", "dataset", "graders", "settings"])
|
|
3606
|
+
}).strict();
|
|
3597
3607
|
var ExperimentDraftSchema = z36.object({
|
|
3598
3608
|
schemaVersion: z36.literal("openpond.experimentDraft.v1"),
|
|
3599
3609
|
id: z36.string().trim().min(1).max(240),
|
|
3600
3610
|
operationType: ExperimentOperationTypeSchema,
|
|
3601
3611
|
name: z36.string().trim().min(1).max(500),
|
|
3612
|
+
modelSetup: ModelSetupDraftSchema.optional(),
|
|
3602
3613
|
startingModel: ExperimentStartingModelSchema.optional(),
|
|
3603
3614
|
evaluationForm: EvaluationExperimentDraftSchema.optional(),
|
|
3604
3615
|
hostedEvaluationForm: HostedEvaluationExperimentFormDraftSchema.optional(),
|
|
@@ -3691,6 +3702,16 @@ var ExperimentDraftSchema = z36.object({
|
|
|
3691
3702
|
if (draft.training && (!["sft", "grpo"].includes(draft.operationType) || draft.training.settings && draft.training.settings.method !== draft.operationType))
|
|
3692
3703
|
context.addIssue({ code: "custom", path: ["training"], message: "Training settings must match the experiment type." });
|
|
3693
3704
|
});
|
|
3705
|
+
function assertModelSetupExecutionIntent(draft, requestedOperation) {
|
|
3706
|
+
const parsed = ExperimentDraftSchema.parse(draft);
|
|
3707
|
+
const setup = parsed.modelSetup;
|
|
3708
|
+
if (!setup) return;
|
|
3709
|
+
const operation = setup.workflow === "sft" ? setup.adapter === "lora" ? "sft" : setup.adapter === "engram" ? "engram_adapter" : "selective_neuron_training" : setup.adapter === "lora" ? setup.workflow === "rl" ? "grpo" : "decision_model" : null;
|
|
3710
|
+
if (!operation)
|
|
3711
|
+
throw new OpenPondProtocolError("model_setup_execution_unsupported", "The selected workflow and adapter do not have a supported execution operation.");
|
|
3712
|
+
if (parsed.operationType !== operation || requestedOperation !== operation)
|
|
3713
|
+
throw new OpenPondProtocolError("model_setup_execution_mismatch", "The requested operation differs from the Model setup's selected workflow and adapter.");
|
|
3714
|
+
}
|
|
3694
3715
|
async function parseAndVerifyExperimentDraft(raw, expected = {}) {
|
|
3695
3716
|
const draft = ExperimentDraftSchema.parse(raw);
|
|
3696
3717
|
if (draft.startingModel) await parseAndVerifyExperimentStartingModel(draft.startingModel, expected);
|
|
@@ -8289,6 +8310,7 @@ export {
|
|
|
8289
8310
|
ModelModificationExecutionCapabilitySchema,
|
|
8290
8311
|
ModelModificationMethodSchema,
|
|
8291
8312
|
ModelModificationValidationLevelSchema,
|
|
8313
|
+
ModelSetupDraftSchema,
|
|
8292
8314
|
ModificationRecordingContentSchema,
|
|
8293
8315
|
ModificationRecordingDocumentSchema,
|
|
8294
8316
|
ModificationRecordingListQuerySchema,
|
|
@@ -8546,6 +8568,7 @@ export {
|
|
|
8546
8568
|
assertCanonicalPayloadSize,
|
|
8547
8569
|
assertManagedModificationPricing,
|
|
8548
8570
|
assertModelModificationValidationLevel,
|
|
8571
|
+
assertModelSetupExecutionIntent,
|
|
8549
8572
|
assertTrainingEvaluationIsolation,
|
|
8550
8573
|
assertTrainingQualificationReceipt,
|
|
8551
8574
|
canonicalComputeSpendCap,
|