modeld_v2: restore chestnut link check before big model build

This commit is contained in:
Jason Wen
2026-08-19 23:22:47 -04:00
parent 8103004baa
commit 0c2ef0bbdb
@@ -296,14 +296,14 @@ def _load_policy_runners(args: argparse.Namespace) -> tuple[list, list]:
if __name__ == "__main__":
# if 'USB' in os.getenv('DEV', '') or os.getenv('USBGPU'):
# from openpilot.system.hardware.chestnut.flash import link_up
# for _ in range(10):
# if link_up():
# break
# time.sleep(1)
# else:
# raise RuntimeError("Chestnut not ready, skipping big model build")
if 'USB' in os.getenv('DEV', '') or os.getenv('USBGPU'):
from openpilot.system.hardware.chestnut.flash import link_up
for _ in range(10):
if link_up():
break
time.sleep(1)
else:
raise RuntimeError("Chestnut not ready, skipping big model build")
from openpilot.common.file_chunker import chunk_file, get_chunk_targets
from openpilot.selfdrive.modeld.get_model_metadata import make_metadata_dict