axiom 0.43.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 +28 -14
- package/dist/bin.cjs.map +1 -1
- package/dist/bin.js +6 -5
- package/dist/bin.js.map +1 -1
- package/dist/chunk-3Q36GUCI.js +23 -0
- package/dist/chunk-3Q36GUCI.js.map +1 -0
- package/dist/{chunk-N4LWNPI5.js → chunk-JSEK2D3F.js} +5 -19
- package/dist/chunk-JSEK2D3F.js.map +1 -0
- package/dist/chunk-N3RHEQMQ.js +302 -0
- package/dist/chunk-N3RHEQMQ.js.map +1 -0
- package/dist/{chunk-OGWPMUHQ.js → chunk-QAIGRB75.js} +29 -14
- package/dist/chunk-QAIGRB75.js.map +1 -0
- package/dist/{chunk-T7DGZCOP.js → chunk-R4CARCOX.js} +72 -355
- package/dist/chunk-R4CARCOX.js.map +1 -0
- package/dist/{chunk-QSI2ES43.js → chunk-RSHQRY3F.js} +4 -4
- package/dist/chunk-RSHQRY3F.js.map +1 -0
- package/dist/{chunk-KPQJE7AU.js → chunk-SGAIMXRV.js} +54 -18
- package/dist/chunk-SGAIMXRV.js.map +1 -0
- package/dist/{chunk-3THTOTTP.js → chunk-TWE3LIRZ.js} +4 -2
- package/dist/chunk-TWE3LIRZ.js.map +1 -0
- package/dist/evals/online.cjs +272 -26
- 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 +4 -2
- package/dist/evals/online.js.map +1 -1
- package/dist/evals/scorers.cjs +16 -17
- package/dist/evals/scorers.cjs.map +1 -1
- package/dist/evals/scorers.js +3 -2
- package/dist/evals/scorers.js.map +1 -1
- package/dist/evals.cjs +366 -186
- package/dist/evals.cjs.map +1 -1
- package/dist/evals.d.cts +10 -2
- package/dist/evals.d.ts +10 -2
- package/dist/evals.js +327 -162
- package/dist/evals.js.map +1 -1
- package/dist/index.cjs +68 -35
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +13 -10
- package/dist/index.js.map +1 -1
- package/dist/{run-vitest-ZLJB4UJX.js → run-vitest-SYYO32TD.js} +6 -5
- package/dist/{run-vitest-ZLJB4UJX.js.map → run-vitest-SYYO32TD.js.map} +1 -1
- package/package.json +3 -2
- package/dist/chunk-3THTOTTP.js.map +0 -1
- package/dist/chunk-KPQJE7AU.js.map +0 -1
- package/dist/chunk-N4LWNPI5.js.map +0 -1
- package/dist/chunk-OGWPMUHQ.js.map +0 -1
- package/dist/chunk-QSI2ES43.js.map +0 -1
- package/dist/chunk-T7DGZCOP.js.map +0 -1
package/dist/bin.cjs
CHANGED
|
@@ -553,7 +553,7 @@ var init_package = __esm({
|
|
|
553
553
|
"package.json"() {
|
|
554
554
|
package_default = {
|
|
555
555
|
name: "axiom",
|
|
556
|
-
version: "0.
|
|
556
|
+
version: "0.45.0",
|
|
557
557
|
type: "module",
|
|
558
558
|
author: "Axiom, Inc.",
|
|
559
559
|
contributors: [
|
|
@@ -563,7 +563,8 @@ var init_package = __esm({
|
|
|
563
563
|
],
|
|
564
564
|
scripts: {
|
|
565
565
|
dev: "tsup --watch",
|
|
566
|
-
build: "tsup && chmod +x dist/bin.js",
|
|
566
|
+
build: "tsup && chmod +x dist/bin.js && pnpm check:vitest-entrypoints",
|
|
567
|
+
"check:vitest-entrypoints": "node ./scripts/check-vitest-entrypoints.mjs",
|
|
567
568
|
format: "prettier --write .",
|
|
568
569
|
"format:check": "prettier --check .",
|
|
569
570
|
lint: "eslint './**/*.{js,ts}'",
|
|
@@ -2228,16 +2229,29 @@ function printFinalReport({
|
|
|
2228
2229
|
logger("");
|
|
2229
2230
|
logger(u.bgBlue(u.white(" FINAL EVALUATION REPORT ")));
|
|
2230
2231
|
logger("");
|
|
2231
|
-
for (const suite of suiteData) {
|
|
2232
|
-
const scorerAverages = calculateScorerAverages(suite);
|
|
2233
|
-
const flagDiff = calculateFlagDiff(suite);
|
|
2234
|
-
printSuiteBox({ suite, scorerAverages, calculateBaselineScorerAverage, flagDiff, logger });
|
|
2235
|
-
logger("");
|
|
2236
|
-
}
|
|
2237
2232
|
const runId = suiteData[0]?.runId;
|
|
2238
2233
|
const orgId = suiteData[0]?.orgId;
|
|
2239
2234
|
const anyRegistered = registrationStatus.some((s2) => s2.registered);
|
|
2240
2235
|
const anyFailed = registrationStatus.some((s2) => !s2.registered);
|
|
2236
|
+
const allFailed = registrationStatus.length > 0 && registrationStatus.every((s2) => !s2.registered);
|
|
2237
|
+
const hasAnyScores = suiteData.some(
|
|
2238
|
+
(suite) => suite.cases.some((caseData) => Object.keys(caseData.scores ?? {}).length > 0)
|
|
2239
|
+
);
|
|
2240
|
+
const shouldPrintSuiteBoxes = isDebug || !allFailed || hasAnyScores;
|
|
2241
|
+
if (shouldPrintSuiteBoxes) {
|
|
2242
|
+
for (const suite of suiteData) {
|
|
2243
|
+
const scorerAverages = calculateScorerAverages(suite);
|
|
2244
|
+
const flagDiff = calculateFlagDiff(suite);
|
|
2245
|
+
printSuiteBox({
|
|
2246
|
+
suite,
|
|
2247
|
+
scorerAverages,
|
|
2248
|
+
calculateBaselineScorerAverage,
|
|
2249
|
+
flagDiff,
|
|
2250
|
+
logger
|
|
2251
|
+
});
|
|
2252
|
+
logger("");
|
|
2253
|
+
}
|
|
2254
|
+
}
|
|
2241
2255
|
if (anyRegistered && orgId && config?.consoleEndpointUrl) {
|
|
2242
2256
|
if (suiteData.length === 1) {
|
|
2243
2257
|
const suite = suiteData[0];
|
|
@@ -2500,11 +2514,11 @@ function setupEvalProvider(connection) {
|
|
|
2500
2514
|
axiomProvider = new import_sdk_trace_node.NodeTracerProvider({
|
|
2501
2515
|
resource: (0, import_resources.resourceFromAttributes)({
|
|
2502
2516
|
["service.name"]: "axiom",
|
|
2503
|
-
["service.version"]: "0.
|
|
2517
|
+
["service.version"]: "0.45.0"
|
|
2504
2518
|
}),
|
|
2505
2519
|
spanProcessors: [processor]
|
|
2506
2520
|
});
|
|
2507
|
-
axiomTracer = axiomProvider.getTracer("axiom", "0.
|
|
2521
|
+
axiomTracer = axiomProvider.getTracer("axiom", "0.45.0");
|
|
2508
2522
|
}
|
|
2509
2523
|
async function initInstrumentation(config) {
|
|
2510
2524
|
if (initialized) {
|
|
@@ -2516,7 +2530,7 @@ async function initInstrumentation(config) {
|
|
|
2516
2530
|
}
|
|
2517
2531
|
initializationPromise = (async () => {
|
|
2518
2532
|
if (!config.enabled) {
|
|
2519
|
-
axiomTracer = import_api10.trace.getTracer("axiom", "0.
|
|
2533
|
+
axiomTracer = import_api10.trace.getTracer("axiom", "0.45.0");
|
|
2520
2534
|
initialized = true;
|
|
2521
2535
|
return;
|
|
2522
2536
|
}
|
|
@@ -2778,7 +2792,7 @@ var init_eval_command = __esm({
|
|
|
2778
2792
|
".",
|
|
2779
2793
|
"any *.eval.ts file in current directory"
|
|
2780
2794
|
)
|
|
2781
|
-
).option("-w, --watch true", "keep server running and watch for changes", false).option("-t, --token <TOKEN>", "axiom token", getDefaultToken).option("-d, --dataset <DATASET>", "axiom dataset name"
|
|
2795
|
+
).option("-w, --watch true", "keep server running and watch for changes", false).option("-t, --token <TOKEN>", "axiom token", getDefaultToken).option("-d, --dataset <DATASET>", "axiom dataset name").option("-u, --url <AXIOM URL>", "axiom url", getDefaultUrl).option("-o, --org-id <ORG ID>", "axiom organization id", getDefaultOrgId).option("-b, --baseline <BASELINE ID>", "id of baseline evaluation to compare against").option("--debug", "run locally without any network operations", false).option("--list", "list evaluations and test cases without running them", false).addOption(new import_commander.Option("-c, --console-url <URL>", "console url override").hideHelp()).action(async (target, options) => {
|
|
2782
2796
|
try {
|
|
2783
2797
|
if (options.debug) {
|
|
2784
2798
|
process.env.AXIOM_DEBUG = "true";
|
|
@@ -3259,7 +3273,7 @@ var import_commander2 = require("commander");
|
|
|
3259
3273
|
var loadVersionCommand = (program2) => {
|
|
3260
3274
|
return program2.addCommand(
|
|
3261
3275
|
new import_commander2.Command("version").description("cli version").action(() => {
|
|
3262
|
-
console.log("0.
|
|
3276
|
+
console.log("0.45.0");
|
|
3263
3277
|
})
|
|
3264
3278
|
);
|
|
3265
3279
|
};
|
|
@@ -3269,7 +3283,7 @@ var { loadEnvConfig } = import_env.default;
|
|
|
3269
3283
|
loadEnvConfig(process.cwd());
|
|
3270
3284
|
var { cleanedArgv, overrides } = extractOverrides(process.argv.slice(2));
|
|
3271
3285
|
var program = new import_commander3.Command();
|
|
3272
|
-
program.name("axiom").description("Axiom's CLI to manage your objects and run evals").version("0.
|
|
3286
|
+
program.name("axiom").description("Axiom's CLI to manage your objects and run evals").version("0.45.0");
|
|
3273
3287
|
program.hook("preAction", async (_, actionCommand) => {
|
|
3274
3288
|
const commandName = actionCommand.name();
|
|
3275
3289
|
const parentCommand = actionCommand.parent;
|