trainfabric 0.1.49 → 0.1.50

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.
Files changed (2) hide show
  1. package/dist/index.cjs +12 -4
  2. package/package.json +1 -1
package/dist/index.cjs CHANGED
@@ -7951,6 +7951,7 @@ function validateChatJsonl(text) {
7951
7951
  valid: false,
7952
7952
  format: "chat_jsonl",
7953
7953
  rowCount: 0,
7954
+ lineCount: 0,
7954
7955
  duplicateCount: 0,
7955
7956
  tokenEstimate: 0,
7956
7957
  schemaVersion,
@@ -7958,7 +7959,6 @@ function validateChatJsonl(text) {
7958
7959
  };
7959
7960
  }
7960
7961
  for (const [index, line] of lines.entries()) {
7961
- rowCount += 1;
7962
7962
  let parsed;
7963
7963
  try {
7964
7964
  parsed = JSON.parse(line);
@@ -7979,6 +7979,7 @@ function validateChatJsonl(text) {
7979
7979
  });
7980
7980
  continue;
7981
7981
  }
7982
+ rowCount += 1;
7982
7983
  const assistantMessages = result.data.messages.filter((message) => message.role === "assistant");
7983
7984
  if (assistantMessages.length === 0) {
7984
7985
  warnings.push({
@@ -8027,6 +8028,7 @@ function validateChatJsonl(text) {
8027
8028
  valid: isValid2,
8028
8029
  format: "chat_jsonl",
8029
8030
  rowCount,
8031
+ lineCount: lines.length,
8030
8032
  duplicateCount,
8031
8033
  tokenEstimate,
8032
8034
  schemaVersion,
@@ -9362,7 +9364,7 @@ function buildComputeSpec(options) {
9362
9364
 
9363
9365
  // src/index.ts
9364
9366
  var DEFAULT_TRAINFABRIC_API_URL2 = "https://api.trainfabric.com";
9365
- var CLI_VERSION = "0.1.49";
9367
+ var CLI_VERSION = "0.1.50";
9366
9368
  var CONFIG_DIR = import_node_path3.default.join(import_node_os2.default.homedir(), ".trainfabric");
9367
9369
  var CONFIG_PATH = import_node_path3.default.join(CONFIG_DIR, "config.json");
9368
9370
  var FALLBACK_SECRET_PATH = import_node_path3.default.join(CONFIG_DIR, "session.enc");
@@ -9673,6 +9675,12 @@ function printQuoteSummary(bundle) {
9673
9675
  console.log(` data path: ${quote.dataPath ?? "auto"}`);
9674
9676
  console.log(` GPUs: ${gpuCount}`);
9675
9677
  console.log(` pool: ${quote.selectedPoolId}`);
9678
+ if (quote.fallbackPolicy) {
9679
+ console.log(` fallback: ${quote.fallbackPolicy.acceptedQuoteFallbackAllowed ? "allowed" : "disabled"} for accepted quote`);
9680
+ if (quote.fallbackPolicy.fallbackPoolId) {
9681
+ console.log(` fallback candidate: ${quote.fallbackPolicy.fallbackPoolId}`);
9682
+ }
9683
+ }
9676
9684
  console.log(` launch with: --quote ${quote.id}`);
9677
9685
  }
9678
9686
  console.log("");
@@ -10320,7 +10328,7 @@ program2.command("runs:usage").argument("<runId>").option("--json", "print raw J
10320
10328
  printJson(usage);
10321
10329
  }
10322
10330
  });
10323
- program2.command("runs:cost-breakdown").argument("<runId>").option("--summary", "print a human-readable cost summary instead of raw JSON").description("Fetch realized run cost and profitability").action(async (runId, options) => {
10331
+ program2.command("runs:cost-breakdown").argument("<runId>").option("--json", "print raw JSON output; this is the default unless --summary is used").option("--summary", "print a human-readable cost summary instead of raw JSON").description("Fetch realized run cost and profitability").action(async (runId, options) => {
10324
10332
  const breakdown = await createClient(loadConfig()).runs.costBreakdown(normalizeId(runId, "run", "Run ID"));
10325
10333
  if (options.summary) {
10326
10334
  printUsageSummary(breakdown);
@@ -10436,7 +10444,7 @@ program2.command("api-keys:create").requiredOption("--name <name>").option("--ow
10436
10444
  });
10437
10445
  printJson(apiKey);
10438
10446
  });
10439
- program2.command("api-keys:list").description("List API keys").action(async () => {
10447
+ program2.command("api-keys:list").option("--json", "print raw JSON output; this is the default").description("List API keys").action(async () => {
10440
10448
  printJson(await createClient(loadConfig()).apiKeys.list());
10441
10449
  });
10442
10450
  program2.command("api-keys:revoke").argument("<apiKeyId>").description("Revoke an API key").action(async (apiKeyId) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "trainfabric",
3
- "version": "0.1.49",
3
+ "version": "0.1.50",
4
4
  "description": "Trainfabric CLI for launching GPU training jobs on the hosted Trainfabric backend.",
5
5
  "type": "module",
6
6
  "main": "dist/index.cjs",