Spaces:
Running on Zero
Running on Zero
Temporarily diagnose fixed GPU smoke fixture
Browse files- RELEASE_MANIFEST.json +1 -1
- worker.py +13 -1
RELEASE_MANIFEST.json
CHANGED
|
@@ -67,7 +67,7 @@
|
|
| 67 |
"vendor/hf-oauth/LICENSE": "d6e7b19451c1b3d1d66353bb4b1274138953b3bfd9ae60c56e77b1f548796982",
|
| 68 |
"vendor/hf-oauth/index.js": "53282844000a171011e547f6472a3846bb4cecb5071adafea079fcac3a2aee7e",
|
| 69 |
"vendor/hf-oauth/package.json": "fafd4d8891023a1961546a7d3bc25cd24f64923a2ebfc449fe6d516a2949bda8",
|
| 70 |
-
"worker.py": "
|
| 71 |
},
|
| 72 |
"interface": "single-engine-runner-with-map",
|
| 73 |
"upstream_revision": "b90b8af06ffc4ea4e4fd703becd1107a48b8e5e0"
|
|
|
|
| 67 |
"vendor/hf-oauth/LICENSE": "d6e7b19451c1b3d1d66353bb4b1274138953b3bfd9ae60c56e77b1f548796982",
|
| 68 |
"vendor/hf-oauth/index.js": "53282844000a171011e547f6472a3846bb4cecb5071adafea079fcac3a2aee7e",
|
| 69 |
"vendor/hf-oauth/package.json": "fafd4d8891023a1961546a7d3bc25cd24f64923a2ebfc449fe6d516a2949bda8",
|
| 70 |
+
"worker.py": "4e3509ccd767a586b5c7e7c2d656edb0bb4705be37c05ed6381d655d1859b86b"
|
| 71 |
},
|
| 72 |
"interface": "single-engine-runner-with-map",
|
| 73 |
"upstream_revision": "b90b8af06ffc4ea4e4fd703becd1107a48b8e5e0"
|
worker.py
CHANGED
|
@@ -125,7 +125,19 @@ def run_native(track_bytes,network_bytes,*,binary=None,importer=None,scene_templ
|
|
| 125 |
'--eliminate-on-wall' if config['collision'] else '--no-eliminate-on-wall',
|
| 126 |
'--idle-eliminate' if config['idle'] else '--no-idle-eliminate']
|
| 127 |
if gpu_library is not None: command.append('--gpu')
|
| 128 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 129 |
candidate=out/'candidate.json'
|
| 130 |
if candidate.stat().st_size>1024*1024: raise ValueError('Output too large')
|
| 131 |
trained=json.loads(candidate.read_text())
|
|
|
|
| 125 |
'--eliminate-on-wall' if config['collision'] else '--no-eliminate-on-wall',
|
| 126 |
'--idle-eliminate' if config['idle'] else '--no-idle-eliminate']
|
| 127 |
if gpu_library is not None: command.append('--gpu')
|
| 128 |
+
if (gpu_library is not None
|
| 129 |
+
and hashlib.sha256(track_bytes).hexdigest() == 'ca5749537450430794e2eade2e0ac72fa141a4f225e13e2f8ef842abb948ff15'
|
| 130 |
+
and hashlib.sha256(network_bytes).hexdigest() == '832361ca786f176d3af8dcad91454a6df173a1d630ee420a2fe95810360734f5'):
|
| 131 |
+
# Temporary diagnostic for a fixed public fixture. Never capture user jobs.
|
| 132 |
+
diagnostic = subprocess.run(command,cwd=work,env=env,stdout=subprocess.PIPE,
|
| 133 |
+
stderr=subprocess.PIPE,timeout=25,check=False)
|
| 134 |
+
if diagnostic.returncode:
|
| 135 |
+
raise RuntimeError('Fixed GPU probe exit '+str(diagnostic.returncode)+
|
| 136 |
+
' stderr: '+diagnostic.stderr.decode('utf-8','replace')[-3000:]+
|
| 137 |
+
' stdout: '+diagnostic.stdout.decode('utf-8','replace')[-1000:])
|
| 138 |
+
else:
|
| 139 |
+
subprocess.run(command,cwd=work,env=env,stdout=subprocess.DEVNULL,
|
| 140 |
+
stderr=subprocess.DEVNULL,timeout=25,check=True)
|
| 141 |
candidate=out/'candidate.json'
|
| 142 |
if candidate.stat().st_size>1024*1024: raise ValueError('Output too large')
|
| 143 |
trained=json.loads(candidate.read_text())
|