badgr-cli 1.0.39 → 1.0.40
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 +63 -0
- package/package.json +10 -4
package/README.md
CHANGED
|
@@ -46,6 +46,14 @@ badgr down <deployment-id>
|
|
|
46
46
|
| `badgr capacity` | Check available GPU capacity right now |
|
|
47
47
|
| `badgr billing` | Show balance and add funds |
|
|
48
48
|
| `badgr test` | Run an end-to-end test (provision → run → teardown) |
|
|
49
|
+
| `badgr workload list` | List saved workloads with run stats |
|
|
50
|
+
| `badgr workload run <name>` | Rerun a saved workload by name or ID |
|
|
51
|
+
| `badgr workload info <name>` | Show stats, route history, and recent jobs for a workload |
|
|
52
|
+
| `badgr workload delete <name>` | Delete a saved workload |
|
|
53
|
+
| `badgr workspace list` | List workspace trackers (job history + cost per context) |
|
|
54
|
+
| `badgr workspace create <name>` | Create a workspace tracker, optionally linked to a storage path |
|
|
55
|
+
| `badgr workspace info <name>` | Show jobs, cost, and files for a workspace |
|
|
56
|
+
| `badgr workspace delete <name>` | Archive a workspace tracker |
|
|
49
57
|
|
|
50
58
|
`badgr serve` — for anything that needs a persistent endpoint: LLM serving, embeddings, image generation APIs, transcription APIs.
|
|
51
59
|
|
|
@@ -101,6 +109,8 @@ badgr run python train.py --gpu A100 --env HF_TOKEN=$HF_TOKEN --max-runtime 60
|
|
|
101
109
|
| `--max-runtime <min>` | — | Auto-stop after N minutes (recommended) |
|
|
102
110
|
| `--max-cost <$>` | — | Auto-stop when total spend reaches this amount |
|
|
103
111
|
| `--detach` | — | Launch and return immediately, don't stream logs |
|
|
112
|
+
| `--save <name>` | — | Save this job as a named workload after it completes |
|
|
113
|
+
| `--workspace <name\|id>` | — | Link this job to a workspace tracker (name or `ws_…` ID) |
|
|
104
114
|
|
|
105
115
|
---
|
|
106
116
|
|
|
@@ -199,6 +209,59 @@ Accepts a public URL, S3/GCS URI, or a local text file under 10 MB. Outputs JSON
|
|
|
199
209
|
|
|
200
210
|
---
|
|
201
211
|
|
|
212
|
+
## Workloads
|
|
213
|
+
|
|
214
|
+
A workload is a saved job configuration. Once saved, you can rerun it by name instead of retyping all the flags. Badgr tracks success rate, average cost, average runtime, and the last known-good route so reruns are faster and cheaper over time.
|
|
215
|
+
|
|
216
|
+
**Save a workload** by adding `--save <name>` to any `badgr run` call:
|
|
217
|
+
|
|
218
|
+
```bash
|
|
219
|
+
badgr run python train.py --gpu A100 --env HF_TOKEN=$HF_TOKEN --max-runtime 120 --save my-training-job
|
|
220
|
+
```
|
|
221
|
+
|
|
222
|
+
**Rerun a saved workload:**
|
|
223
|
+
|
|
224
|
+
```bash
|
|
225
|
+
badgr workload run my-training-job
|
|
226
|
+
badgr workload run my-training-job --max-cost 5 # override spend cap
|
|
227
|
+
badgr workload run my-training-job --set HF_TOKEN=newval # override an env var
|
|
228
|
+
```
|
|
229
|
+
|
|
230
|
+
**Inspect and manage workloads:**
|
|
231
|
+
|
|
232
|
+
```bash
|
|
233
|
+
badgr workload list # list all saved workloads with stats
|
|
234
|
+
badgr workload info my-training-job # stats, route history, recent jobs
|
|
235
|
+
badgr workload delete my-training-job
|
|
236
|
+
```
|
|
237
|
+
|
|
238
|
+
| `badgr workload run` flag | Description |
|
|
239
|
+
|---|---|
|
|
240
|
+
| `--max-cost <$>` | Override the saved spend cap for this run |
|
|
241
|
+
| `--max-runtime <min>` | Override the saved runtime limit for this run |
|
|
242
|
+
| `--set KEY=VALUE` | Override a saved config value for this run (repeatable) |
|
|
243
|
+
|
|
244
|
+
---
|
|
245
|
+
|
|
246
|
+
## Workspaces
|
|
247
|
+
|
|
248
|
+
A workspace tracker groups jobs by a named context — useful for tracking cost and job history across a project or storage path.
|
|
249
|
+
|
|
250
|
+
```bash
|
|
251
|
+
badgr workspace create my-project --storage s3://my-bucket/runs --desc "nightly evals"
|
|
252
|
+
badgr run python eval.py --workspace my-project --max-cost 5
|
|
253
|
+
badgr workspace info my-project # jobs, total cost, files
|
|
254
|
+
badgr workspace list
|
|
255
|
+
badgr workspace delete my-project
|
|
256
|
+
```
|
|
257
|
+
|
|
258
|
+
| `badgr workspace create` flag | Description |
|
|
259
|
+
|---|---|
|
|
260
|
+
| `--storage <path>` | S3/GCS path to associate with this workspace |
|
|
261
|
+
| `--desc <text>` | Optional description |
|
|
262
|
+
|
|
263
|
+
---
|
|
264
|
+
|
|
202
265
|
## Routing
|
|
203
266
|
|
|
204
267
|
Badgr Auto selects the best eligible route based on GPU type, VRAM, availability, region, workload requirements, and reliability. Advanced users can optionally choose an execution tier or hardware constraint.
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "badgr-cli",
|
|
3
|
-
"version": "1.0.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "1.0.40",
|
|
4
|
+
"description": "Badgr — run or serve GPU workloads from one command",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
7
7
|
"badgr": "src/badgr.js"
|
|
@@ -12,7 +12,8 @@
|
|
|
12
12
|
"test:watch": "vitest"
|
|
13
13
|
},
|
|
14
14
|
"dependencies": {
|
|
15
|
-
"
|
|
15
|
+
"chalk": "^5.3.0",
|
|
16
|
+
"@inquirer/prompts": "^8.5.2"
|
|
16
17
|
},
|
|
17
18
|
"devDependencies": {
|
|
18
19
|
"vitest": "^4.1.8"
|
|
@@ -26,7 +27,12 @@
|
|
|
26
27
|
"ai",
|
|
27
28
|
"compute",
|
|
28
29
|
"gateway",
|
|
29
|
-
"openai"
|
|
30
|
+
"openai",
|
|
31
|
+
"workload",
|
|
32
|
+
"workspace",
|
|
33
|
+
"llm",
|
|
34
|
+
"inference",
|
|
35
|
+
"fine-tuning"
|
|
30
36
|
],
|
|
31
37
|
"license": "Apache-2.0"
|
|
32
38
|
}
|