@tuned-tensor/cli 0.14.0 → 0.15.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/README.md +147 -69
- package/dist/{chunk-VRDDO2FP.js → chunk-YGN26POJ.js} +3 -3
- package/dist/chunk-YGN26POJ.js.map +1 -0
- package/dist/index.js +4405 -201
- package/dist/index.js.map +1 -1
- package/dist/local-runtime.js +10 -10
- package/dist/local-runtime.js.map +1 -1
- package/docs/local-runtime/architecture.md +11 -7
- package/docs/local-runtime/serving.md +8 -5
- package/docs/local-runtime/spark.md +4 -2
- package/package.json +1 -1
- package/training/adapter/src/model_contract.py +1 -1
- package/training/adapter/src/prefetch.py +1 -1
- package/training/adapter/src/train.py +2 -2
- package/dist/chunk-VRDDO2FP.js.map +0 -1
package/dist/local-runtime.js
CHANGED
|
@@ -81,7 +81,7 @@ import {
|
|
|
81
81
|
withHuggingFaceCacheEnvironment,
|
|
82
82
|
withOfflineHuggingFaceCacheEnvironment,
|
|
83
83
|
writePrivateJsonAtomic
|
|
84
|
-
} from "./chunk-
|
|
84
|
+
} from "./chunk-YGN26POJ.js";
|
|
85
85
|
|
|
86
86
|
// src/local-runtime/index.ts
|
|
87
87
|
import { readFileSync as readFileSync2, realpathSync } from "fs";
|
|
@@ -295,7 +295,7 @@ function pythonProbeSource(device) {
|
|
|
295
295
|
"import json",
|
|
296
296
|
"import torch, transformers, peft, huggingface_hub",
|
|
297
297
|
`requested = ${JSON.stringify(device)}`,
|
|
298
|
-
"assert torch.cuda.is_available(), 'TT
|
|
298
|
+
"assert torch.cuda.is_available(), 'TT local training requires CUDA but torch.cuda.is_available() is false'",
|
|
299
299
|
"props = torch.cuda.get_device_properties(0)",
|
|
300
300
|
"print(json.dumps({'python_ok': True, 'torch': torch.__version__, 'transformers': transformers.__version__, 'cuda_available': True, 'cuda_device': torch.cuda.get_device_name(0), 'compute_capability': list(torch.cuda.get_device_capability(0)), 'total_memory_bytes': props.total_memory, 'evaluation_device': requested}))"
|
|
301
301
|
].join("; ");
|
|
@@ -542,7 +542,7 @@ function withServingPythonEnvironment(env) {
|
|
|
542
542
|
function localArtifactPath(uri) {
|
|
543
543
|
if (uri.startsWith("file://")) return fileURLToPath(uri);
|
|
544
544
|
if (/^[a-z][a-z0-9+.-]*:/i.test(uri)) {
|
|
545
|
-
throw new Error(`TT
|
|
545
|
+
throw new Error(`Local TT serving requires a local file artifact, got: ${uri}`);
|
|
546
546
|
}
|
|
547
547
|
return resolve2(uri);
|
|
548
548
|
}
|
|
@@ -888,7 +888,7 @@ var MODEL_SERVE_OPTIONS = [
|
|
|
888
888
|
var COMMAND_DEFINITIONS = {
|
|
889
889
|
info: {
|
|
890
890
|
usage: "tt info",
|
|
891
|
-
description: "Show the installed TT
|
|
891
|
+
description: "Show the installed TT local runtime version and runner status.",
|
|
892
892
|
options: [],
|
|
893
893
|
maxPositionals: 0
|
|
894
894
|
},
|
|
@@ -1170,7 +1170,7 @@ async function loadCliBehaviorSpec(inputPath, runId) {
|
|
|
1170
1170
|
);
|
|
1171
1171
|
}
|
|
1172
1172
|
if (input.kind !== "spec") {
|
|
1173
|
-
throw new Error(`TT
|
|
1173
|
+
throw new Error(`TT expects a tunedtensor.json behavior spec, not a full run request: ${input.path}`);
|
|
1174
1174
|
}
|
|
1175
1175
|
return input;
|
|
1176
1176
|
}
|
|
@@ -1190,7 +1190,7 @@ function formatEvent(event) {
|
|
|
1190
1190
|
const formatted = key === "command" && Array.isArray(value) ? value.join(" ") : shortValue(value);
|
|
1191
1191
|
return formatted ? `${key}=${formatted}` : null;
|
|
1192
1192
|
}).filter((value) => Boolean(value)).slice(0, 5).join(" ");
|
|
1193
|
-
return sanitizeLogLine(`[tt
|
|
1193
|
+
return sanitizeLogLine(`[tt] ${event.stage}: ${event.message}${detailText ? ` (${detailText})` : ""}`);
|
|
1194
1194
|
}
|
|
1195
1195
|
function createConsoleReporter(options) {
|
|
1196
1196
|
if (options.quiet) return void 0;
|
|
@@ -1202,7 +1202,7 @@ function createConsoleReporter(options) {
|
|
|
1202
1202
|
`);
|
|
1203
1203
|
},
|
|
1204
1204
|
onLog(log) {
|
|
1205
|
-
const line = sanitizeLogLine(`[tt
|
|
1205
|
+
const line = sanitizeLogLine(`[tt] ${log.stage}${log.stream ? ` ${log.stream}` : ""}: ${log.message}`);
|
|
1206
1206
|
if (line === lastLogLine) return;
|
|
1207
1207
|
lastLogLine = line;
|
|
1208
1208
|
process.stderr.write(`${line}
|
|
@@ -1458,7 +1458,7 @@ async function serveStoredModelFromCli(args) {
|
|
|
1458
1458
|
});
|
|
1459
1459
|
return;
|
|
1460
1460
|
}
|
|
1461
|
-
process.stderr.write(`[tt
|
|
1461
|
+
process.stderr.write(`[tt] verified ${verified.integrity.checked} artifact file(s)
|
|
1462
1462
|
`);
|
|
1463
1463
|
await serveLocalModel(launch);
|
|
1464
1464
|
}
|
|
@@ -1587,7 +1587,7 @@ async function main(argv) {
|
|
|
1587
1587
|
} else if (input.kind === "spec") {
|
|
1588
1588
|
request = input.request;
|
|
1589
1589
|
} else {
|
|
1590
|
-
throw new Error(`TT
|
|
1590
|
+
throw new Error(`TT expects a tunedtensor.json behavior spec, not a full run request: ${input.path}`);
|
|
1591
1591
|
}
|
|
1592
1592
|
}
|
|
1593
1593
|
const checks = await runDoctor(configSelection.config, request, foundationSpec);
|
|
@@ -1674,7 +1674,7 @@ async function main(argv) {
|
|
|
1674
1674
|
return;
|
|
1675
1675
|
}
|
|
1676
1676
|
if (loaded.kind !== "spec") {
|
|
1677
|
-
throw new Error(`TT
|
|
1677
|
+
throw new Error(`TT expects a tunedtensor.json behavior spec, not a full run request: ${loaded.path}`);
|
|
1678
1678
|
}
|
|
1679
1679
|
const input = loaded;
|
|
1680
1680
|
assertLocalRunInputReady(input.request);
|