zzqsb's picture
Release the REE tasks and dataset card.
7f50cd1
Raw History Blame Contribute Delete
1.05 kB
"""Install the vendored pure/Python-3.12 Linux wheels without pip or network."""
from pathlib import Path
import hashlib
import json
import sys
import zipfile
here = Path(__file__).resolve().parent
target = here/'vendor/site-packages'
target.mkdir(parents=True, exist_ok=True)
manifest = json.loads((here/'vendor/wheel_sha256.json').read_text())
for name, expected in sorted(manifest.items()):
wheel = here/name
if hashlib.sha256(wheel.read_bytes()).hexdigest() != expected:
raise RuntimeError(f'Vendored wheel checksum mismatch: {wheel.name}')
with zipfile.ZipFile(wheel) as archive:
archive.extractall(target)
sys.path.insert(0, str(target))
import numpy as np
from descriptors import describe
# Compile/cache the same descriptor kernel used at runtime, without labels.
result = describe({'basis': [[4,0,0],[0,4,0],[0,0,4]],
'points': [[0.25,0.25,0.25]], 'kinds': ['t04']})
assert result.shape == (273,)
assert np.isfinite(result).all(), 'Descriptor warmup must not silently impute a build failure.'