@denpex/sdk 0.8.2 → 0.8.3
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 +50 -50
- package/dist/client.d.ts +10 -0
- package/package.json +48 -48
package/README.md
CHANGED
|
@@ -1,50 +1,50 @@
|
|
|
1
|
-
# @denpex/sdk
|
|
2
|
-
|
|
3
|
-
TypeScript/JavaScript client for the [Denpex](https://denpex.com) API — diagnose GPU training
|
|
4
|
-
failures from logs, report fix outcomes, and check your plan quota. Zero runtime dependencies,
|
|
5
|
-
Node ≥ 18.
|
|
6
|
-
|
|
7
|
-
## Install
|
|
8
|
-
|
|
9
|
-
```bash
|
|
10
|
-
npm install @denpex/sdk
|
|
11
|
-
```
|
|
12
|
-
|
|
13
|
-
## Quick start
|
|
14
|
-
|
|
15
|
-
```ts
|
|
16
|
-
import { DenpexClient } from "@denpex/sdk";
|
|
17
|
-
|
|
18
|
-
const denpex = new DenpexClient({ apiKey: process.env.DENPEX_API_KEY! });
|
|
19
|
-
|
|
20
|
-
// Diagnose a training log
|
|
21
|
-
const result = await denpex.diagnose(logText, { jobName: "llama3-405b-pretrain" });
|
|
22
|
-
console.log(result.meta?.failureType, result.meta?.confidence);
|
|
23
|
-
console.log(result.fix?.summary);
|
|
24
|
-
console.log(result.fix?.action);
|
|
25
|
-
|
|
26
|
-
// Close the accuracy flywheel by reporting whether the fix worked
|
|
27
|
-
await denpex.feedback(result.diagnosisId, "worked");
|
|
28
|
-
|
|
29
|
-
// Check remaining headroom for the key's plan
|
|
30
|
-
const quota = await denpex.quota();
|
|
31
|
-
console.log(quota.quota);
|
|
32
|
-
```
|
|
33
|
-
|
|
34
|
-
Create an API key at <https://denpex.com/dashboard>. It is sent as the `X-Denpex-Key` header.
|
|
35
|
-
|
|
36
|
-
## API
|
|
37
|
-
|
|
38
|
-
| Method | Description |
|
|
39
|
-
|---|---|
|
|
40
|
-
| `new DenpexClient({ apiKey, baseUrl?, timeoutMs? })` | Construct a client. `baseUrl` defaults to `https://api.denpex.com`; the default 320-second timeout covers the server's 290-second deep path. |
|
|
41
|
-
| `diagnose(logs, opts?)` | `POST /api/diagnose` — returns the diagnosis (failure type, confidence, root cause, fix, evidence). |
|
|
42
|
-
| `refine(logs, operatorAnswers, opts?)` | Re-run the same canonical diagnosis with typed answers from `clarifyingChoices`. Send the full answer history; action selections become evidence requests, not evidence. |
|
|
43
|
-
| `feedback(diagnosisId, outcome, note?)` | `POST /api/diagnose/feedback` — `outcome` is `"worked"` or `"did_not_work"`. |
|
|
44
|
-
| `quota()` | `GET /api/diagnose/quota` — remaining diagnoses for the key's plan. |
|
|
45
|
-
|
|
46
|
-
Errors throw `DenpexError` with the HTTP status and server message.
|
|
47
|
-
|
|
48
|
-
## License
|
|
49
|
-
|
|
50
|
-
Proprietary. © Denpex. Use of this SDK is governed by your Denpex subscription agreement.
|
|
1
|
+
# @denpex/sdk
|
|
2
|
+
|
|
3
|
+
TypeScript/JavaScript client for the [Denpex](https://denpex.com) API — diagnose GPU training
|
|
4
|
+
failures from logs, report fix outcomes, and check your plan quota. Zero runtime dependencies,
|
|
5
|
+
Node ≥ 18.
|
|
6
|
+
|
|
7
|
+
## Install
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
npm install @denpex/sdk
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## Quick start
|
|
14
|
+
|
|
15
|
+
```ts
|
|
16
|
+
import { DenpexClient } from "@denpex/sdk";
|
|
17
|
+
|
|
18
|
+
const denpex = new DenpexClient({ apiKey: process.env.DENPEX_API_KEY! });
|
|
19
|
+
|
|
20
|
+
// Diagnose a training log
|
|
21
|
+
const result = await denpex.diagnose(logText, { jobName: "llama3-405b-pretrain" });
|
|
22
|
+
console.log(result.meta?.failureType, result.meta?.confidence);
|
|
23
|
+
console.log(result.fix?.summary);
|
|
24
|
+
console.log(result.fix?.action);
|
|
25
|
+
|
|
26
|
+
// Close the accuracy flywheel by reporting whether the fix worked
|
|
27
|
+
await denpex.feedback(result.diagnosisId, "worked");
|
|
28
|
+
|
|
29
|
+
// Check remaining headroom for the key's plan
|
|
30
|
+
const quota = await denpex.quota();
|
|
31
|
+
console.log(quota.quota);
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
Create an API key at <https://denpex.com/dashboard>. It is sent as the `X-Denpex-Key` header.
|
|
35
|
+
|
|
36
|
+
## API
|
|
37
|
+
|
|
38
|
+
| Method | Description |
|
|
39
|
+
|---|---|
|
|
40
|
+
| `new DenpexClient({ apiKey, baseUrl?, timeoutMs? })` | Construct a client. `baseUrl` defaults to `https://api.denpex.com`; the default 320-second timeout covers the server's 290-second deep path. |
|
|
41
|
+
| `diagnose(logs, opts?)` | `POST /api/diagnose` — returns the diagnosis (failure type, confidence, root cause, fix, evidence). |
|
|
42
|
+
| `refine(logs, operatorAnswers, opts?)` | Re-run the same canonical diagnosis with typed answers from `clarifyingChoices`. Send the full answer history; action selections become evidence requests, not evidence. |
|
|
43
|
+
| `feedback(diagnosisId, outcome, note?)` | `POST /api/diagnose/feedback` — `outcome` is `"worked"` or `"did_not_work"`. |
|
|
44
|
+
| `quota()` | `GET /api/diagnose/quota` — remaining diagnoses for the key's plan. |
|
|
45
|
+
|
|
46
|
+
Errors throw `DenpexError` with the HTTP status and server message.
|
|
47
|
+
|
|
48
|
+
## License
|
|
49
|
+
|
|
50
|
+
Proprietary. © Denpex. Use of this SDK is governed by your Denpex subscription agreement.
|
package/dist/client.d.ts
CHANGED
|
@@ -86,6 +86,16 @@ export interface ClarifyingQuestion {
|
|
|
86
86
|
command?: string;
|
|
87
87
|
}
|
|
88
88
|
export interface DiagnoseResponse {
|
|
89
|
+
/** Automated review signals, never independent proof of correctness. */
|
|
90
|
+
qualityReview?: {
|
|
91
|
+
schemaVersion: number;
|
|
92
|
+
status: 'needs_review' | 'no_flagged_issue';
|
|
93
|
+
family: string;
|
|
94
|
+
flags: string[];
|
|
95
|
+
verification: 'unverified';
|
|
96
|
+
engineVersion?: string;
|
|
97
|
+
note?: string;
|
|
98
|
+
};
|
|
89
99
|
fix?: {
|
|
90
100
|
summary?: string;
|
|
91
101
|
action?: string;
|
package/package.json
CHANGED
|
@@ -1,48 +1,48 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@denpex/sdk",
|
|
3
|
-
"version": "0.8.
|
|
4
|
-
"description": "TypeScript client for the Denpex API : diagnose GPU training failures from logs (POST /api/diagnose), report fix outcomes, check quota. Zero dependencies, Node >= 18.",
|
|
5
|
-
"keywords": [
|
|
6
|
-
"denpex",
|
|
7
|
-
"gpu",
|
|
8
|
-
"ml-training",
|
|
9
|
-
"distributed-training",
|
|
10
|
-
"diagnosis",
|
|
11
|
-
"nccl",
|
|
12
|
-
"cuda",
|
|
13
|
-
"observability",
|
|
14
|
-
"sdk"
|
|
15
|
-
],
|
|
16
|
-
"homepage": "https://denpex.com",
|
|
17
|
-
"repository": {
|
|
18
|
-
"type": "git",
|
|
19
|
-
"url": "git+https://github.com/MisaMisaAI/Denpex.git",
|
|
20
|
-
"directory": "denpex-sdk-ts"
|
|
21
|
-
},
|
|
22
|
-
"bugs": {
|
|
23
|
-
"url": "https://denpex.com/contact"
|
|
24
|
-
},
|
|
25
|
-
"license": "Proprietary",
|
|
26
|
-
"main": "dist/client.js",
|
|
27
|
-
"types": "dist/client.d.ts",
|
|
28
|
-
"files": [
|
|
29
|
-
"dist",
|
|
30
|
-
"README.md"
|
|
31
|
-
],
|
|
32
|
-
"engines": {
|
|
33
|
-
"node": ">=18"
|
|
34
|
-
},
|
|
35
|
-
"publishConfig": {
|
|
36
|
-
"access": "public"
|
|
37
|
-
},
|
|
38
|
-
"scripts": {
|
|
39
|
-
"build": "tsc -p tsconfig.json",
|
|
40
|
-
"prepublishOnly": "npm run build",
|
|
41
|
-
"test": "tsx --test tests/client.test.ts"
|
|
42
|
-
},
|
|
43
|
-
"devDependencies": {
|
|
44
|
-
"typescript": "^5.0.0",
|
|
45
|
-
"@types/node": "^20.0.0",
|
|
46
|
-
"tsx": "^4.23.1"
|
|
47
|
-
}
|
|
48
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@denpex/sdk",
|
|
3
|
+
"version": "0.8.3",
|
|
4
|
+
"description": "TypeScript client for the Denpex API : diagnose GPU training failures from logs (POST /api/diagnose), report fix outcomes, check quota. Zero dependencies, Node >= 18.",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"denpex",
|
|
7
|
+
"gpu",
|
|
8
|
+
"ml-training",
|
|
9
|
+
"distributed-training",
|
|
10
|
+
"diagnosis",
|
|
11
|
+
"nccl",
|
|
12
|
+
"cuda",
|
|
13
|
+
"observability",
|
|
14
|
+
"sdk"
|
|
15
|
+
],
|
|
16
|
+
"homepage": "https://denpex.com",
|
|
17
|
+
"repository": {
|
|
18
|
+
"type": "git",
|
|
19
|
+
"url": "git+https://github.com/MisaMisaAI/Denpex.git",
|
|
20
|
+
"directory": "denpex-sdk-ts"
|
|
21
|
+
},
|
|
22
|
+
"bugs": {
|
|
23
|
+
"url": "https://denpex.com/contact"
|
|
24
|
+
},
|
|
25
|
+
"license": "Proprietary",
|
|
26
|
+
"main": "dist/client.js",
|
|
27
|
+
"types": "dist/client.d.ts",
|
|
28
|
+
"files": [
|
|
29
|
+
"dist",
|
|
30
|
+
"README.md"
|
|
31
|
+
],
|
|
32
|
+
"engines": {
|
|
33
|
+
"node": ">=18"
|
|
34
|
+
},
|
|
35
|
+
"publishConfig": {
|
|
36
|
+
"access": "public"
|
|
37
|
+
},
|
|
38
|
+
"scripts": {
|
|
39
|
+
"build": "tsc -p tsconfig.json",
|
|
40
|
+
"prepublishOnly": "npm run build",
|
|
41
|
+
"test": "tsx --test tests/client.test.ts"
|
|
42
|
+
},
|
|
43
|
+
"devDependencies": {
|
|
44
|
+
"typescript": "^5.0.0",
|
|
45
|
+
"@types/node": "^20.0.0",
|
|
46
|
+
"tsx": "^4.23.1"
|
|
47
|
+
}
|
|
48
|
+
}
|