mirror of
https://github.com/sunnypilot/sunnypilot.git
synced 2026-07-16 23:52:06 +08:00
modeld: run the driving model as a single combined onnx (#38173)
This commit is contained in:
+5
-3
@@ -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})", "|")
|
||||
|
||||
Reference in New Issue
Block a user