@diafunc/cli 0.32.1 → 0.32.3
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/diafunc.js +3 -3
- package/dist/{chunk-J3ZSLT24.js → chunk-IQCCLNNR.js} +2 -2
- package/dist/{chunk-MRKZZ4XD.js → chunk-MCSXRY47.js} +12 -7
- package/dist/{chunk-MRKZZ4XD.js.map → chunk-MCSXRY47.js.map} +1 -1
- package/dist/{chunk-QALKS4CY.js → chunk-VBPBYIPF.js} +2 -2
- package/dist/{chunk-QALKS4CY.js.map → chunk-VBPBYIPF.js.map} +1 -1
- package/dist/src/index.js +2 -2
- package/dist/update-check-I4MHRJZU.js +8 -0
- package/package.json +1 -1
- package/dist/update-check-R7B2D7VX.js +0 -8
- /package/dist/{chunk-J3ZSLT24.js.map → chunk-IQCCLNNR.js.map} +0 -0
- /package/dist/{update-check-R7B2D7VX.js.map → update-check-I4MHRJZU.js.map} +0 -0
package/dist/bin/diafunc.js
CHANGED
|
@@ -4,13 +4,13 @@ import {
|
|
|
4
4
|
PromptCanceled,
|
|
5
5
|
createProgram,
|
|
6
6
|
handleError
|
|
7
|
-
} from "../chunk-
|
|
7
|
+
} from "../chunk-MCSXRY47.js";
|
|
8
8
|
import {
|
|
9
9
|
getUpdateNotice
|
|
10
|
-
} from "../chunk-
|
|
10
|
+
} from "../chunk-IQCCLNNR.js";
|
|
11
11
|
import {
|
|
12
12
|
package_default
|
|
13
|
-
} from "../chunk-
|
|
13
|
+
} from "../chunk-VBPBYIPF.js";
|
|
14
14
|
|
|
15
15
|
// bin/diafunc.ts
|
|
16
16
|
import chalk2 from "chalk";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
package_default
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-VBPBYIPF.js";
|
|
4
4
|
|
|
5
5
|
// src/util/update-check.ts
|
|
6
6
|
import * as fs from "fs";
|
|
@@ -72,4 +72,4 @@ async function getUpdateNotice() {
|
|
|
72
72
|
export {
|
|
73
73
|
getUpdateNotice
|
|
74
74
|
};
|
|
75
|
-
//# sourceMappingURL=chunk-
|
|
75
|
+
//# sourceMappingURL=chunk-IQCCLNNR.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
package_default
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-VBPBYIPF.js";
|
|
4
4
|
|
|
5
5
|
// src/index.ts
|
|
6
6
|
import chalk42 from "chalk";
|
|
@@ -8555,7 +8555,7 @@ var HELP = [
|
|
|
8555
8555
|
];
|
|
8556
8556
|
async function runChatRepl(options) {
|
|
8557
8557
|
const { input: promptInput } = await import("@inquirer/prompts");
|
|
8558
|
-
const { getUpdateNotice } = await import("./update-check-
|
|
8558
|
+
const { getUpdateNotice } = await import("./update-check-I4MHRJZU.js");
|
|
8559
8559
|
let sessionId = options.session;
|
|
8560
8560
|
let lastReportedSession;
|
|
8561
8561
|
console.log(chalk21.bold("Diafunc chat") + chalk21.dim(" \xB7 /help for commands, /quit to exit"));
|
|
@@ -10406,16 +10406,19 @@ function dataShape(rows, columns) {
|
|
|
10406
10406
|
}
|
|
10407
10407
|
function qualityText(analysis, verdict) {
|
|
10408
10408
|
if (verdict?.validity === "not_valid") return "not shown: the result is not valid";
|
|
10409
|
+
if (analysis.tooLittleData === true) return TOO_LITTLE_DATA;
|
|
10409
10410
|
const figure = analysis.heldOutQuality != null ? qualityPercent(analysis.heldOutQuality) + rowsText(analysis.heldOutRows, analysis.searchRows) : analysis.resultRunQuality != null ? `${qualityPercent(analysis.resultRunQuality)} on the training rows` : null;
|
|
10410
10411
|
if (figure == null) return null;
|
|
10411
10412
|
return verdict?.validity === "needs_review" ? `${figure}, needs review` : figure;
|
|
10412
10413
|
}
|
|
10414
|
+
var TOO_LITTLE_DATA = "not shown: too few rows to judge the formula on rows it never saw";
|
|
10413
10415
|
function targetResultsText(analysis) {
|
|
10414
10416
|
const results = analysis.targetResults ?? [];
|
|
10415
10417
|
if (results.length === 0) return null;
|
|
10418
|
+
const withheld = analysis.tooLittleData === true;
|
|
10416
10419
|
const lines = results.map((r) => {
|
|
10417
10420
|
const name = r.title ?? r.target ?? "target";
|
|
10418
|
-
return r.quality != null ? `${name}: ${qualityPercent(r.quality)}${rowsText(r.heldOutRows, r.searchRows)}` : name;
|
|
10421
|
+
return r.quality != null && !withheld ? `${name}: ${qualityPercent(r.quality)}${rowsText(r.heldOutRows, r.searchRows)}` : name;
|
|
10419
10422
|
});
|
|
10420
10423
|
const more = (analysis.targetResultCount ?? results.length) - results.length;
|
|
10421
10424
|
if (more > 0) lines.push(`and ${formatNumber(more)} more`);
|
|
@@ -12850,7 +12853,9 @@ function predictionLines(deploymentId, answer) {
|
|
|
12850
12853
|
lines.push(`${level}interval ${num(c.lower)} to ${num(c.upper)}${expected}`);
|
|
12851
12854
|
}
|
|
12852
12855
|
const checks = answer.checks;
|
|
12853
|
-
if (checks &&
|
|
12856
|
+
if (checks && checks.withinRange === null) {
|
|
12857
|
+
lines.push("Inputs not checked: the analysis recorded no input ranges for this model.");
|
|
12858
|
+
} else if (checks && checks.withinRange === false) {
|
|
12854
12859
|
for (const check of checks.inputs ?? []) lines.push(`Outside what the model was found on: ${checkWords(check)}`);
|
|
12855
12860
|
}
|
|
12856
12861
|
if (checks?.distance !== null && checks?.distance !== void 0 && checks.distanceLine !== null && checks.distanceLine !== void 0 && checks.distance > checks.distanceLine) {
|
|
@@ -13006,7 +13011,7 @@ async function predictOne(deploymentId, options, cmd) {
|
|
|
13006
13011
|
const [first, ...rest] = predictionLines(deploymentId, answer);
|
|
13007
13012
|
console.log(first);
|
|
13008
13013
|
for (const line of rest) {
|
|
13009
|
-
if (line.startsWith("Outside") || line.startsWith("The row lies")) warn(line);
|
|
13014
|
+
if (line.startsWith("Outside") || line.startsWith("The row lies") || line.startsWith("Inputs not checked")) warn(line);
|
|
13010
13015
|
else detail(line);
|
|
13011
13016
|
}
|
|
13012
13017
|
}
|
|
@@ -15123,7 +15128,7 @@ function registerShellCommand(program) {
|
|
|
15123
15128
|
});
|
|
15124
15129
|
const api = createApiClient();
|
|
15125
15130
|
const { input: promptInput } = await import("@inquirer/prompts");
|
|
15126
|
-
const { getUpdateNotice } = await import("./update-check-
|
|
15131
|
+
const { getUpdateNotice } = await import("./update-check-I4MHRJZU.js");
|
|
15127
15132
|
const resolvedLanguage = await resolveLanguage(api, fnRef.projectId, options.language);
|
|
15128
15133
|
console.log(chalk37.bold("Diafunc shell") + chalk37.dim(` \xB7 function ${fnRef.entityId} \xB7 ${resolvedLanguage}`));
|
|
15129
15134
|
console.log(chalk37.dim(`Endpoint: ${config.profiles[getActiveProfileName(config)]?.endpoint}`));
|
|
@@ -15934,4 +15939,4 @@ export {
|
|
|
15934
15939
|
PromptCanceled,
|
|
15935
15940
|
createProgram
|
|
15936
15941
|
};
|
|
15937
|
-
//# sourceMappingURL=chunk-
|
|
15942
|
+
//# sourceMappingURL=chunk-MCSXRY47.js.map
|