noqt commited on
Commit
c771d04
·
1 Parent(s): a4f6f8c

Preserve pinned virtualenv interpreter path for smoke

Browse files
Files changed (1) hide show
  1. scripts/smoke_safetensors_ai.py +2 -3
scripts/smoke_safetensors_ai.py CHANGED
@@ -38,9 +38,8 @@ def load_assets(path: Path) -> tuple[Path, Path, Path, dict[str, Any]]:
38
  config = Path(value["model"]["config"])
39
  if any(item.is_symlink() or not item.is_file() for item in (model, config)):
40
  raise RuntimeError("Safetensors smoke assets are not regular files")
41
- if python.is_symlink():
42
- python = python.resolve()
43
- if python.is_symlink() or not python.is_file() or not os.access(python, os.X_OK):
44
  raise RuntimeError("Safetensors smoke interpreter is not executable")
45
  if digest(model) != value["model"]["sha256"] or digest(config) != value["model"]["config_sha256"]:
46
  raise RuntimeError("Safetensors smoke asset digest differs from manifest")
 
38
  config = Path(value["model"]["config"])
39
  if any(item.is_symlink() or not item.is_file() for item in (model, config)):
40
  raise RuntimeError("Safetensors smoke assets are not regular files")
41
+ interpreter = python.resolve() if python.is_symlink() else python
42
+ if interpreter.is_symlink() or not interpreter.is_file() or not os.access(interpreter, os.X_OK):
 
43
  raise RuntimeError("Safetensors smoke interpreter is not executable")
44
  if digest(model) != value["model"]["sha256"] or digest(config) != value["model"]["config_sha256"]:
45
  raise RuntimeError("Safetensors smoke asset digest differs from manifest")