mirror of
https://github.com/sunnypilot/sunnypilot.git
synced 2026-09-15 00:03:45 +08:00
94a32493e3
* modeld_v2: Support eGpu * bump tg * egpu * no pkls please * god no onnx either * fix test * done in build model now * lint * rip * egpu ready build all split * manual seed , reuse memory buffers across runs * dont download big when we dont have big lol * whoops * no i and x * cd * who put those there. ?? * reduce flakiness by using artifact-name from build-model to regex, speed up pub b y checking the name before trying to clone and publish again * try hf as a trusted publisher :) * mf its a dataaset. i knew that * fucking validation wants raw to fetch and full to push. grr * smh * dude i am missing so much * pkl name * move build all to hf * tests: migrate sunnypilot tests to unittest and remove pytest * red diff mf * im scared , this may be a bad idea lol * fetch latest commit. * transition to requests * models: use requests instead of aiohttp * tici * fix * gpu fixes from upstream * lint * bump * needed to say * old * how?? * epgu flag reduce * this made me cry * support monolith still * precache warp in legacy * Move jsons to param for sunnylink --------- Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
27 lines
949 B
Python
27 lines
949 B
Python
import requests
|
|
|
|
from openpilot.common.params import Params
|
|
from openpilot.sunnypilot.models.tinygrad_ref import get_tinygrad_ref
|
|
from openpilot.sunnypilot.models.fetcher import ModelFetcher
|
|
from openpilot.common.test import OpenpilotTestCase
|
|
|
|
def fetch_tinygrad_ref():
|
|
fetcher = ModelFetcher(Params())
|
|
response = requests.get(fetcher.model_url, timeout=10)
|
|
response.raise_for_status()
|
|
json_data = response.json()
|
|
return json_data.get("tinygrad_ref")
|
|
|
|
|
|
class TestTinygradRef(OpenpilotTestCase):
|
|
def test_tinygrad_ref(self):
|
|
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.")
|