badgr-cli 1.0.11 → 1.0.12
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/package.json +1 -1
- package/src/commands/run.js +7 -1
- package/src/commands/serve.js +7 -1
- package/src/fallback.js +2 -1
package/package.json
CHANGED
package/src/commands/run.js
CHANGED
|
@@ -257,7 +257,13 @@ export async function runCommand(config, args, chalk) {
|
|
|
257
257
|
body: buildBody(chosen.gpu, chosen.region),
|
|
258
258
|
});
|
|
259
259
|
} catch (err2) {
|
|
260
|
-
|
|
260
|
+
const d2 = err2.errorData;
|
|
261
|
+
if (d2?.code === 'PROVISIONING_FAILED' || d2?.code === 'PROVIDER_ADAPTER_ERROR') {
|
|
262
|
+
console.error(chalk.red(`\n ✗ Badgr found ${chosen.gpu} capacity, but the provider adapter failed during provisioning.`));
|
|
263
|
+
if (d2.message) console.error(chalk.dim(` Detail: ${d2.message}`));
|
|
264
|
+
} else {
|
|
265
|
+
console.error(chalk.red(`\n ✗ Job failed to start on ${chosen.gpu}: ${err2.message}`));
|
|
266
|
+
}
|
|
261
267
|
console.error(chalk.dim(`\n Debug: BADGR_DEBUG=1 badgr run … — shows full request/response\n`));
|
|
262
268
|
process.exit(1);
|
|
263
269
|
}
|
package/src/commands/serve.js
CHANGED
|
@@ -130,7 +130,13 @@ export async function serveCommand(config, args, chalk) {
|
|
|
130
130
|
},
|
|
131
131
|
});
|
|
132
132
|
} catch (err2) {
|
|
133
|
-
|
|
133
|
+
const d2 = err2.errorData;
|
|
134
|
+
if (d2?.code === 'PROVISIONING_FAILED' || d2?.code === 'PROVIDER_ADAPTER_ERROR') {
|
|
135
|
+
console.error(chalk.red(`\n ✗ Badgr found ${chosen.gpu} capacity, but the provider adapter failed during provisioning.`));
|
|
136
|
+
if (d2.message) console.error(chalk.dim(` Detail: ${d2.message}`));
|
|
137
|
+
} else {
|
|
138
|
+
console.error(chalk.red(`\n ✗ Serve failed on ${chosen.gpu}: ${err2.message}`));
|
|
139
|
+
}
|
|
134
140
|
console.error(chalk.dim(`\n Debug: BADGR_DEBUG=1 badgr serve … — shows full request/response\n`));
|
|
135
141
|
process.exit(1);
|
|
136
142
|
}
|
package/src/fallback.js
CHANGED
|
@@ -89,8 +89,9 @@ export async function promptFallback(requestedGpu, ranked, chalk) {
|
|
|
89
89
|
console.log(chalk.yellow(`\n ${requestedGpu} isn't available right now.\n`));
|
|
90
90
|
console.log(chalk.bold(' Closest match:'));
|
|
91
91
|
console.log(` ${chalk.cyan(top.gpu)} in ${top.region}`);
|
|
92
|
-
console.log(` ${chalk.green('$' + top.price.toFixed(2) + '/hr')} estimated`);
|
|
92
|
+
console.log(` ${chalk.green('$' + top.price.toFixed(2) + '/hr')} estimated price`);
|
|
93
93
|
if (topMeta?.desc) console.log(` ${topMeta.desc}`);
|
|
94
|
+
console.log(chalk.dim(' (availability estimated from market data — not pre-verified)'));
|
|
94
95
|
console.log();
|
|
95
96
|
|
|
96
97
|
if (!process.stdin.isTTY) {
|