mirror of
https://github.com/sunnypilot/sunnypilot.git
synced 2026-09-04 16:43:42 +08:00
non finite
This commit is contained in:
@@ -59,12 +59,15 @@ def _pkl_exists(path):
|
||||
def _find_driving_pkl(bundle):
|
||||
if (override := os.environ.get('COMBINED_MODEL_PKL')) and _pkl_exists(override):
|
||||
return override
|
||||
if bundle and bundle.models:
|
||||
from openpilot.common.hardware.hw import Paths
|
||||
for model in bundle.models:
|
||||
if pkl_name := bundle.models[0].artifact.fileName:
|
||||
if _pkl_exists(path := os.path.join(Paths.model_root(), pkl_name)):
|
||||
return path
|
||||
if bundle is None or not bundle.models:
|
||||
return None
|
||||
from openpilot.common.hardware.hw import Paths
|
||||
model_root = Paths.model_root()
|
||||
|
||||
pkl_name = bundle.models[0].artifact.fileName
|
||||
pkl_path = os.path.join(model_root, pkl_name)
|
||||
if _pkl_exists(pkl_path):
|
||||
return pkl_path
|
||||
return None
|
||||
|
||||
|
||||
@@ -285,8 +288,7 @@ class ModelState(ModelStateBase):
|
||||
buf[0, -1, :] = outputs['desired_curvature'][0, :] if not self.mlsim else 0
|
||||
|
||||
if self.chestnut and not np.all(np.isfinite(outputs.get('plan', np.array([0.])))):
|
||||
cloudlog.error("model output not finite, dropping frame")
|
||||
return None
|
||||
raise RuntimeError("model output not finite")
|
||||
|
||||
return outputs
|
||||
|
||||
|
||||
Reference in New Issue
Block a user