axiom 0.44.0 → 0.45.0
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/bin.cjs +6 -6
- package/dist/bin.cjs.map +1 -1
- package/dist/bin.js +5 -5
- package/dist/chunk-3Q36GUCI.js +23 -0
- package/dist/chunk-3Q36GUCI.js.map +1 -0
- package/dist/{chunk-MCKVQ2IB.js → chunk-JSEK2D3F.js} +5 -19
- package/dist/chunk-JSEK2D3F.js.map +1 -0
- package/dist/{chunk-HW6E4M7S.js → chunk-N3RHEQMQ.js} +2 -2
- package/dist/{chunk-HW6E4M7S.js.map → chunk-N3RHEQMQ.js.map} +1 -1
- package/dist/{chunk-U3JDCQ3Y.js → chunk-QAIGRB75.js} +7 -7
- package/dist/{chunk-7NTVK3F4.js → chunk-R4CARCOX.js} +2 -2
- package/dist/{chunk-56V2A6IW.js → chunk-RSHQRY3F.js} +3 -3
- package/dist/{chunk-AAYRMTT6.js → chunk-SGAIMXRV.js} +24 -9
- package/dist/chunk-SGAIMXRV.js.map +1 -0
- package/dist/evals/online.cjs +31 -8
- package/dist/evals/online.cjs.map +1 -1
- package/dist/evals/online.d.cts +9 -4
- package/dist/evals/online.d.ts +9 -4
- package/dist/evals/online.js +3 -2
- package/dist/evals/online.js.map +1 -1
- package/dist/evals/scorers.cjs +13 -16
- package/dist/evals/scorers.cjs.map +1 -1
- package/dist/evals/scorers.js +2 -1
- package/dist/evals/scorers.js.map +1 -1
- package/dist/evals.cjs +22 -23
- package/dist/evals.cjs.map +1 -1
- package/dist/evals.js +8 -8
- package/dist/evals.js.map +1 -1
- package/dist/index.cjs +36 -24
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +5 -4
- package/dist/index.js.map +1 -1
- package/dist/{run-vitest-4OEEDEHV.js → run-vitest-SYYO32TD.js} +5 -5
- package/package.json +1 -1
- package/dist/chunk-AAYRMTT6.js.map +0 -1
- package/dist/chunk-MCKVQ2IB.js.map +0 -1
- /package/dist/{chunk-U3JDCQ3Y.js.map → chunk-QAIGRB75.js.map} +0 -0
- /package/dist/{chunk-7NTVK3F4.js.map → chunk-R4CARCOX.js.map} +0 -0
- /package/dist/{chunk-56V2A6IW.js.map → chunk-RSHQRY3F.js.map} +0 -0
- /package/dist/{run-vitest-4OEEDEHV.js.map → run-vitest-SYYO32TD.js.map} +0 -0
package/dist/evals.cjs
CHANGED
|
@@ -578,7 +578,7 @@ var init_package = __esm({
|
|
|
578
578
|
"package.json"() {
|
|
579
579
|
package_default = {
|
|
580
580
|
name: "axiom",
|
|
581
|
-
version: "0.
|
|
581
|
+
version: "0.45.0",
|
|
582
582
|
type: "module",
|
|
583
583
|
author: "Axiom, Inc.",
|
|
584
584
|
contributors: [
|
|
@@ -1338,11 +1338,11 @@ function setupEvalProvider(connection) {
|
|
|
1338
1338
|
axiomProvider = new import_sdk_trace_node.NodeTracerProvider({
|
|
1339
1339
|
resource: (0, import_resources.resourceFromAttributes)({
|
|
1340
1340
|
["service.name"]: "axiom",
|
|
1341
|
-
["service.version"]: "0.
|
|
1341
|
+
["service.version"]: "0.45.0"
|
|
1342
1342
|
}),
|
|
1343
1343
|
spanProcessors: [processor]
|
|
1344
1344
|
});
|
|
1345
|
-
axiomTracer = axiomProvider.getTracer("axiom", "0.
|
|
1345
|
+
axiomTracer = axiomProvider.getTracer("axiom", "0.45.0");
|
|
1346
1346
|
}
|
|
1347
1347
|
async function initInstrumentation(config) {
|
|
1348
1348
|
if (initialized) {
|
|
@@ -1354,7 +1354,7 @@ async function initInstrumentation(config) {
|
|
|
1354
1354
|
}
|
|
1355
1355
|
initializationPromise = (async () => {
|
|
1356
1356
|
if (!config.enabled) {
|
|
1357
|
-
axiomTracer = import_api10.trace.getTracer("axiom", "0.
|
|
1357
|
+
axiomTracer = import_api10.trace.getTracer("axiom", "0.45.0");
|
|
1358
1358
|
initialized = true;
|
|
1359
1359
|
return;
|
|
1360
1360
|
}
|
|
@@ -2800,7 +2800,7 @@ async function registerEval(evalName, opts) {
|
|
|
2800
2800
|
[Attr.Eval.Version]: evalVersion,
|
|
2801
2801
|
[Attr.Eval.Type]: "regression",
|
|
2802
2802
|
// TODO: where to get experiment type value from?
|
|
2803
|
-
[Attr.Eval.Tags]: [],
|
|
2803
|
+
[Attr.Eval.Tags]: JSON.stringify(["offline"]),
|
|
2804
2804
|
[Attr.Eval.Collection.ID]: "custom",
|
|
2805
2805
|
// TODO: where to get collection split value from?
|
|
2806
2806
|
[Attr.Eval.Collection.Name]: "custom",
|
|
@@ -2882,8 +2882,6 @@ async function registerEval(evalName, opts) {
|
|
|
2882
2882
|
if (instrumentationError) {
|
|
2883
2883
|
throw instrumentationError;
|
|
2884
2884
|
}
|
|
2885
|
-
const tags = ["offline"];
|
|
2886
|
-
suiteSpan?.setAttribute(Attr.Eval.Tags, JSON.stringify(tags));
|
|
2887
2885
|
const flagSummary = /* @__PURE__ */ new Map();
|
|
2888
2886
|
for (const flag of allOutOfScopeFlags) {
|
|
2889
2887
|
if (flagSummary.has(flag.flagPath)) {
|
|
@@ -3034,6 +3032,7 @@ async function registerEval(evalName, opts) {
|
|
|
3034
3032
|
{
|
|
3035
3033
|
attributes: {
|
|
3036
3034
|
[Attr.GenAI.Operation.Name]: "eval.score",
|
|
3035
|
+
[Attr.Eval.Tags]: JSON.stringify(["offline"]),
|
|
3037
3036
|
[Attr.Eval.ID]: evalId,
|
|
3038
3037
|
[Attr.Eval.Name]: evalName,
|
|
3039
3038
|
[Attr.Eval.Version]: evalVersion,
|
|
@@ -3376,30 +3375,30 @@ init_cjs_shims();
|
|
|
3376
3375
|
|
|
3377
3376
|
// src/evals/scorer.factory.ts
|
|
3378
3377
|
init_cjs_shims();
|
|
3378
|
+
|
|
3379
|
+
// src/evals/normalize-score.ts
|
|
3380
|
+
init_cjs_shims();
|
|
3379
3381
|
init_attributes();
|
|
3382
|
+
function normalizeBooleanScore(score, metadata) {
|
|
3383
|
+
if (typeof score !== "boolean") {
|
|
3384
|
+
return { score, metadata };
|
|
3385
|
+
}
|
|
3386
|
+
return {
|
|
3387
|
+
score: score ? 1 : 0,
|
|
3388
|
+
metadata: { ...metadata, [Attr.Eval.Score.IsBoolean]: true }
|
|
3389
|
+
};
|
|
3390
|
+
}
|
|
3391
|
+
|
|
3392
|
+
// src/evals/scorer.factory.ts
|
|
3380
3393
|
function createScorer(name, fn, options) {
|
|
3381
3394
|
const normalizeScore = (res) => {
|
|
3382
3395
|
if (typeof res === "number") {
|
|
3383
3396
|
return { score: res };
|
|
3384
3397
|
}
|
|
3385
3398
|
if (typeof res === "boolean") {
|
|
3386
|
-
return
|
|
3387
|
-
score: res ? 1 : 0,
|
|
3388
|
-
metadata: {
|
|
3389
|
-
[Attr.Eval.Score.IsBoolean]: true
|
|
3390
|
-
}
|
|
3391
|
-
};
|
|
3392
|
-
}
|
|
3393
|
-
if (typeof res.score === "boolean") {
|
|
3394
|
-
return {
|
|
3395
|
-
score: res.score ? 1 : 0,
|
|
3396
|
-
metadata: {
|
|
3397
|
-
...res.metadata,
|
|
3398
|
-
[Attr.Eval.Score.IsBoolean]: true
|
|
3399
|
-
}
|
|
3400
|
-
};
|
|
3399
|
+
return normalizeBooleanScore(res);
|
|
3401
3400
|
}
|
|
3402
|
-
return res;
|
|
3401
|
+
return normalizeBooleanScore(res.score, res.metadata);
|
|
3403
3402
|
};
|
|
3404
3403
|
const scorer = (args) => {
|
|
3405
3404
|
const res = fn(args);
|