mirror of
https://github.com/firestar5683/StarPilot.git
synced 2026-09-03 06:33:50 +08:00
eefc084302
version: sunnypilot v2025.003.000 (dev) date: 2025-12-18T05:48:43 master commit: 16c052af0835f049a67b80251d8cc1114fc08bb4
24 lines
759 B
Python
24 lines
759 B
Python
import requests
|
|
|
|
from openpilot.sunnypilot.models.tinygrad_ref import get_tinygrad_ref
|
|
from openpilot.sunnypilot.models.fetcher import ModelFetcher
|
|
|
|
|
|
def fetch_tinygrad_ref():
|
|
response = requests.get(ModelFetcher.MODEL_URL, timeout=10)
|
|
response.raise_for_status()
|
|
json_data = response.json()
|
|
return json_data.get("tinygrad_ref")
|
|
|
|
|
|
def test_tinygrad_ref():
|
|
current_ref = get_tinygrad_ref()
|
|
remote_ref = fetch_tinygrad_ref()
|
|
assert remote_ref == current_ref, (
|
|
f"""tinygrad_repo ref does not match remote tinygrad_ref of current compiled driving models json.
|
|
Current: {current_ref}
|
|
Remote: {remote_ref}
|
|
Please run build-all workflow to update models."""
|
|
)
|
|
print("tinygrad_repo ref matches current compiled driving models json ref.")
|