modeld: run the driving model as a single combined onnx (#38173)

This commit is contained in:
Harald Schäfer
2026-06-12 18:35:52 -07:00
committed by GitHub
parent f9cc67896c
commit a40fa3a0b0
11 changed files with 55 additions and 71 deletions
+5 -3
View File
@@ -25,7 +25,9 @@ class MetadataOnnxPBParser(OnnxPBParser):
def get_checkpoint(f):
model = MetadataOnnxPBParser(f).parse()
metadata = {prop["key"]: prop["value"] for prop in model["metadata_props"]}
return metadata['model_checkpoint'].split('/')[0]
# "<uuid>" or ".../<run_uuid>/<step>"; combined models list vision then policy
parts = metadata['model_checkpoint'].split('/')
return parts[-2] if len(parts) > 1 else parts[0]
if __name__ == "__main__":
@@ -37,8 +39,8 @@ if __name__ == "__main__":
master_path = MASTER_PATH + MODEL_PATH + fn
if os.path.exists(master_path):
master = get_checkpoint(master_path)
master_col = f"[{master}](https://reporter.comma.life/experiment/{master})"
master_col = f"[{master}](https://reporter.comma.life/{master})"
else:
master_col = "N/A (new model)"
pr = get_checkpoint(BASEDIR + MODEL_PATH + fn)
print("|", fn, "|", master_col, "|", f"[{pr}](https://reporter.comma.life/experiment/{pr})", "|")
print("|", fn, "|", master_col, "|", f"[{pr}](https://reporter.comma.life/{pr})", "|")