GeoIntel release gates / Compile, test, contracts and builds (push) Successful in 1m49s
GeoIntel release gates / Python and npm vulnerability policy (push) Successful in 21s
GeoIntel release gates / Production AI image, SBOM and container scan (push) Successful in 5m39s
GeoIntel release gates / Deploy exact gated revision to Unraid (push) Failing after 58m43s
30 lines
739 B
Python
30 lines
739 B
Python
from __future__ import annotations
|
|
|
|
import subprocess
|
|
import sys
|
|
from pathlib import Path
|
|
|
|
|
|
ROOT = Path(__file__).resolve().parents[2]
|
|
|
|
|
|
def test_publication_hygiene_gate_passes_for_tracked_tree() -> None:
|
|
result = subprocess.run(
|
|
[sys.executable, str(ROOT / "scripts" / "check_repository_hygiene.py")],
|
|
cwd=ROOT,
|
|
check=False,
|
|
capture_output=True,
|
|
text=True,
|
|
)
|
|
|
|
assert result.returncode == 0, result.stderr
|
|
|
|
|
|
def test_checkpoint_inspector_uses_weights_only_deserialization() -> None:
|
|
inspector = (ROOT / "scripts" / "inspect_torch_checkpoint.py").read_text(
|
|
encoding="utf-8"
|
|
)
|
|
|
|
assert "weights_only=True" in inspector
|
|
assert "weights_only=False" not in inspector
|