@diafunc/cli 0.32.3 → 0.32.4
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-MCSXRY47.js → chunk-BTYMTKQ5.js} +15 -11
- package/dist/{chunk-MCSXRY47.js.map → chunk-BTYMTKQ5.js.map} +1 -1
- package/dist/{chunk-VBPBYIPF.js → chunk-DLSVOPIW.js} +2 -2
- package/dist/{chunk-VBPBYIPF.js.map → chunk-DLSVOPIW.js.map} +1 -1
- package/dist/{chunk-IQCCLNNR.js → chunk-ZAYRKIOM.js} +2 -2
- package/dist/src/index.js +2 -2
- package/dist/update-check-5OWPB35K.js +8 -0
- package/package.json +1 -1
- package/dist/update-check-I4MHRJZU.js +0 -8
- /package/dist/{chunk-IQCCLNNR.js.map → chunk-ZAYRKIOM.js.map} +0 -0
- /package/dist/{update-check-I4MHRJZU.js.map → update-check-5OWPB35K.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-BTYMTKQ5.js";
|
|
8
8
|
import {
|
|
9
9
|
getUpdateNotice
|
|
10
|
-
} from "../chunk-
|
|
10
|
+
} from "../chunk-ZAYRKIOM.js";
|
|
11
11
|
import {
|
|
12
12
|
package_default
|
|
13
|
-
} from "../chunk-
|
|
13
|
+
} from "../chunk-DLSVOPIW.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-DLSVOPIW.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-5OWPB35K.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"));
|
|
@@ -12825,20 +12825,24 @@ function deploymentNotFound(error, deploymentId, predictionId) {
|
|
|
12825
12825
|
function isNotEnoughCredits(error) {
|
|
12826
12826
|
return error instanceof ApiError && error.status === 402;
|
|
12827
12827
|
}
|
|
12828
|
+
function inputName(input) {
|
|
12829
|
+
return input.title || input.input;
|
|
12830
|
+
}
|
|
12828
12831
|
function checkWords(check) {
|
|
12832
|
+
const name = inputName(check);
|
|
12829
12833
|
const range = check.observedMin !== null && check.observedMin !== void 0 && check.observedMax !== null && check.observedMax !== void 0 ? ` (observed ${num(check.observedMin)} to ${num(check.observedMax)})` : "";
|
|
12830
12834
|
const value = check.value === null || check.value === void 0 ? "" : ` = ${String(check.value)}`;
|
|
12831
12835
|
switch (check.kind) {
|
|
12832
12836
|
case "below_range":
|
|
12833
|
-
return `${
|
|
12837
|
+
return `${name}${value}, below the observed range${range}`;
|
|
12834
12838
|
case "above_range":
|
|
12835
|
-
return `${
|
|
12839
|
+
return `${name}${value}, above the observed range${range}`;
|
|
12836
12840
|
case "unseen_level":
|
|
12837
|
-
return `${
|
|
12841
|
+
return `${name}${value}, a level the model was not found on`;
|
|
12838
12842
|
case "missing":
|
|
12839
|
-
return `${
|
|
12843
|
+
return `${name}, not sent or not readable`;
|
|
12840
12844
|
default:
|
|
12841
|
-
return `${
|
|
12845
|
+
return `${name}${value}, ${words(check.kind)}`;
|
|
12842
12846
|
}
|
|
12843
12847
|
}
|
|
12844
12848
|
function predictionLines(deploymentId, answer) {
|
|
@@ -12869,7 +12873,7 @@ function predictionLines(deploymentId, answer) {
|
|
|
12869
12873
|
}
|
|
12870
12874
|
function inputRow(i) {
|
|
12871
12875
|
return {
|
|
12872
|
-
input: i.input === "@prediction" ? "(predictions)" : i
|
|
12876
|
+
input: i.input === "@prediction" ? "(predictions)" : inputName(i),
|
|
12873
12877
|
state: words(i.state),
|
|
12874
12878
|
psi: i.psi === null || i.psi === void 0 ? null : num(i.psi),
|
|
12875
12879
|
outOfRange: i.outOfRange > 0 ? `${count(i.outOfRange)} (${percent2(i.outOfRangeShare)})` : "0",
|
|
@@ -12987,7 +12991,7 @@ function printDeployment(deployment, outputFormat) {
|
|
|
12987
12991
|
if (outputFormat === "human" && (deployment.inputRanges ?? []).length > 0) {
|
|
12988
12992
|
heading("Inputs on the rows the model was found on");
|
|
12989
12993
|
for (const r of deployment.inputRanges ?? []) {
|
|
12990
|
-
detail(r.kind === "categorical" ? `${r
|
|
12994
|
+
detail(r.kind === "categorical" ? `${inputName(r)}: ${(r.levels ?? []).join(", ") || ABSENT}` : `${inputName(r)}: ${num(r.min)} to ${num(r.max)}, median ${num(r.median)}`);
|
|
12991
12995
|
}
|
|
12992
12996
|
}
|
|
12993
12997
|
}
|
|
@@ -15128,7 +15132,7 @@ function registerShellCommand(program) {
|
|
|
15128
15132
|
});
|
|
15129
15133
|
const api = createApiClient();
|
|
15130
15134
|
const { input: promptInput } = await import("@inquirer/prompts");
|
|
15131
|
-
const { getUpdateNotice } = await import("./update-check-
|
|
15135
|
+
const { getUpdateNotice } = await import("./update-check-5OWPB35K.js");
|
|
15132
15136
|
const resolvedLanguage = await resolveLanguage(api, fnRef.projectId, options.language);
|
|
15133
15137
|
console.log(chalk37.bold("Diafunc shell") + chalk37.dim(` \xB7 function ${fnRef.entityId} \xB7 ${resolvedLanguage}`));
|
|
15134
15138
|
console.log(chalk37.dim(`Endpoint: ${config.profiles[getActiveProfileName(config)]?.endpoint}`));
|
|
@@ -15939,4 +15943,4 @@ export {
|
|
|
15939
15943
|
PromptCanceled,
|
|
15940
15944
|
createProgram
|
|
15941
15945
|
};
|
|
15942
|
-
//# sourceMappingURL=chunk-
|
|
15946
|
+
//# sourceMappingURL=chunk-BTYMTKQ5.js.map
|