computefence 0.3.3__tar.gz → 0.3.4.1__tar.gz
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.
- {computefence-0.3.3 → computefence-0.3.4.1}/PKG-INFO +76 -69
- {computefence-0.3.3 → computefence-0.3.4.1}/README.md +75 -68
- computefence-0.3.4.1/computefence/__init__.py +1 -0
- {computefence-0.3.3 → computefence-0.3.4.1}/computefence/checks/environment.py +22 -16
- {computefence-0.3.3 → computefence-0.3.4.1}/computefence.egg-info/PKG-INFO +76 -69
- {computefence-0.3.3 → computefence-0.3.4.1}/computefence.egg-info/SOURCES.txt +2 -1
- computefence-0.3.4.1/tests/test_arch_compat.py +80 -0
- computefence-0.3.3/computefence/__init__.py +0 -1
- {computefence-0.3.3 → computefence-0.3.4.1}/LICENSE +0 -0
- {computefence-0.3.3 → computefence-0.3.4.1}/computefence/checks/__init__.py +0 -0
- {computefence-0.3.3 → computefence-0.3.4.1}/computefence/checks/dataset.py +0 -0
- {computefence-0.3.3 → computefence-0.3.4.1}/computefence/checks/storage.py +0 -0
- {computefence-0.3.3 → computefence-0.3.4.1}/computefence/cli.py +0 -0
- {computefence-0.3.3 → computefence-0.3.4.1}/computefence/drift.py +0 -0
- {computefence-0.3.3 → computefence-0.3.4.1}/computefence/telemetry.py +0 -0
- {computefence-0.3.3 → computefence-0.3.4.1}/computefence.egg-info/dependency_links.txt +0 -0
- {computefence-0.3.3 → computefence-0.3.4.1}/computefence.egg-info/entry_points.txt +0 -0
- {computefence-0.3.3 → computefence-0.3.4.1}/computefence.egg-info/requires.txt +0 -0
- {computefence-0.3.3 → computefence-0.3.4.1}/computefence.egg-info/top_level.txt +0 -0
- {computefence-0.3.3 → computefence-0.3.4.1}/pyproject.toml +0 -0
- {computefence-0.3.3 → computefence-0.3.4.1}/setup.cfg +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: computefence
|
|
3
|
-
Version: 0.3.
|
|
3
|
+
Version: 0.3.4.1
|
|
4
4
|
Summary: Don't lose another RunPod checkpoint to ephemeral disk before your job bills.
|
|
5
5
|
License-Expression: MIT
|
|
6
6
|
Keywords: runpod,vast.ai,gpu training,hf_home,cuda,preflight,machine learning,mlops,checkpoint
|
|
@@ -16,6 +16,12 @@ Dynamic: license-file
|
|
|
16
16
|
|
|
17
17
|
[](https://github.com/Francisco-Booth/computefence-action)
|
|
18
18
|
|
|
19
|
+
## Sponsor
|
|
20
|
+
|
|
21
|
+
If ComputeFence saves you a failed run, consider sponsoring: [github.com/sponsors/Francisco-Booth](https://github.com/sponsors/Francisco-Booth)
|
|
22
|
+
|
|
23
|
+
**$99 design partner spot** — priority fixes, monthly call, refunded if it finds nothing on your first job. [Apply via Stripe](https://buy.stripe.com/7sY00ib6IcTc1PD6PdaEE05)
|
|
24
|
+
|
|
19
25
|
# ComputeFence
|
|
20
26
|
|
|
21
27
|
**Stop paying for silent failures.**
|
|
@@ -40,18 +46,17 @@ uvx computefence doctor
|
|
|
40
46
|
|
|
41
47
|
---
|
|
42
48
|
|
|
43
|
-
|
|
44
49
|
## ☁️ RunPod One-Click Template
|
|
45
50
|
|
|
46
|
-
If you train on RunPod, use the pre-built community template — ComputeFence
|
|
51
|
+
If you train on RunPod, use the pre-built community template — ComputeFence runs automatically on pod start.
|
|
47
52
|
|
|
48
53
|
**[→ Launch ComputeFence Pre-Flight Template](https://runpod.io/console/deploy?template=cq5psqzck6)**
|
|
49
54
|
|
|
50
55
|
- Runs `computefence doctor` on every pod start
|
|
51
|
-
- Logs preflight output to `/workspace/computefence-preflight.log`
|
|
52
56
|
- `HF_HOME` set to `/workspace/.cache/huggingface` by default
|
|
53
57
|
- Persistent `/workspace` volume included
|
|
54
58
|
|
|
59
|
+
---
|
|
55
60
|
|
|
56
61
|
## Usage
|
|
57
62
|
|
|
@@ -71,14 +76,52 @@ With checkpoint directory validation:
|
|
|
71
76
|
computefence doctor --output-dir ./checkpoints
|
|
72
77
|
```
|
|
73
78
|
|
|
79
|
+
Skip specific checks by ID:
|
|
80
|
+
|
|
81
|
+
```bash
|
|
82
|
+
computefence doctor --skip accelerate_config,persistent_volume
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
JSON output for scripting:
|
|
86
|
+
|
|
87
|
+
```bash
|
|
88
|
+
computefence doctor --json
|
|
89
|
+
```
|
|
90
|
+
|
|
74
91
|
Add to your pod startup script so it runs automatically before every job:
|
|
75
92
|
|
|
76
93
|
```bash
|
|
77
|
-
pip install computefence && computefence doctor && python train.py
|
|
94
|
+
pip install computefence==0.3.3 && computefence doctor && python train.py
|
|
78
95
|
```
|
|
79
96
|
|
|
80
97
|
---
|
|
81
98
|
|
|
99
|
+
## Exit codes
|
|
100
|
+
|
|
101
|
+
| Code | Meaning |
|
|
102
|
+
|---|---|
|
|
103
|
+
| 0 | All checks passed |
|
|
104
|
+
| 1 | Warnings — review before launching |
|
|
105
|
+
| 2 | Blockers — fix before launching |
|
|
106
|
+
| 64 | Usage error (unknown command) |
|
|
107
|
+
|
|
108
|
+
---
|
|
109
|
+
|
|
110
|
+
## What It Checks / What It Doesn't
|
|
111
|
+
|
|
112
|
+
| Checks | Does not check |
|
|
113
|
+
|---|---|
|
|
114
|
+
| PyTorch can see the GPU (silent CPU fallback) | Training script correctness |
|
|
115
|
+
| GPU architecture compatible with PyTorch build | Model architecture compatibility |
|
|
116
|
+
| HuggingFace cache on persistent storage | Learning rate or hyperparameters |
|
|
117
|
+
| Accelerate GPU count matches instance | Runtime behaviour during the job |
|
|
118
|
+
| Disk space headroom (warn <20 GB, block <5 GB) | GPU utilisation or dataloader throughput |
|
|
119
|
+
| Checkpoint output dir on persistent storage | Mid-run pod failures |
|
|
120
|
+
| Dataset duplicates, missing values, label conflicts | Export-stage OOM |
|
|
121
|
+
| Environment drift between pods | Merge integrity |
|
|
122
|
+
|
|
123
|
+
---
|
|
124
|
+
|
|
82
125
|
## Drift Detection
|
|
83
126
|
|
|
84
127
|
Save a fingerprint of your working environment after a clean run:
|
|
@@ -93,7 +136,7 @@ On your next pod, check whether anything has changed:
|
|
|
93
136
|
computefence doctor --check-drift
|
|
94
137
|
```
|
|
95
138
|
|
|
96
|
-
Example output
|
|
139
|
+
Example drift output:
|
|
97
140
|
|
|
98
141
|
Drift
|
|
99
142
|
⚠ [Drift] PyTorch version changed: 2.4.0+cu121 → 2.8.0+cu128
|
|
@@ -104,19 +147,19 @@ Fix: Ensure your pod template uses the same CUDA base image.
|
|
|
104
147
|
Fix: Check your pod configuration matches the saved environment.
|
|
105
148
|
|
|
106
149
|
|
|
107
|
-
Drift findings are warnings only — they never block a launch. The fingerprint is written to `.computefence-lock.json` on your persistent volume (`/workspace` or `--path` to override).
|
|
150
|
+
Drift findings are warnings only — they never block a launch. The fingerprint is written to `.computefence-lock.json` on your persistent volume (`/workspace` or `--path` to override).
|
|
108
151
|
|
|
109
152
|
---
|
|
110
153
|
|
|
111
154
|
## Example Output
|
|
112
155
|
|
|
113
|
-
ComputeFence v0.
|
|
156
|
+
ComputeFence v0.3.3 — Pre-flight diagnostic
|
|
114
157
|
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
115
158
|
2 WARNINGS · 0 BLOCKERS · 6 PASSED
|
|
116
159
|
|
|
117
160
|
Environment
|
|
118
|
-
✓ Python 3.
|
|
119
|
-
✓ PyTorch 2.
|
|
161
|
+
✓ Python 3.11.0
|
|
162
|
+
✓ PyTorch 2.4.1+cu124 detected (CUDA available — NVIDIA A40)
|
|
120
163
|
⚠ No Accelerate config found — skipping GPU count check
|
|
121
164
|
Fix: Run ‘accelerate config’ to create a configuration file
|
|
122
165
|
|
|
@@ -132,57 +175,28 @@ Fix: Run with --dataset path/to/your/dataset.csv to enable dataset checks
|
|
|
132
175
|
|
|
133
176
|
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
134
177
|
2 warning(s) found. Review before launching.
|
|
178
|
+
Pseudonymous run stats are not collected by default. To opt in: touch ~/.computefence_telemetry
|
|
135
179
|
|
|
136
|
-
Anonymous run stats are collected to improve ComputeFence.
|
|
137
|
-
To opt out: touch ~/.computefence_no_telemetry
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
---
|
|
141
|
-
|
|
142
|
-
## What It Checks
|
|
143
|
-
|
|
144
|
-
**CUDA and GPU visibility**
|
|
145
|
-
Confirms PyTorch can see the GPU. Catches silent CPU fallback before it runs for eight hours at 24 seconds per iteration instead of 0.4.
|
|
146
|
-
|
|
147
|
-
**HuggingFace cache path**
|
|
148
|
-
Confirms model weights are writing to persistent storage. If HF_HOME points to ephemeral disk your weights disappear when the pod stops.
|
|
149
|
-
|
|
150
|
-
**Accelerate GPU count**
|
|
151
|
-
Confirms your distributed training config matches the GPUs actually on the instance. A mismatch leaves GPUs idle for the entire run with no error message.
|
|
152
|
-
|
|
153
|
-
**Disk space headroom**
|
|
154
|
-
Checks free space on workspace volumes and root disk. Warns below 20 GB. Blocks below 5 GB. Catches the failure where checkpoints stop saving at 90 percent completion because the disk filled.
|
|
155
|
-
|
|
156
|
-
**Checkpoint output directory**
|
|
157
|
-
Confirms your training script's output path is on persistent storage not ephemeral disk. HF_HOME and your checkpoint directory are separate paths — fixing one does not fix the other.
|
|
158
|
-
|
|
159
|
-
**Dataset integrity**
|
|
160
|
-
Optional scan for duplicates, missing values, and conflicting labels. Pass --dataset to enable.
|
|
161
|
-
|
|
162
|
-
**Environment drift detection**
|
|
163
|
-
Saves a 4-vector fingerprint (PyTorch/CUDA version, storage paths, GPU count and compute capability, critical library versions) and diffs it on the next pod. Catches silent environment changes between runs.
|
|
164
180
|
|
|
165
181
|
---
|
|
166
182
|
|
|
167
|
-
##
|
|
183
|
+
## Telemetry
|
|
168
184
|
|
|
169
|
-
-
|
|
170
|
-
- Model architecture compatibility
|
|
171
|
-
- Learning rate or hyperparameter safety
|
|
172
|
-
- Runtime behaviour during the job
|
|
173
|
-
- GPU utilisation or dataloader throughput during training
|
|
185
|
+
Opt-in pseudonymous run statistics. Nothing is sent by default.
|
|
174
186
|
|
|
175
|
-
|
|
187
|
+
To opt in:
|
|
176
188
|
|
|
177
|
-
|
|
189
|
+
```bash
|
|
190
|
+
touch ~/.computefence_telemetry
|
|
191
|
+
```
|
|
178
192
|
|
|
179
|
-
|
|
193
|
+
To opt out if previously opted in, or to honour `DO_NOT_TRACK`:
|
|
180
194
|
|
|
181
|
-
|
|
195
|
+
```bash
|
|
196
|
+
DO_NOT_TRACK=1 computefence doctor
|
|
197
|
+
```
|
|
182
198
|
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
Nothing existed that caught these before the job started. So I built it.
|
|
199
|
+
No personal data, no file paths, no model weights. Fields sent: version, Python version, platform, GPU count, check results.
|
|
186
200
|
|
|
187
201
|
---
|
|
188
202
|
|
|
@@ -192,31 +206,19 @@ Nothing existed that caught these before the job started. So I built it.
|
|
|
192
206
|
|
|
193
207
|
**Shahzeb Ali**, a computer vision engineer running client training jobs on RunPod, confirmed the storage warning matches real pod behaviour. He would not have caught the HF_HOME issue without the tool.
|
|
194
208
|
|
|
195
|
-
**An independent Vast.ai operator** ran computefence doctor six times overnight before a real training job without being prompted or paid to do so.
|
|
209
|
+
**An independent Vast.ai operator** ran `computefence doctor` six times overnight before a real training job without being prompted or paid to do so.
|
|
196
210
|
|
|
197
211
|
Thirteen independent ML engineers confirmed this problem across RunPod, Vast.ai, and AWS. Nine had lost checkpoints to ephemeral disk. Five confirmed Docker does not solve job-specific configuration mistakes.
|
|
198
212
|
|
|
199
213
|
---
|
|
200
214
|
|
|
201
|
-
##
|
|
202
|
-
|
|
203
|
-
A healthy GPU does not mean you are running the right job.
|
|
204
|
-
|
|
205
|
-
Docker makes environments reproducible. It does not check whether your HuggingFace cache is writing to ephemeral storage that disappears on pod stop, whether your Accelerate config matches the GPUs on the instance, or whether your checkpoint output directory is on persistent storage.
|
|
206
|
-
|
|
207
|
-
ComputeFence addresses the job configuration layer — not the environment layer.
|
|
208
|
-
|
|
209
|
-
HF_HOME and your checkpoint output directory are separate paths. Fixing one does not fix the other. Both disappear on pod restart if they point to ephemeral disk.
|
|
210
|
-
|
|
211
|
-
---
|
|
215
|
+
## Why This Exists
|
|
212
216
|
|
|
213
|
-
|
|
217
|
+
I burned approximately £1,000 on GPU training runs that failed silently.
|
|
214
218
|
|
|
215
|
-
|
|
219
|
+
CUDA fell back to CPU with no error message. 24 seconds per iteration instead of 0.4. Class weights caused loss to collapse to 0.693 immediately. My dataset had 28,432 duplicate rows and 312 conflicting labels I only found after the run finished.
|
|
216
220
|
|
|
217
|
-
|
|
218
|
-
touch ~/.computefence_no_telemetry
|
|
219
|
-
```
|
|
221
|
+
Nothing existed that caught these before the job started. So I built it.
|
|
220
222
|
|
|
221
223
|
---
|
|
222
224
|
|
|
@@ -228,7 +230,6 @@ Three founding design partner spots at $99 for three months:
|
|
|
228
230
|
|
|
229
231
|
- Personal audit of your launch templates and persistent storage configuration
|
|
230
232
|
- ComputeFence installed into your pod startup scripts — pre-flight runs automatically before every job
|
|
231
|
-
- Slack or Discord webhook alert when a check fails or blocks a launch
|
|
232
233
|
- Monthly 30-minute call where you shape what gets built next
|
|
233
234
|
- Money back if it does not catch one actionable issue in three months
|
|
234
235
|
|
|
@@ -236,6 +237,12 @@ Email francisco@booth.ws to apply.
|
|
|
236
237
|
|
|
237
238
|
---
|
|
238
239
|
|
|
240
|
+
## Acknowledgements
|
|
241
|
+
|
|
242
|
+
Thanks to **Steve Simo** for a thorough independent security and code review of v0.3.1.
|
|
243
|
+
|
|
244
|
+
---
|
|
245
|
+
|
|
239
246
|
## Links
|
|
240
247
|
|
|
241
248
|
- GitHub: https://github.com/Francisco-Booth/ComputeFence
|
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
[](https://github.com/Francisco-Booth/computefence-action)
|
|
2
2
|
|
|
3
|
+
## Sponsor
|
|
4
|
+
|
|
5
|
+
If ComputeFence saves you a failed run, consider sponsoring: [github.com/sponsors/Francisco-Booth](https://github.com/sponsors/Francisco-Booth)
|
|
6
|
+
|
|
7
|
+
**$99 design partner spot** — priority fixes, monthly call, refunded if it finds nothing on your first job. [Apply via Stripe](https://buy.stripe.com/7sY00ib6IcTc1PD6PdaEE05)
|
|
8
|
+
|
|
3
9
|
# ComputeFence
|
|
4
10
|
|
|
5
11
|
**Stop paying for silent failures.**
|
|
@@ -24,18 +30,17 @@ uvx computefence doctor
|
|
|
24
30
|
|
|
25
31
|
---
|
|
26
32
|
|
|
27
|
-
|
|
28
33
|
## ☁️ RunPod One-Click Template
|
|
29
34
|
|
|
30
|
-
If you train on RunPod, use the pre-built community template — ComputeFence
|
|
35
|
+
If you train on RunPod, use the pre-built community template — ComputeFence runs automatically on pod start.
|
|
31
36
|
|
|
32
37
|
**[→ Launch ComputeFence Pre-Flight Template](https://runpod.io/console/deploy?template=cq5psqzck6)**
|
|
33
38
|
|
|
34
39
|
- Runs `computefence doctor` on every pod start
|
|
35
|
-
- Logs preflight output to `/workspace/computefence-preflight.log`
|
|
36
40
|
- `HF_HOME` set to `/workspace/.cache/huggingface` by default
|
|
37
41
|
- Persistent `/workspace` volume included
|
|
38
42
|
|
|
43
|
+
---
|
|
39
44
|
|
|
40
45
|
## Usage
|
|
41
46
|
|
|
@@ -55,14 +60,52 @@ With checkpoint directory validation:
|
|
|
55
60
|
computefence doctor --output-dir ./checkpoints
|
|
56
61
|
```
|
|
57
62
|
|
|
63
|
+
Skip specific checks by ID:
|
|
64
|
+
|
|
65
|
+
```bash
|
|
66
|
+
computefence doctor --skip accelerate_config,persistent_volume
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
JSON output for scripting:
|
|
70
|
+
|
|
71
|
+
```bash
|
|
72
|
+
computefence doctor --json
|
|
73
|
+
```
|
|
74
|
+
|
|
58
75
|
Add to your pod startup script so it runs automatically before every job:
|
|
59
76
|
|
|
60
77
|
```bash
|
|
61
|
-
pip install computefence && computefence doctor && python train.py
|
|
78
|
+
pip install computefence==0.3.3 && computefence doctor && python train.py
|
|
62
79
|
```
|
|
63
80
|
|
|
64
81
|
---
|
|
65
82
|
|
|
83
|
+
## Exit codes
|
|
84
|
+
|
|
85
|
+
| Code | Meaning |
|
|
86
|
+
|---|---|
|
|
87
|
+
| 0 | All checks passed |
|
|
88
|
+
| 1 | Warnings — review before launching |
|
|
89
|
+
| 2 | Blockers — fix before launching |
|
|
90
|
+
| 64 | Usage error (unknown command) |
|
|
91
|
+
|
|
92
|
+
---
|
|
93
|
+
|
|
94
|
+
## What It Checks / What It Doesn't
|
|
95
|
+
|
|
96
|
+
| Checks | Does not check |
|
|
97
|
+
|---|---|
|
|
98
|
+
| PyTorch can see the GPU (silent CPU fallback) | Training script correctness |
|
|
99
|
+
| GPU architecture compatible with PyTorch build | Model architecture compatibility |
|
|
100
|
+
| HuggingFace cache on persistent storage | Learning rate or hyperparameters |
|
|
101
|
+
| Accelerate GPU count matches instance | Runtime behaviour during the job |
|
|
102
|
+
| Disk space headroom (warn <20 GB, block <5 GB) | GPU utilisation or dataloader throughput |
|
|
103
|
+
| Checkpoint output dir on persistent storage | Mid-run pod failures |
|
|
104
|
+
| Dataset duplicates, missing values, label conflicts | Export-stage OOM |
|
|
105
|
+
| Environment drift between pods | Merge integrity |
|
|
106
|
+
|
|
107
|
+
---
|
|
108
|
+
|
|
66
109
|
## Drift Detection
|
|
67
110
|
|
|
68
111
|
Save a fingerprint of your working environment after a clean run:
|
|
@@ -77,7 +120,7 @@ On your next pod, check whether anything has changed:
|
|
|
77
120
|
computefence doctor --check-drift
|
|
78
121
|
```
|
|
79
122
|
|
|
80
|
-
Example output
|
|
123
|
+
Example drift output:
|
|
81
124
|
|
|
82
125
|
Drift
|
|
83
126
|
⚠ [Drift] PyTorch version changed: 2.4.0+cu121 → 2.8.0+cu128
|
|
@@ -88,19 +131,19 @@ Fix: Ensure your pod template uses the same CUDA base image.
|
|
|
88
131
|
Fix: Check your pod configuration matches the saved environment.
|
|
89
132
|
|
|
90
133
|
|
|
91
|
-
Drift findings are warnings only — they never block a launch. The fingerprint is written to `.computefence-lock.json` on your persistent volume (`/workspace` or `--path` to override).
|
|
134
|
+
Drift findings are warnings only — they never block a launch. The fingerprint is written to `.computefence-lock.json` on your persistent volume (`/workspace` or `--path` to override).
|
|
92
135
|
|
|
93
136
|
---
|
|
94
137
|
|
|
95
138
|
## Example Output
|
|
96
139
|
|
|
97
|
-
ComputeFence v0.
|
|
140
|
+
ComputeFence v0.3.3 — Pre-flight diagnostic
|
|
98
141
|
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
99
142
|
2 WARNINGS · 0 BLOCKERS · 6 PASSED
|
|
100
143
|
|
|
101
144
|
Environment
|
|
102
|
-
✓ Python 3.
|
|
103
|
-
✓ PyTorch 2.
|
|
145
|
+
✓ Python 3.11.0
|
|
146
|
+
✓ PyTorch 2.4.1+cu124 detected (CUDA available — NVIDIA A40)
|
|
104
147
|
⚠ No Accelerate config found — skipping GPU count check
|
|
105
148
|
Fix: Run ‘accelerate config’ to create a configuration file
|
|
106
149
|
|
|
@@ -116,57 +159,28 @@ Fix: Run with --dataset path/to/your/dataset.csv to enable dataset checks
|
|
|
116
159
|
|
|
117
160
|
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
118
161
|
2 warning(s) found. Review before launching.
|
|
162
|
+
Pseudonymous run stats are not collected by default. To opt in: touch ~/.computefence_telemetry
|
|
119
163
|
|
|
120
|
-
Anonymous run stats are collected to improve ComputeFence.
|
|
121
|
-
To opt out: touch ~/.computefence_no_telemetry
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
---
|
|
125
|
-
|
|
126
|
-
## What It Checks
|
|
127
|
-
|
|
128
|
-
**CUDA and GPU visibility**
|
|
129
|
-
Confirms PyTorch can see the GPU. Catches silent CPU fallback before it runs for eight hours at 24 seconds per iteration instead of 0.4.
|
|
130
|
-
|
|
131
|
-
**HuggingFace cache path**
|
|
132
|
-
Confirms model weights are writing to persistent storage. If HF_HOME points to ephemeral disk your weights disappear when the pod stops.
|
|
133
|
-
|
|
134
|
-
**Accelerate GPU count**
|
|
135
|
-
Confirms your distributed training config matches the GPUs actually on the instance. A mismatch leaves GPUs idle for the entire run with no error message.
|
|
136
|
-
|
|
137
|
-
**Disk space headroom**
|
|
138
|
-
Checks free space on workspace volumes and root disk. Warns below 20 GB. Blocks below 5 GB. Catches the failure where checkpoints stop saving at 90 percent completion because the disk filled.
|
|
139
|
-
|
|
140
|
-
**Checkpoint output directory**
|
|
141
|
-
Confirms your training script's output path is on persistent storage not ephemeral disk. HF_HOME and your checkpoint directory are separate paths — fixing one does not fix the other.
|
|
142
|
-
|
|
143
|
-
**Dataset integrity**
|
|
144
|
-
Optional scan for duplicates, missing values, and conflicting labels. Pass --dataset to enable.
|
|
145
|
-
|
|
146
|
-
**Environment drift detection**
|
|
147
|
-
Saves a 4-vector fingerprint (PyTorch/CUDA version, storage paths, GPU count and compute capability, critical library versions) and diffs it on the next pod. Catches silent environment changes between runs.
|
|
148
164
|
|
|
149
165
|
---
|
|
150
166
|
|
|
151
|
-
##
|
|
167
|
+
## Telemetry
|
|
152
168
|
|
|
153
|
-
-
|
|
154
|
-
- Model architecture compatibility
|
|
155
|
-
- Learning rate or hyperparameter safety
|
|
156
|
-
- Runtime behaviour during the job
|
|
157
|
-
- GPU utilisation or dataloader throughput during training
|
|
169
|
+
Opt-in pseudonymous run statistics. Nothing is sent by default.
|
|
158
170
|
|
|
159
|
-
|
|
171
|
+
To opt in:
|
|
160
172
|
|
|
161
|
-
|
|
173
|
+
```bash
|
|
174
|
+
touch ~/.computefence_telemetry
|
|
175
|
+
```
|
|
162
176
|
|
|
163
|
-
|
|
177
|
+
To opt out if previously opted in, or to honour `DO_NOT_TRACK`:
|
|
164
178
|
|
|
165
|
-
|
|
179
|
+
```bash
|
|
180
|
+
DO_NOT_TRACK=1 computefence doctor
|
|
181
|
+
```
|
|
166
182
|
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
Nothing existed that caught these before the job started. So I built it.
|
|
183
|
+
No personal data, no file paths, no model weights. Fields sent: version, Python version, platform, GPU count, check results.
|
|
170
184
|
|
|
171
185
|
---
|
|
172
186
|
|
|
@@ -176,31 +190,19 @@ Nothing existed that caught these before the job started. So I built it.
|
|
|
176
190
|
|
|
177
191
|
**Shahzeb Ali**, a computer vision engineer running client training jobs on RunPod, confirmed the storage warning matches real pod behaviour. He would not have caught the HF_HOME issue without the tool.
|
|
178
192
|
|
|
179
|
-
**An independent Vast.ai operator** ran computefence doctor six times overnight before a real training job without being prompted or paid to do so.
|
|
193
|
+
**An independent Vast.ai operator** ran `computefence doctor` six times overnight before a real training job without being prompted or paid to do so.
|
|
180
194
|
|
|
181
195
|
Thirteen independent ML engineers confirmed this problem across RunPod, Vast.ai, and AWS. Nine had lost checkpoints to ephemeral disk. Five confirmed Docker does not solve job-specific configuration mistakes.
|
|
182
196
|
|
|
183
197
|
---
|
|
184
198
|
|
|
185
|
-
##
|
|
186
|
-
|
|
187
|
-
A healthy GPU does not mean you are running the right job.
|
|
188
|
-
|
|
189
|
-
Docker makes environments reproducible. It does not check whether your HuggingFace cache is writing to ephemeral storage that disappears on pod stop, whether your Accelerate config matches the GPUs on the instance, or whether your checkpoint output directory is on persistent storage.
|
|
190
|
-
|
|
191
|
-
ComputeFence addresses the job configuration layer — not the environment layer.
|
|
192
|
-
|
|
193
|
-
HF_HOME and your checkpoint output directory are separate paths. Fixing one does not fix the other. Both disappear on pod restart if they point to ephemeral disk.
|
|
194
|
-
|
|
195
|
-
---
|
|
199
|
+
## Why This Exists
|
|
196
200
|
|
|
197
|
-
|
|
201
|
+
I burned approximately £1,000 on GPU training runs that failed silently.
|
|
198
202
|
|
|
199
|
-
|
|
203
|
+
CUDA fell back to CPU with no error message. 24 seconds per iteration instead of 0.4. Class weights caused loss to collapse to 0.693 immediately. My dataset had 28,432 duplicate rows and 312 conflicting labels I only found after the run finished.
|
|
200
204
|
|
|
201
|
-
|
|
202
|
-
touch ~/.computefence_no_telemetry
|
|
203
|
-
```
|
|
205
|
+
Nothing existed that caught these before the job started. So I built it.
|
|
204
206
|
|
|
205
207
|
---
|
|
206
208
|
|
|
@@ -212,7 +214,6 @@ Three founding design partner spots at $99 for three months:
|
|
|
212
214
|
|
|
213
215
|
- Personal audit of your launch templates and persistent storage configuration
|
|
214
216
|
- ComputeFence installed into your pod startup scripts — pre-flight runs automatically before every job
|
|
215
|
-
- Slack or Discord webhook alert when a check fails or blocks a launch
|
|
216
217
|
- Monthly 30-minute call where you shape what gets built next
|
|
217
218
|
- Money back if it does not catch one actionable issue in three months
|
|
218
219
|
|
|
@@ -220,6 +221,12 @@ Email francisco@booth.ws to apply.
|
|
|
220
221
|
|
|
221
222
|
---
|
|
222
223
|
|
|
224
|
+
## Acknowledgements
|
|
225
|
+
|
|
226
|
+
Thanks to **Steve Simo** for a thorough independent security and code review of v0.3.1.
|
|
227
|
+
|
|
228
|
+
---
|
|
229
|
+
|
|
223
230
|
## Links
|
|
224
231
|
|
|
225
232
|
- GitHub: https://github.com/Francisco-Booth/ComputeFence
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "0.3.4.1"
|
|
@@ -73,16 +73,21 @@ def check_gpu_arch_compat(torch_info):
|
|
|
73
73
|
return results
|
|
74
74
|
|
|
75
75
|
try:
|
|
76
|
-
|
|
76
|
+
arch_list = torch.cuda.get_arch_list()
|
|
77
77
|
except Exception:
|
|
78
78
|
return results
|
|
79
79
|
|
|
80
|
-
|
|
80
|
+
if not arch_list:
|
|
81
|
+
return results
|
|
82
|
+
|
|
83
|
+
# Parse arch_list into a set of (major, minor) tuples for membership checks.
|
|
84
|
+
# sm_90a and similar suffixed entries are skipped — they represent PTX variants,
|
|
85
|
+
# not distinct compute capabilities.
|
|
81
86
|
supported_caps = set()
|
|
82
|
-
for arch in
|
|
87
|
+
for arch in arch_list:
|
|
83
88
|
if arch.startswith("sm_") and len(arch) > 3:
|
|
84
89
|
digits = arch[3:]
|
|
85
|
-
if len(digits) >= 2:
|
|
90
|
+
if len(digits) >= 2 and digits.isdigit():
|
|
86
91
|
try:
|
|
87
92
|
major = int(digits[:-1])
|
|
88
93
|
minor = int(digits[-1])
|
|
@@ -93,7 +98,11 @@ def check_gpu_arch_compat(torch_info):
|
|
|
93
98
|
if not supported_caps:
|
|
94
99
|
return results
|
|
95
100
|
|
|
96
|
-
|
|
101
|
+
# Build the human-readable list from the original strings (not the parsed set)
|
|
102
|
+
# so the error message matches exactly what PyTorch reports.
|
|
103
|
+
supported_str = ", ".join(
|
|
104
|
+
arch for arch in arch_list if arch.startswith("sm_")
|
|
105
|
+
)
|
|
97
106
|
|
|
98
107
|
for i in range(torch_info["device_count"]):
|
|
99
108
|
name = torch_info["device_names"][i] if i < len(torch_info["device_names"]) else f"GPU {i}"
|
|
@@ -102,23 +111,20 @@ def check_gpu_arch_compat(torch_info):
|
|
|
102
111
|
except Exception:
|
|
103
112
|
continue
|
|
104
113
|
|
|
105
|
-
# GPU is compatible if
|
|
106
|
-
#
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
114
|
+
# Membership check: the GPU is compatible if and only if its exact
|
|
115
|
+
# compute capability appears in get_arch_list(). No ceiling comparison —
|
|
116
|
+
# the old ceiling logic incorrectly blocked Ada (sm_89) on cu124 builds
|
|
117
|
+
# whose list ends at sm_90.
|
|
118
|
+
compatible = cap in supported_caps
|
|
110
119
|
|
|
111
120
|
if not compatible:
|
|
112
|
-
supported_str = ", ".join(
|
|
113
|
-
f"sm_{m}{n}" for m, n in sorted(supported_caps)
|
|
114
|
-
)
|
|
115
121
|
results.append({
|
|
116
122
|
"id": f"gpu_arch_compat_{i}",
|
|
117
123
|
"status": "fail",
|
|
118
124
|
"message": (
|
|
119
125
|
f"{name} has compute capability sm_{cap[0]}{cap[1]}, "
|
|
120
126
|
f"which is not supported by this PyTorch build "
|
|
121
|
-
f"(
|
|
127
|
+
f"(supported by this build: {supported_str})"
|
|
122
128
|
),
|
|
123
129
|
"fix": (
|
|
124
130
|
f"Install a PyTorch build that supports sm_{cap[0]}{cap[1]}: "
|
|
@@ -188,7 +194,7 @@ def check_environment():
|
|
|
188
194
|
"status": "pass",
|
|
189
195
|
"message": (
|
|
190
196
|
f"PyTorch {torch_info['version']} detected "
|
|
191
|
-
f"(CUDA available —
|
|
197
|
+
f"(CUDA available — architecture checked below)"
|
|
192
198
|
)
|
|
193
199
|
})
|
|
194
200
|
else:
|
|
@@ -304,4 +310,4 @@ def check_accelerate(config_path=None, torch_info=None):
|
|
|
304
310
|
"fix": "Check your Accelerate config file is valid YAML"
|
|
305
311
|
})
|
|
306
312
|
|
|
307
|
-
return results
|
|
313
|
+
return results
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: computefence
|
|
3
|
-
Version: 0.3.
|
|
3
|
+
Version: 0.3.4.1
|
|
4
4
|
Summary: Don't lose another RunPod checkpoint to ephemeral disk before your job bills.
|
|
5
5
|
License-Expression: MIT
|
|
6
6
|
Keywords: runpod,vast.ai,gpu training,hf_home,cuda,preflight,machine learning,mlops,checkpoint
|
|
@@ -16,6 +16,12 @@ Dynamic: license-file
|
|
|
16
16
|
|
|
17
17
|
[](https://github.com/Francisco-Booth/computefence-action)
|
|
18
18
|
|
|
19
|
+
## Sponsor
|
|
20
|
+
|
|
21
|
+
If ComputeFence saves you a failed run, consider sponsoring: [github.com/sponsors/Francisco-Booth](https://github.com/sponsors/Francisco-Booth)
|
|
22
|
+
|
|
23
|
+
**$99 design partner spot** — priority fixes, monthly call, refunded if it finds nothing on your first job. [Apply via Stripe](https://buy.stripe.com/7sY00ib6IcTc1PD6PdaEE05)
|
|
24
|
+
|
|
19
25
|
# ComputeFence
|
|
20
26
|
|
|
21
27
|
**Stop paying for silent failures.**
|
|
@@ -40,18 +46,17 @@ uvx computefence doctor
|
|
|
40
46
|
|
|
41
47
|
---
|
|
42
48
|
|
|
43
|
-
|
|
44
49
|
## ☁️ RunPod One-Click Template
|
|
45
50
|
|
|
46
|
-
If you train on RunPod, use the pre-built community template — ComputeFence
|
|
51
|
+
If you train on RunPod, use the pre-built community template — ComputeFence runs automatically on pod start.
|
|
47
52
|
|
|
48
53
|
**[→ Launch ComputeFence Pre-Flight Template](https://runpod.io/console/deploy?template=cq5psqzck6)**
|
|
49
54
|
|
|
50
55
|
- Runs `computefence doctor` on every pod start
|
|
51
|
-
- Logs preflight output to `/workspace/computefence-preflight.log`
|
|
52
56
|
- `HF_HOME` set to `/workspace/.cache/huggingface` by default
|
|
53
57
|
- Persistent `/workspace` volume included
|
|
54
58
|
|
|
59
|
+
---
|
|
55
60
|
|
|
56
61
|
## Usage
|
|
57
62
|
|
|
@@ -71,14 +76,52 @@ With checkpoint directory validation:
|
|
|
71
76
|
computefence doctor --output-dir ./checkpoints
|
|
72
77
|
```
|
|
73
78
|
|
|
79
|
+
Skip specific checks by ID:
|
|
80
|
+
|
|
81
|
+
```bash
|
|
82
|
+
computefence doctor --skip accelerate_config,persistent_volume
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
JSON output for scripting:
|
|
86
|
+
|
|
87
|
+
```bash
|
|
88
|
+
computefence doctor --json
|
|
89
|
+
```
|
|
90
|
+
|
|
74
91
|
Add to your pod startup script so it runs automatically before every job:
|
|
75
92
|
|
|
76
93
|
```bash
|
|
77
|
-
pip install computefence && computefence doctor && python train.py
|
|
94
|
+
pip install computefence==0.3.3 && computefence doctor && python train.py
|
|
78
95
|
```
|
|
79
96
|
|
|
80
97
|
---
|
|
81
98
|
|
|
99
|
+
## Exit codes
|
|
100
|
+
|
|
101
|
+
| Code | Meaning |
|
|
102
|
+
|---|---|
|
|
103
|
+
| 0 | All checks passed |
|
|
104
|
+
| 1 | Warnings — review before launching |
|
|
105
|
+
| 2 | Blockers — fix before launching |
|
|
106
|
+
| 64 | Usage error (unknown command) |
|
|
107
|
+
|
|
108
|
+
---
|
|
109
|
+
|
|
110
|
+
## What It Checks / What It Doesn't
|
|
111
|
+
|
|
112
|
+
| Checks | Does not check |
|
|
113
|
+
|---|---|
|
|
114
|
+
| PyTorch can see the GPU (silent CPU fallback) | Training script correctness |
|
|
115
|
+
| GPU architecture compatible with PyTorch build | Model architecture compatibility |
|
|
116
|
+
| HuggingFace cache on persistent storage | Learning rate or hyperparameters |
|
|
117
|
+
| Accelerate GPU count matches instance | Runtime behaviour during the job |
|
|
118
|
+
| Disk space headroom (warn <20 GB, block <5 GB) | GPU utilisation or dataloader throughput |
|
|
119
|
+
| Checkpoint output dir on persistent storage | Mid-run pod failures |
|
|
120
|
+
| Dataset duplicates, missing values, label conflicts | Export-stage OOM |
|
|
121
|
+
| Environment drift between pods | Merge integrity |
|
|
122
|
+
|
|
123
|
+
---
|
|
124
|
+
|
|
82
125
|
## Drift Detection
|
|
83
126
|
|
|
84
127
|
Save a fingerprint of your working environment after a clean run:
|
|
@@ -93,7 +136,7 @@ On your next pod, check whether anything has changed:
|
|
|
93
136
|
computefence doctor --check-drift
|
|
94
137
|
```
|
|
95
138
|
|
|
96
|
-
Example output
|
|
139
|
+
Example drift output:
|
|
97
140
|
|
|
98
141
|
Drift
|
|
99
142
|
⚠ [Drift] PyTorch version changed: 2.4.0+cu121 → 2.8.0+cu128
|
|
@@ -104,19 +147,19 @@ Fix: Ensure your pod template uses the same CUDA base image.
|
|
|
104
147
|
Fix: Check your pod configuration matches the saved environment.
|
|
105
148
|
|
|
106
149
|
|
|
107
|
-
Drift findings are warnings only — they never block a launch. The fingerprint is written to `.computefence-lock.json` on your persistent volume (`/workspace` or `--path` to override).
|
|
150
|
+
Drift findings are warnings only — they never block a launch. The fingerprint is written to `.computefence-lock.json` on your persistent volume (`/workspace` or `--path` to override).
|
|
108
151
|
|
|
109
152
|
---
|
|
110
153
|
|
|
111
154
|
## Example Output
|
|
112
155
|
|
|
113
|
-
ComputeFence v0.
|
|
156
|
+
ComputeFence v0.3.3 — Pre-flight diagnostic
|
|
114
157
|
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
115
158
|
2 WARNINGS · 0 BLOCKERS · 6 PASSED
|
|
116
159
|
|
|
117
160
|
Environment
|
|
118
|
-
✓ Python 3.
|
|
119
|
-
✓ PyTorch 2.
|
|
161
|
+
✓ Python 3.11.0
|
|
162
|
+
✓ PyTorch 2.4.1+cu124 detected (CUDA available — NVIDIA A40)
|
|
120
163
|
⚠ No Accelerate config found — skipping GPU count check
|
|
121
164
|
Fix: Run ‘accelerate config’ to create a configuration file
|
|
122
165
|
|
|
@@ -132,57 +175,28 @@ Fix: Run with --dataset path/to/your/dataset.csv to enable dataset checks
|
|
|
132
175
|
|
|
133
176
|
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
134
177
|
2 warning(s) found. Review before launching.
|
|
178
|
+
Pseudonymous run stats are not collected by default. To opt in: touch ~/.computefence_telemetry
|
|
135
179
|
|
|
136
|
-
Anonymous run stats are collected to improve ComputeFence.
|
|
137
|
-
To opt out: touch ~/.computefence_no_telemetry
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
---
|
|
141
|
-
|
|
142
|
-
## What It Checks
|
|
143
|
-
|
|
144
|
-
**CUDA and GPU visibility**
|
|
145
|
-
Confirms PyTorch can see the GPU. Catches silent CPU fallback before it runs for eight hours at 24 seconds per iteration instead of 0.4.
|
|
146
|
-
|
|
147
|
-
**HuggingFace cache path**
|
|
148
|
-
Confirms model weights are writing to persistent storage. If HF_HOME points to ephemeral disk your weights disappear when the pod stops.
|
|
149
|
-
|
|
150
|
-
**Accelerate GPU count**
|
|
151
|
-
Confirms your distributed training config matches the GPUs actually on the instance. A mismatch leaves GPUs idle for the entire run with no error message.
|
|
152
|
-
|
|
153
|
-
**Disk space headroom**
|
|
154
|
-
Checks free space on workspace volumes and root disk. Warns below 20 GB. Blocks below 5 GB. Catches the failure where checkpoints stop saving at 90 percent completion because the disk filled.
|
|
155
|
-
|
|
156
|
-
**Checkpoint output directory**
|
|
157
|
-
Confirms your training script's output path is on persistent storage not ephemeral disk. HF_HOME and your checkpoint directory are separate paths — fixing one does not fix the other.
|
|
158
|
-
|
|
159
|
-
**Dataset integrity**
|
|
160
|
-
Optional scan for duplicates, missing values, and conflicting labels. Pass --dataset to enable.
|
|
161
|
-
|
|
162
|
-
**Environment drift detection**
|
|
163
|
-
Saves a 4-vector fingerprint (PyTorch/CUDA version, storage paths, GPU count and compute capability, critical library versions) and diffs it on the next pod. Catches silent environment changes between runs.
|
|
164
180
|
|
|
165
181
|
---
|
|
166
182
|
|
|
167
|
-
##
|
|
183
|
+
## Telemetry
|
|
168
184
|
|
|
169
|
-
-
|
|
170
|
-
- Model architecture compatibility
|
|
171
|
-
- Learning rate or hyperparameter safety
|
|
172
|
-
- Runtime behaviour during the job
|
|
173
|
-
- GPU utilisation or dataloader throughput during training
|
|
185
|
+
Opt-in pseudonymous run statistics. Nothing is sent by default.
|
|
174
186
|
|
|
175
|
-
|
|
187
|
+
To opt in:
|
|
176
188
|
|
|
177
|
-
|
|
189
|
+
```bash
|
|
190
|
+
touch ~/.computefence_telemetry
|
|
191
|
+
```
|
|
178
192
|
|
|
179
|
-
|
|
193
|
+
To opt out if previously opted in, or to honour `DO_NOT_TRACK`:
|
|
180
194
|
|
|
181
|
-
|
|
195
|
+
```bash
|
|
196
|
+
DO_NOT_TRACK=1 computefence doctor
|
|
197
|
+
```
|
|
182
198
|
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
Nothing existed that caught these before the job started. So I built it.
|
|
199
|
+
No personal data, no file paths, no model weights. Fields sent: version, Python version, platform, GPU count, check results.
|
|
186
200
|
|
|
187
201
|
---
|
|
188
202
|
|
|
@@ -192,31 +206,19 @@ Nothing existed that caught these before the job started. So I built it.
|
|
|
192
206
|
|
|
193
207
|
**Shahzeb Ali**, a computer vision engineer running client training jobs on RunPod, confirmed the storage warning matches real pod behaviour. He would not have caught the HF_HOME issue without the tool.
|
|
194
208
|
|
|
195
|
-
**An independent Vast.ai operator** ran computefence doctor six times overnight before a real training job without being prompted or paid to do so.
|
|
209
|
+
**An independent Vast.ai operator** ran `computefence doctor` six times overnight before a real training job without being prompted or paid to do so.
|
|
196
210
|
|
|
197
211
|
Thirteen independent ML engineers confirmed this problem across RunPod, Vast.ai, and AWS. Nine had lost checkpoints to ephemeral disk. Five confirmed Docker does not solve job-specific configuration mistakes.
|
|
198
212
|
|
|
199
213
|
---
|
|
200
214
|
|
|
201
|
-
##
|
|
202
|
-
|
|
203
|
-
A healthy GPU does not mean you are running the right job.
|
|
204
|
-
|
|
205
|
-
Docker makes environments reproducible. It does not check whether your HuggingFace cache is writing to ephemeral storage that disappears on pod stop, whether your Accelerate config matches the GPUs on the instance, or whether your checkpoint output directory is on persistent storage.
|
|
206
|
-
|
|
207
|
-
ComputeFence addresses the job configuration layer — not the environment layer.
|
|
208
|
-
|
|
209
|
-
HF_HOME and your checkpoint output directory are separate paths. Fixing one does not fix the other. Both disappear on pod restart if they point to ephemeral disk.
|
|
210
|
-
|
|
211
|
-
---
|
|
215
|
+
## Why This Exists
|
|
212
216
|
|
|
213
|
-
|
|
217
|
+
I burned approximately £1,000 on GPU training runs that failed silently.
|
|
214
218
|
|
|
215
|
-
|
|
219
|
+
CUDA fell back to CPU with no error message. 24 seconds per iteration instead of 0.4. Class weights caused loss to collapse to 0.693 immediately. My dataset had 28,432 duplicate rows and 312 conflicting labels I only found after the run finished.
|
|
216
220
|
|
|
217
|
-
|
|
218
|
-
touch ~/.computefence_no_telemetry
|
|
219
|
-
```
|
|
221
|
+
Nothing existed that caught these before the job started. So I built it.
|
|
220
222
|
|
|
221
223
|
---
|
|
222
224
|
|
|
@@ -228,7 +230,6 @@ Three founding design partner spots at $99 for three months:
|
|
|
228
230
|
|
|
229
231
|
- Personal audit of your launch templates and persistent storage configuration
|
|
230
232
|
- ComputeFence installed into your pod startup scripts — pre-flight runs automatically before every job
|
|
231
|
-
- Slack or Discord webhook alert when a check fails or blocks a launch
|
|
232
233
|
- Monthly 30-minute call where you shape what gets built next
|
|
233
234
|
- Money back if it does not catch one actionable issue in three months
|
|
234
235
|
|
|
@@ -236,6 +237,12 @@ Email francisco@booth.ws to apply.
|
|
|
236
237
|
|
|
237
238
|
---
|
|
238
239
|
|
|
240
|
+
## Acknowledgements
|
|
241
|
+
|
|
242
|
+
Thanks to **Steve Simo** for a thorough independent security and code review of v0.3.1.
|
|
243
|
+
|
|
244
|
+
---
|
|
245
|
+
|
|
239
246
|
## Links
|
|
240
247
|
|
|
241
248
|
- GitHub: https://github.com/Francisco-Booth/ComputeFence
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Tests for check_gpu_arch_compat — no real GPU or PyTorch required.
|
|
3
|
+
"""
|
|
4
|
+
import sys
|
|
5
|
+
import types
|
|
6
|
+
import unittest
|
|
7
|
+
import importlib.util
|
|
8
|
+
import pathlib
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
def make_torch_stub(arch_list, devices):
|
|
12
|
+
torch_mod = types.ModuleType("torch")
|
|
13
|
+
cuda_mod = types.ModuleType("torch.cuda")
|
|
14
|
+
cuda_mod.get_arch_list = lambda: arch_list
|
|
15
|
+
cuda_mod.get_device_capability = lambda i: devices[i][1]
|
|
16
|
+
cuda_mod.is_available = lambda: True
|
|
17
|
+
cuda_mod.device_count = lambda: len(devices)
|
|
18
|
+
cuda_mod.get_device_name = lambda i: devices[i][0]
|
|
19
|
+
torch_mod.cuda = cuda_mod
|
|
20
|
+
sys.modules["torch"] = torch_mod
|
|
21
|
+
sys.modules["torch.cuda"] = cuda_mod
|
|
22
|
+
return torch_mod
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
def make_torch_info(devices):
|
|
26
|
+
return {
|
|
27
|
+
"cuda_available": True,
|
|
28
|
+
"device_count": len(devices),
|
|
29
|
+
"device_names": [d[0] for d in devices],
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
def load_check_fn():
|
|
34
|
+
path = pathlib.Path(__file__).parent.parent / "computefence" / "checks" / "environment.py"
|
|
35
|
+
spec = importlib.util.spec_from_file_location("environment", path)
|
|
36
|
+
mod = importlib.util.module_from_spec(spec)
|
|
37
|
+
spec.loader.exec_module(mod)
|
|
38
|
+
return mod.check_gpu_arch_compat
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
# cu124 arch list — PyTorch 2.4.1+cu124 (sm_89 in, sm_120 NOT in)
|
|
42
|
+
CU124 = ["sm_50", "sm_60", "sm_70", "sm_75", "sm_80", "sm_86", "sm_89", "sm_90", "sm_90a"]
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
class TestArchCompat(unittest.TestCase):
|
|
46
|
+
|
|
47
|
+
def run_check(self, arch_list, devices):
|
|
48
|
+
make_torch_stub(arch_list, devices)
|
|
49
|
+
fn = load_check_fn()
|
|
50
|
+
return fn(make_torch_info(devices))
|
|
51
|
+
|
|
52
|
+
def test_rtx4090_sm89_cu124_passes(self):
|
|
53
|
+
"""RTX 4090 (sm_89) must PASS on cu124 — was false-blocking before fix."""
|
|
54
|
+
r = self.run_check(CU124, [("NVIDIA GeForce RTX 4090", (8, 9))])
|
|
55
|
+
self.assertEqual(r[0]["status"], "pass", r[0]["message"])
|
|
56
|
+
|
|
57
|
+
def test_l40s_sm89_cu124_passes(self):
|
|
58
|
+
"""L40S (sm_89) must PASS on cu124 — Bo Shen's card."""
|
|
59
|
+
r = self.run_check(CU124, [("NVIDIA L40S", (8, 9))])
|
|
60
|
+
self.assertEqual(r[0]["status"], "pass", r[0]["message"])
|
|
61
|
+
|
|
62
|
+
def test_blackwell_sm120_not_in_cu124_blocks(self):
|
|
63
|
+
"""Blackwell (sm_120) must BLOCK on cu124 — sm_120 absent from list."""
|
|
64
|
+
r = self.run_check(CU124, [("NVIDIA RTX PRO 4000 Blackwell", (12, 0))])
|
|
65
|
+
self.assertEqual(r[0]["status"], "fail", r[0]["message"])
|
|
66
|
+
self.assertIn("supported by this build:", r[0]["message"])
|
|
67
|
+
|
|
68
|
+
def test_a40_sm86_passes(self):
|
|
69
|
+
"""A40 (sm_86) sanity check — must still pass."""
|
|
70
|
+
r = self.run_check(CU124, [("NVIDIA A40", (8, 6))])
|
|
71
|
+
self.assertEqual(r[0]["status"], "pass", r[0]["message"])
|
|
72
|
+
|
|
73
|
+
def test_unknown_future_gpu_blocks(self):
|
|
74
|
+
"""A GPU not in the list must block."""
|
|
75
|
+
r = self.run_check(CU124, [("NVIDIA Future GPU", (13, 0))])
|
|
76
|
+
self.assertEqual(r[0]["status"], "fail")
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
if __name__ == "__main__":
|
|
80
|
+
unittest.main(verbosity=2)
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__version__ = "0.3.3"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|