computefence 0.2.13__tar.gz → 0.2.15__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.
Files changed (20) hide show
  1. {computefence-0.2.13 → computefence-0.2.15}/PKG-INFO +58 -17
  2. {computefence-0.2.13 → computefence-0.2.15}/README.md +57 -16
  3. computefence-0.2.15/computefence/__init__.py +1 -0
  4. {computefence-0.2.13 → computefence-0.2.15}/computefence/telemetry.py +15 -18
  5. {computefence-0.2.13 → computefence-0.2.15}/computefence.egg-info/PKG-INFO +58 -17
  6. computefence-0.2.13/computefence/__init__.py +0 -1
  7. {computefence-0.2.13 → computefence-0.2.15}/LICENSE +0 -0
  8. {computefence-0.2.13 → computefence-0.2.15}/computefence/checks/__init__.py +0 -0
  9. {computefence-0.2.13 → computefence-0.2.15}/computefence/checks/dataset.py +0 -0
  10. {computefence-0.2.13 → computefence-0.2.15}/computefence/checks/environment.py +0 -0
  11. {computefence-0.2.13 → computefence-0.2.15}/computefence/checks/storage.py +0 -0
  12. {computefence-0.2.13 → computefence-0.2.15}/computefence/cli.py +0 -0
  13. {computefence-0.2.13 → computefence-0.2.15}/computefence/drift.py +0 -0
  14. {computefence-0.2.13 → computefence-0.2.15}/computefence.egg-info/SOURCES.txt +0 -0
  15. {computefence-0.2.13 → computefence-0.2.15}/computefence.egg-info/dependency_links.txt +0 -0
  16. {computefence-0.2.13 → computefence-0.2.15}/computefence.egg-info/entry_points.txt +0 -0
  17. {computefence-0.2.13 → computefence-0.2.15}/computefence.egg-info/requires.txt +0 -0
  18. {computefence-0.2.13 → computefence-0.2.15}/computefence.egg-info/top_level.txt +0 -0
  19. {computefence-0.2.13 → computefence-0.2.15}/pyproject.toml +0 -0
  20. {computefence-0.2.13 → computefence-0.2.15}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: computefence
3
- Version: 0.2.13
3
+ Version: 0.2.15
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
@@ -17,9 +17,9 @@ Dynamic: license-file
17
17
 
18
18
  # ComputeFence
19
19
 
20
- **Don't lose another RunPod checkpoint to ephemeral disk before your job bills.**
20
+ **Stop paying for silent failures.**
21
21
 
22
- One command before your training job starts. Catches the configuration mistakes that cost you hours of GPU compute and lost weights before billing begins.
22
+ One command before your training job starts. Catches the configuration mistakes that cost you hours of GPU compute and lost checkpoints — before billing begins.
23
23
 
24
24
  Built for RunPod, Vast.ai, Lambda Labs, CoreWeave, Paperspace, and any bare metal GPU provider.
25
25
 
@@ -65,35 +65,63 @@ pip install computefence && computefence doctor && python train.py
65
65
 
66
66
  ---
67
67
 
68
- ## Example Output
68
+ ## Drift Detection
69
+
70
+ Save a fingerprint of your working environment after a clean run:
69
71
 
72
+ ```bash
73
+ computefence doctor --save-env
74
+ ```
75
+
76
+ On your next pod, check whether anything has changed:
77
+
78
+ ```bash
79
+ computefence doctor --check-drift
70
80
  ```
71
- ComputeFence v0.2.9 — Pre-flight diagnostic
81
+
82
+ Example output when the pod environment has drifted:
83
+
84
+ Drift
85
+ ⚠ [Drift] PyTorch version changed: 2.4.0+cu121 → 2.8.0+cu128
86
+ Fix: Pin torch version in your requirements or Dockerfile.
87
+ ⚠ [Drift] CUDA version changed: 12.1 → 12.8
88
+ Fix: Ensure your pod template uses the same CUDA base image.
89
+ ⚠ [Drift] GPU count changed: 2 → 1
90
+ Fix: Check your pod configuration matches the saved environment.
91
+
92
+
93
+ 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). It survives pod stop and restart.
94
+
95
+ ---
96
+
97
+ ## Example Output
98
+
99
+ ComputeFence v0.2.14 — Pre-flight diagnostic
72
100
  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
73
- 2 WARNINGS · 0 BLOCKERS · 3 PASSED
101
+ 2 WARNINGS · 0 BLOCKERS · 6 PASSED
74
102
 
75
103
  Environment
76
- ✓ Python 3.11.4
77
- ✓ PyTorch 2.1.0 detected
78
- ✓ CUDA available — NVIDIA A40
104
+ ✓ Python 3.12.3
105
+ ✓ PyTorch 2.8.0+cu128 detected (CUDA available — NVIDIA RTX PRO 4500)
106
+ ⚠ No Accelerate config found — skipping GPU count check
107
+ Fix: Run ‘accelerate config’ to create a configuration file
79
108
 
80
109
  Storage
81
- ⚠ HF_HOME is not set. HuggingFace will cache to ephemeral local disk.
82
- Fix: export HF_HOME=/workspace/.cache/huggingface
83
-
84
- ⚠ Root disk (/) — 14.3 GB free of 460.4 GB (below 20 GB threshold)
85
- Fix: Free up disk space or move checkpoints to a larger volume
86
- df -h to check usage
110
+ ✓ HF_HOME is set to /workspace/.cache/huggingface/
111
+ ✓ Persistent volume(s) detected: /workspace
112
+ ✓ Volume /workspace — 49.9 GB free of 50.0 GB
113
+ ✓ Root disk (/) — 49.9 GB free of 50.0 GB
87
114
 
88
115
  Dataset
89
- ✓ No dataset path provided — skipping dataset checks
116
+ ⚠ No dataset path provided — skipping dataset checks
117
+ Fix: Run with --dataset path/to/your/dataset.csv to enable dataset checks
90
118
 
91
119
  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
92
120
  2 warning(s) found. Review before launching.
93
121
 
94
122
  Anonymous run stats are collected to improve ComputeFence.
95
123
  To opt out: touch ~/.computefence_no_telemetry
96
- ```
124
+
97
125
 
98
126
  ---
99
127
 
@@ -117,6 +145,9 @@ Confirms your training script's output path is on persistent storage not ephemer
117
145
  **Dataset integrity**
118
146
  Optional scan for duplicates, missing values, and conflicting labels. Pass --dataset to enable.
119
147
 
148
+ **Environment drift detection**
149
+ 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.
150
+
120
151
  ---
121
152
 
122
153
  ## What It Does Not Check
@@ -165,6 +196,16 @@ HF_HOME and your checkpoint output directory are separate paths. Fixing one does
165
196
 
166
197
  ---
167
198
 
199
+ ## Telemetry
200
+
201
+ Anonymous run statistics are collected on every run to help improve ComputeFence. No personal data, no code, no model weights. To opt out:
202
+
203
+ ```bash
204
+ touch ~/.computefence_no_telemetry
205
+ ```
206
+
207
+ ---
208
+
168
209
  ## Founding Design Partner Pilot
169
210
 
170
211
  Running high-cost GPU training jobs on RunPod or Vast.ai?
@@ -2,9 +2,9 @@
2
2
 
3
3
  # ComputeFence
4
4
 
5
- **Don't lose another RunPod checkpoint to ephemeral disk before your job bills.**
5
+ **Stop paying for silent failures.**
6
6
 
7
- One command before your training job starts. Catches the configuration mistakes that cost you hours of GPU compute and lost weights before billing begins.
7
+ One command before your training job starts. Catches the configuration mistakes that cost you hours of GPU compute and lost checkpoints — before billing begins.
8
8
 
9
9
  Built for RunPod, Vast.ai, Lambda Labs, CoreWeave, Paperspace, and any bare metal GPU provider.
10
10
 
@@ -50,35 +50,63 @@ pip install computefence && computefence doctor && python train.py
50
50
 
51
51
  ---
52
52
 
53
- ## Example Output
53
+ ## Drift Detection
54
+
55
+ Save a fingerprint of your working environment after a clean run:
54
56
 
57
+ ```bash
58
+ computefence doctor --save-env
59
+ ```
60
+
61
+ On your next pod, check whether anything has changed:
62
+
63
+ ```bash
64
+ computefence doctor --check-drift
55
65
  ```
56
- ComputeFence v0.2.9 — Pre-flight diagnostic
66
+
67
+ Example output when the pod environment has drifted:
68
+
69
+ Drift
70
+ ⚠ [Drift] PyTorch version changed: 2.4.0+cu121 → 2.8.0+cu128
71
+ Fix: Pin torch version in your requirements or Dockerfile.
72
+ ⚠ [Drift] CUDA version changed: 12.1 → 12.8
73
+ Fix: Ensure your pod template uses the same CUDA base image.
74
+ ⚠ [Drift] GPU count changed: 2 → 1
75
+ Fix: Check your pod configuration matches the saved environment.
76
+
77
+
78
+ 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). It survives pod stop and restart.
79
+
80
+ ---
81
+
82
+ ## Example Output
83
+
84
+ ComputeFence v0.2.14 — Pre-flight diagnostic
57
85
  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
58
- 2 WARNINGS · 0 BLOCKERS · 3 PASSED
86
+ 2 WARNINGS · 0 BLOCKERS · 6 PASSED
59
87
 
60
88
  Environment
61
- ✓ Python 3.11.4
62
- ✓ PyTorch 2.1.0 detected
63
- ✓ CUDA available — NVIDIA A40
89
+ ✓ Python 3.12.3
90
+ ✓ PyTorch 2.8.0+cu128 detected (CUDA available — NVIDIA RTX PRO 4500)
91
+ ⚠ No Accelerate config found — skipping GPU count check
92
+ Fix: Run ‘accelerate config’ to create a configuration file
64
93
 
65
94
  Storage
66
- ⚠ HF_HOME is not set. HuggingFace will cache to ephemeral local disk.
67
- Fix: export HF_HOME=/workspace/.cache/huggingface
68
-
69
- ⚠ Root disk (/) — 14.3 GB free of 460.4 GB (below 20 GB threshold)
70
- Fix: Free up disk space or move checkpoints to a larger volume
71
- df -h to check usage
95
+ ✓ HF_HOME is set to /workspace/.cache/huggingface/
96
+ ✓ Persistent volume(s) detected: /workspace
97
+ ✓ Volume /workspace — 49.9 GB free of 50.0 GB
98
+ ✓ Root disk (/) — 49.9 GB free of 50.0 GB
72
99
 
73
100
  Dataset
74
- ✓ No dataset path provided — skipping dataset checks
101
+ ⚠ No dataset path provided — skipping dataset checks
102
+ Fix: Run with --dataset path/to/your/dataset.csv to enable dataset checks
75
103
 
76
104
  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
77
105
  2 warning(s) found. Review before launching.
78
106
 
79
107
  Anonymous run stats are collected to improve ComputeFence.
80
108
  To opt out: touch ~/.computefence_no_telemetry
81
- ```
109
+
82
110
 
83
111
  ---
84
112
 
@@ -102,6 +130,9 @@ Confirms your training script's output path is on persistent storage not ephemer
102
130
  **Dataset integrity**
103
131
  Optional scan for duplicates, missing values, and conflicting labels. Pass --dataset to enable.
104
132
 
133
+ **Environment drift detection**
134
+ 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.
135
+
105
136
  ---
106
137
 
107
138
  ## What It Does Not Check
@@ -150,6 +181,16 @@ HF_HOME and your checkpoint output directory are separate paths. Fixing one does
150
181
 
151
182
  ---
152
183
 
184
+ ## Telemetry
185
+
186
+ Anonymous run statistics are collected on every run to help improve ComputeFence. No personal data, no code, no model weights. To opt out:
187
+
188
+ ```bash
189
+ touch ~/.computefence_no_telemetry
190
+ ```
191
+
192
+ ---
193
+
153
194
  ## Founding Design Partner Pilot
154
195
 
155
196
  Running high-cost GPU training jobs on RunPod or Vast.ai?
@@ -0,0 +1 @@
1
+ __version__ = "0.2.15"
@@ -12,24 +12,25 @@ SUPABASE_ANON_KEY = "sb_publishable_A2zwbfTFiOs63jz8313GXg_elw3F5dy"
12
12
  TABLE = "computefence_runs"
13
13
  OPT_OUT_FILE = Path.home() / ".computefence_no_telemetry"
14
14
 
15
-
16
15
  def _is_opted_out():
17
16
  return OPT_OUT_FILE.exists()
18
17
 
19
-
20
18
  def get_project_id() -> str:
21
- # Primary: git remote URL hash — survives pod recreation
19
+ # Primary: persistent home directory token — not linked to any repo
20
+ home_token_path = Path.home() / ".computefence" / "id"
22
21
  try:
23
- git_url = subprocess.check_output(
24
- ["git", "config", "--get", "remote.origin.url"],
25
- stderr=subprocess.DEVNULL
26
- ).decode().strip()
27
- if git_url:
28
- return hashlib.sha256(git_url.encode()).hexdigest()[:16]
22
+ if home_token_path.exists():
23
+ token = home_token_path.read_text().strip()
24
+ if token:
25
+ return token
26
+ home_token_path.parent.mkdir(parents=True, exist_ok=True)
27
+ new_token = str(uuid.uuid4())
28
+ home_token_path.write_text(new_token)
29
+ return new_token
29
30
  except Exception:
30
31
  pass
31
32
 
32
- # Fallback: persistent volume token
33
+ # Fallback: persistent volume token at /workspace
33
34
  token_path = "/workspace/.computefence_id"
34
35
  try:
35
36
  if os.path.exists(token_path):
@@ -37,13 +38,16 @@ def get_project_id() -> str:
37
38
  token = f.read().strip()
38
39
  if token:
39
40
  return token
41
+ new_token = str(uuid.uuid4())
42
+ with open(token_path, "w") as f:
43
+ f.write(new_token)
44
+ return new_token
40
45
  except Exception:
41
46
  pass
42
47
 
43
48
  # Last resort: ephemeral cwd hash
44
49
  return "ephemeral-" + hashlib.sha256(os.getcwd().encode()).hexdigest()[:8]
45
50
 
46
-
47
51
  def get_execution_mode() -> str:
48
52
  if os.environ.get("GITHUB_ACTIONS"):
49
53
  return "github-action"
@@ -67,7 +71,6 @@ def get_execution_mode() -> str:
67
71
  pass
68
72
  return "manual"
69
73
 
70
-
71
74
  def _send(payload: dict):
72
75
  try:
73
76
  import requests
@@ -85,17 +88,14 @@ def _send(payload: dict):
85
88
  except Exception:
86
89
  pass
87
90
 
88
-
89
91
  def record_run(results: list):
90
92
  if _is_opted_out():
91
93
  return
92
94
  if os.environ.get("COMPUTEFENCE_DEV"):
93
95
  return
94
-
95
96
  warning_count = sum(1 for r in results if r.get("status") == "warn")
96
97
  blocker_count = sum(1 for r in results if r.get("status") == "fail")
97
98
  pass_count = sum(1 for r in results if r.get("status") == "pass")
98
-
99
99
  try:
100
100
  import torch
101
101
  gpu_count = torch.cuda.device_count()
@@ -108,9 +108,7 @@ def record_run(results: list):
108
108
  gpu_count = len(result.stdout.strip().splitlines()) if result.returncode == 0 else 0
109
109
  except Exception:
110
110
  gpu_count = 0
111
-
112
111
  from computefence import __version__
113
-
114
112
  payload = {
115
113
  "version": __version__,
116
114
  "python_version": f"{sys.version_info.major}.{sys.version_info.minor}",
@@ -124,7 +122,6 @@ def record_run(results: list):
124
122
  "run_id": str(uuid.uuid4()),
125
123
  "execution_mode": get_execution_mode(),
126
124
  }
127
-
128
125
  thread = threading.Thread(target=_send, args=(payload,), daemon=True)
129
126
  thread.start()
130
127
  thread.join(timeout=4)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: computefence
3
- Version: 0.2.13
3
+ Version: 0.2.15
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
@@ -17,9 +17,9 @@ Dynamic: license-file
17
17
 
18
18
  # ComputeFence
19
19
 
20
- **Don't lose another RunPod checkpoint to ephemeral disk before your job bills.**
20
+ **Stop paying for silent failures.**
21
21
 
22
- One command before your training job starts. Catches the configuration mistakes that cost you hours of GPU compute and lost weights before billing begins.
22
+ One command before your training job starts. Catches the configuration mistakes that cost you hours of GPU compute and lost checkpoints — before billing begins.
23
23
 
24
24
  Built for RunPod, Vast.ai, Lambda Labs, CoreWeave, Paperspace, and any bare metal GPU provider.
25
25
 
@@ -65,35 +65,63 @@ pip install computefence && computefence doctor && python train.py
65
65
 
66
66
  ---
67
67
 
68
- ## Example Output
68
+ ## Drift Detection
69
+
70
+ Save a fingerprint of your working environment after a clean run:
69
71
 
72
+ ```bash
73
+ computefence doctor --save-env
74
+ ```
75
+
76
+ On your next pod, check whether anything has changed:
77
+
78
+ ```bash
79
+ computefence doctor --check-drift
70
80
  ```
71
- ComputeFence v0.2.9 — Pre-flight diagnostic
81
+
82
+ Example output when the pod environment has drifted:
83
+
84
+ Drift
85
+ ⚠ [Drift] PyTorch version changed: 2.4.0+cu121 → 2.8.0+cu128
86
+ Fix: Pin torch version in your requirements or Dockerfile.
87
+ ⚠ [Drift] CUDA version changed: 12.1 → 12.8
88
+ Fix: Ensure your pod template uses the same CUDA base image.
89
+ ⚠ [Drift] GPU count changed: 2 → 1
90
+ Fix: Check your pod configuration matches the saved environment.
91
+
92
+
93
+ 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). It survives pod stop and restart.
94
+
95
+ ---
96
+
97
+ ## Example Output
98
+
99
+ ComputeFence v0.2.14 — Pre-flight diagnostic
72
100
  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
73
- 2 WARNINGS · 0 BLOCKERS · 3 PASSED
101
+ 2 WARNINGS · 0 BLOCKERS · 6 PASSED
74
102
 
75
103
  Environment
76
- ✓ Python 3.11.4
77
- ✓ PyTorch 2.1.0 detected
78
- ✓ CUDA available — NVIDIA A40
104
+ ✓ Python 3.12.3
105
+ ✓ PyTorch 2.8.0+cu128 detected (CUDA available — NVIDIA RTX PRO 4500)
106
+ ⚠ No Accelerate config found — skipping GPU count check
107
+ Fix: Run ‘accelerate config’ to create a configuration file
79
108
 
80
109
  Storage
81
- ⚠ HF_HOME is not set. HuggingFace will cache to ephemeral local disk.
82
- Fix: export HF_HOME=/workspace/.cache/huggingface
83
-
84
- ⚠ Root disk (/) — 14.3 GB free of 460.4 GB (below 20 GB threshold)
85
- Fix: Free up disk space or move checkpoints to a larger volume
86
- df -h to check usage
110
+ ✓ HF_HOME is set to /workspace/.cache/huggingface/
111
+ ✓ Persistent volume(s) detected: /workspace
112
+ ✓ Volume /workspace — 49.9 GB free of 50.0 GB
113
+ ✓ Root disk (/) — 49.9 GB free of 50.0 GB
87
114
 
88
115
  Dataset
89
- ✓ No dataset path provided — skipping dataset checks
116
+ ⚠ No dataset path provided — skipping dataset checks
117
+ Fix: Run with --dataset path/to/your/dataset.csv to enable dataset checks
90
118
 
91
119
  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
92
120
  2 warning(s) found. Review before launching.
93
121
 
94
122
  Anonymous run stats are collected to improve ComputeFence.
95
123
  To opt out: touch ~/.computefence_no_telemetry
96
- ```
124
+
97
125
 
98
126
  ---
99
127
 
@@ -117,6 +145,9 @@ Confirms your training script's output path is on persistent storage not ephemer
117
145
  **Dataset integrity**
118
146
  Optional scan for duplicates, missing values, and conflicting labels. Pass --dataset to enable.
119
147
 
148
+ **Environment drift detection**
149
+ 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.
150
+
120
151
  ---
121
152
 
122
153
  ## What It Does Not Check
@@ -165,6 +196,16 @@ HF_HOME and your checkpoint output directory are separate paths. Fixing one does
165
196
 
166
197
  ---
167
198
 
199
+ ## Telemetry
200
+
201
+ Anonymous run statistics are collected on every run to help improve ComputeFence. No personal data, no code, no model weights. To opt out:
202
+
203
+ ```bash
204
+ touch ~/.computefence_no_telemetry
205
+ ```
206
+
207
+ ---
208
+
168
209
  ## Founding Design Partner Pilot
169
210
 
170
211
  Running high-cost GPU training jobs on RunPod or Vast.ai?
@@ -1 +0,0 @@
1
- __version__ = "0.2.13"
File without changes
File without changes