openpond-sdk 0.12.20 → 0.12.21
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/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 +8 -8
- 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-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-qualification-preparation.d.ts +25 -25
- package/dist/types/packages/sdk/src/training.d.ts +4465 -4465
- 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<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AE,gBAAgB,QAAQ,OAAO,IAAI,OAAO,CAAC;AAChD,kBAAU,IAAI,OAAO;AAAA,MACvB,SAAS,OAAO;AACd,iBAAS,KAAK,EAAE,SAAS,QAAQ,MAAM,CAAC;AAAA,MAC1C;AAAA,IACF;AACA,QAAI,SAAS,OAAQ,OAAM,IAAI,wBAAwB,QAAQ;AAAA,EACjE;AAAA,EAEA,MAAM,aAA4B;AAAE,UAAM,KAAK;AAAA,EAAS;AAAA,EAExD,MAAM,WAA0B;AAC9B,SAAK,UAAU;AACf,UAAM,KAAK,WAAW;AAAA,EACxB;AACF;","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,
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const DatasetTaskInputSchema: z.ZodObject<{
|
|
3
|
+
name: z.ZodString;
|
|
4
|
+
input: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
5
|
+
expectedOutput: z.ZodDefault<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
|
|
6
|
+
split: z.ZodDefault<z.ZodEnum<{
|
|
7
|
+
frozen_eval: "frozen_eval";
|
|
8
|
+
train: "train";
|
|
9
|
+
validation: "validation";
|
|
10
|
+
}>>;
|
|
11
|
+
source: z.ZodOptional<z.ZodObject<{
|
|
12
|
+
kind: z.ZodString;
|
|
13
|
+
eventId: z.ZodOptional<z.ZodString>;
|
|
14
|
+
label: z.ZodOptional<z.ZodString>;
|
|
15
|
+
occurredAt: z.ZodOptional<z.ZodISODateTime>;
|
|
16
|
+
}, z.core.$strict>>;
|
|
17
|
+
tags: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
18
|
+
}, z.core.$strict>;
|
|
19
|
+
export declare const DatasetTaskAppendRequestSchema: z.ZodObject<{
|
|
20
|
+
schemaVersion: z.ZodLiteral<"openpond.datasetTaskAppend.v1">;
|
|
21
|
+
operationId: z.ZodString;
|
|
22
|
+
task: z.ZodObject<{
|
|
23
|
+
name: z.ZodString;
|
|
24
|
+
input: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
25
|
+
expectedOutput: z.ZodDefault<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
|
|
26
|
+
split: z.ZodDefault<z.ZodEnum<{
|
|
27
|
+
frozen_eval: "frozen_eval";
|
|
28
|
+
train: "train";
|
|
29
|
+
validation: "validation";
|
|
30
|
+
}>>;
|
|
31
|
+
source: z.ZodOptional<z.ZodObject<{
|
|
32
|
+
kind: z.ZodString;
|
|
33
|
+
eventId: z.ZodOptional<z.ZodString>;
|
|
34
|
+
label: z.ZodOptional<z.ZodString>;
|
|
35
|
+
occurredAt: z.ZodOptional<z.ZodISODateTime>;
|
|
36
|
+
}, z.core.$strict>>;
|
|
37
|
+
tags: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
38
|
+
}, z.core.$strict>;
|
|
39
|
+
}, z.core.$strict>;
|
|
40
|
+
export declare const DatasetTaskAppendReceiptSchema: z.ZodObject<{
|
|
41
|
+
schemaVersion: z.ZodLiteral<"openpond.datasetTaskReceipt.v1">;
|
|
42
|
+
teamId: z.ZodString;
|
|
43
|
+
datasetId: z.ZodString;
|
|
44
|
+
taskId: z.ZodString;
|
|
45
|
+
operationId: z.ZodString;
|
|
46
|
+
receivedAt: z.ZodISODateTime;
|
|
47
|
+
revision: z.ZodNumber;
|
|
48
|
+
state: z.ZodLiteral<"saved">;
|
|
49
|
+
trainingUseAuthorized: z.ZodLiteral<false>;
|
|
50
|
+
}, z.core.$strict>;
|
|
51
|
+
export type DatasetTaskInput = z.input<typeof DatasetTaskInputSchema>;
|
|
52
|
+
export type DatasetTaskAppendReceipt = z.infer<typeof DatasetTaskAppendReceiptSchema>;
|
|
53
|
+
export type AddTaskOptions = {
|
|
54
|
+
idempotencyKey?: string;
|
|
55
|
+
signal?: AbortSignal;
|
|
56
|
+
};
|
|
57
|
+
export type DatasetTaskClientOptions = {
|
|
58
|
+
apiKey: string;
|
|
59
|
+
baseUrl: string;
|
|
60
|
+
teamId: string;
|
|
61
|
+
fetch?: typeof fetch;
|
|
62
|
+
};
|
|
63
|
+
export declare class DatasetTaskIngestionError extends Error {
|
|
64
|
+
readonly status: number;
|
|
65
|
+
readonly code: string;
|
|
66
|
+
readonly operationId: string;
|
|
67
|
+
readonly outcomeUnknown: boolean;
|
|
68
|
+
constructor(message: string, status: number, code: string, operationId: string);
|
|
69
|
+
}
|
|
70
|
+
/** A bounded append, independent of complete workspace downloads or replacement. */
|
|
71
|
+
export declare function addDatasetTask(config: DatasetTaskClientOptions, datasetId: string, task: DatasetTaskInput, options?: AddTaskOptions): Promise<DatasetTaskAppendReceipt>;
|
|
72
|
+
/** Bind credentials and destination once; the returned addTask has no global state. */
|
|
73
|
+
export declare function createTaskAdder(config: DatasetTaskClientOptions & {
|
|
74
|
+
datasetId: string;
|
|
75
|
+
}): (task: DatasetTaskInput, options?: AddTaskOptions) => Promise<{
|
|
76
|
+
schemaVersion: "openpond.datasetTaskReceipt.v1";
|
|
77
|
+
teamId: string;
|
|
78
|
+
datasetId: string;
|
|
79
|
+
taskId: string;
|
|
80
|
+
operationId: string;
|
|
81
|
+
receivedAt: string;
|
|
82
|
+
revision: number;
|
|
83
|
+
state: "saved";
|
|
84
|
+
trainingUseAuthorized: false;
|
|
85
|
+
}>;
|
|
86
|
+
//# sourceMappingURL=dataset-task-ingestion.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dataset-task-ingestion.d.ts","sourceRoot":"","sources":["../../../../../src/dataset-task-ingestion.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;kBAiBxB,CAAC;AACZ,eAAO,MAAM,8BAA8B;;;;;;;;;;;;;;;;;;;;kBAMhC,CAAC;AACZ,eAAO,MAAM,8BAA8B;;;;;;;;;;kBAYhC,CAAC;AACZ,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC;AACtE,MAAM,MAAM,wBAAwB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,8BAA8B,CAAC,CAAC;AACtF,MAAM,MAAM,cAAc,GAAG;IAAE,cAAc,CAAC,EAAE,MAAM,CAAC;IAAC,MAAM,CAAC,EAAE,WAAW,CAAA;CAAE,CAAC;AAC/E,MAAM,MAAM,wBAAwB,GAAG;IACrC,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,M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