Commit Graph

439 Commits

Author SHA1 Message Date
Mitchell Goff
d5a55136a1 Added ModelRunner helpers in modeld/runners/__init__.py (#29737)
* Added ModelRunner helper class

* import Runtime in __init__.py
2023-08-31 14:19:20 -07:00
mitchellgoffpc
f91e955a86 Move Runtime into runmodel_pyx 2023-08-31 13:51:50 -07:00
mitchellgoffpc
857f747467 Remove unnecessary hardware check in modeld 2023-08-31 13:51:49 -07:00
mitchellgoffpc
18526c58b6 Set ADSP_LIBRARY_PATH in snpemodel_pyx 2023-08-31 13:11:39 -07:00
mitchellgoffpc
aebff37593 Set RPATH for snpemodel 2023-08-31 11:33:42 -07:00
Mitchell Goff
88a36f4464 Cleaned up modeld SConscript (#29646) 2023-08-30 15:29:33 -07:00
Mitchell Goff
151ac4bf76 Combine update_calibration/get_warp_matrix (#29719) 2023-08-30 15:16:29 -07:00
Mitchell Goff
1eb60516cb Move update_calibration to modeld.py (#29688)
* Move update_calibration to modeld.py

* Updated ref commit
2023-08-30 14:12:52 -07:00
mitchellgoffpc
12d1020239 -DUSE_THNEED is dead 2023-08-30 12:58:31 -07:00
Mitchell Goff
d998fd88a8 Added USE_THNEED environment variable and removed build flag (#29645) 2023-08-29 14:07:57 -07:00
mitchellgoffpc
807410e0ac Remove no-thneed build flag 2023-08-25 19:09:25 -07:00
mitchellgoffpc
e0287fa93e Remove USE_THNEED check from run.h 2023-08-25 19:05:49 -07:00
Kacper Rączy
a4a0429fca modeld: fix bash scripts (#29643)
Fix shebang. Fix LD_PRELOAD
2023-08-25 18:56:06 -07:00
mitchellgoffpc
ef8e0fef55 Remove thneed logic from snpemodel 2023-08-25 14:37:08 -07:00
Mitchell Goff
72a3c987c0 Rewrite modeld in python (#29230)
* Added modeld.py (WIP)

* No more VisionIpcBufExtra

* Started work on cython bindings for runmodel

* Got ONNXModel cython bindings mostly working, added ModelFrame bindings

* Got modeld main loop running without model eval

* Move everything into ModelState

* Doesn't crash!

* Moved ModelState into modeld.py

* Added driving_pyx

* Added cython bindings for message generation

* Moved CLContext definition to visionipc.pxd

* *facepalm*

* Move cl_pyx into commonmodel_pyx

* Split out ONNXModel into a subclass of RunModel

* Added snpemodel/thneedmodel bindings

* Removed modeld.cc

* Fixed scons for macOS

* Fixed sconscript

* Added flag for thneedmodel

* paths are now relative to openpilot root dir

* Set cl kernel paths in SConscript

* Set LD_PRELOAD=libthneed.so to fix ioctl interception

* Run from root dir

* A few more fixes

* A few more minor fixes

* Use C update_calibration for now to exactly match refs

* Add nav_instructions input

* Link driving_pyx.pyx with transformations

* Checked python FirstOrderFilter against C++ FirstOrderFilter

* Set process name to fix test_onroad

* Revert changes to onnxmodel.cc

* Fixed bad onnx_runner.py path in onnxmodel.cc

* Import all constants from driving.h

* logging -> cloudlog

* pylint import-error suppressions no longer needed?

* Loop in SConscript

* Added parens

* Bump modeld cpu usage in test_onroad

* Get rid of use_nav

* use config_realtime_process

* error message from ioctl sniffer was messing up pyenv

* cast distance_idx to int

* Removed cloudlog.infos in model.run

* Fixed rebase conflicts

* Clean up driving.pxd/pyx

* Fixed linter error
2023-08-25 14:36:26 -07:00
Mitchell Goff
e2e39d100b Added cython bindings for model runners and commonmodel (#29607)
* Added cython bindings for model runners and commonmodel

* Removed cython language_level=3

* loop to set CXXFLAGS for both envs
2023-08-24 17:00:26 -07:00
Justin Newberry
1ee6ed4b16 Linter: remove pylint (#29611)
remove pylint
2023-08-24 16:30:54 -07:00
mitchellgoffpc
7dae580441 Moved thneed src to top of modeld sconscript 2023-08-24 15:12:01 -07:00
mitchellgoffpc
fc8c97e7a9 Some cleanup in modeld sconscript 2023-08-24 14:41:04 -07:00
mitchellgoffpc
a184d40b7a Disable error message in thneed ioctl interceptor to fix pyenv issues 2023-08-24 14:41:04 -07:00
Dean Lee
7bfd3dac81 cpplint: add filter whitespace/comma (#29595) 2023-08-24 10:42:06 -07:00
Dean Lee
9c7bf50703 cpplint: add filter whitespace/tab (#29588) 2023-08-24 08:06:58 -07:00
Dean Lee
21da5a216f cpplint: add filter build/include_subdir (#29585) 2023-08-24 15:42:17 +01:00
Dean Lee
f203648de0 cpplint: add filter whitespace/semicolon (#29568) 2023-08-23 15:00:30 -07:00
Dean Lee
5480d32bb5 cpplint: add filter whitespace/parens (#29565) 2023-08-23 14:25:05 -07:00
Dean Lee
2d99521e75 cpplint: build/include_what_you_use (#29556)
* include_what_you_use

* remove comments

* include <memory>

---------

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2023-08-23 13:25:17 -07:00
mitchellgoffpc
7699444816 Set paths for cl kernels and onnx_runner.py in modeld SConscript 2023-08-21 19:38:40 -07:00
mitchellgoffpc
24090d2121 Move USE_RUNTIME flags into runmodel.h 2023-08-21 19:26:48 -07:00
mitchellgoffpc
8c478708ee exit if onnxmodel exec fails 2023-08-21 19:23:23 -07:00
Adeeb Shihadeh
a9626f95b6 add openpilot prefix to imports (#29498)
* add openpilot prefix to imports

* more

* more

* fix docs

* fix linter

* bump submodules

* fix patched tests

* update dynamic imports

* debug

* Revert "debug"

This reverts commit db5e13b9911cc74438bee123bc3430da6c31b24b.

* fix pm test
2023-08-20 20:49:55 -07:00
Justin Newberry
e4ead4f183 Ruff: b905 (strict zip) (#29336)
* added mutable default args

* most of the Bs

* add comment about lrucache

* b905
2023-08-11 16:13:51 -07:00
Justin Newberry
62c1e65924 Ruff: enable most of bugbear (#29320)
* added mutable default args

* most of the Bs

* add comment about lrucache
2023-08-11 15:33:49 -07:00
Mitchell Goff
c04e5d12fc Non-Inflatable Model 🎈 (#29003)
* Added all maneuvers to navInstruction message

* Added nav instruction logic to modeld

* New model: fcee01c1-96bb-414f-b00d-e4a994a00922/700

* Fixed bug in navd

* Added sharp/slight modifiers

* Updated refs
2023-08-09 19:56:45 -07:00
Justin Newberry
7fdd9fc37c CI: Pylint to ruff (#29294)
* pylint to riff

* pylint to riff

* pylint to riff

* revert more

* undo exclude removal

* exclude tinygrad

* set line length

* pylint exclusions to ruff

* same excludes as old linter

* fix tools QA

* remove unrequired check

* revert linting third_party

* ignore e402
2023-08-09 13:26:54 -07:00
Justin Newberry
a91764954b Revert "CI: pylint to ruff (#29276)" (#29284)
This reverts commit cb31a53d8a.
2023-08-08 14:24:04 -07:00
Justin Newberry
cb31a53d8a CI: pylint to ruff (#29276)
* pylint to riff

* pylint to riff

* pylint to riff

* revert more

* undo exclude removal

* exclude tinygrad
2023-08-08 13:41:30 -07:00
eFini
e883789c0e unused variables removal (#29247) 2023-08-06 21:41:13 -07:00
mitchellgoffpc
66dfe8fd5e Added modeld gitignore 2023-08-04 14:14:45 -07:00
Mitchell Goff
663fc0d8fe Clean up model_publish args to simplify cython bindings (#29203)
* Clean up model_publish args to simplify cython bindings

* pass by reference

* Move FCW and model confidence queues into PublishState
2023-08-01 19:23:18 -07:00
Kacper Rączy
c640429406 aarch64: ubuntu build support (#29171)
* Add support for aarch64 pc linux

* Add new libyuv path to release files

* Add libyuv's x86_64 lib dir

* Move left-over platform specific dirs from files_common

* Remove libyuv/lib directory (duplicate)

* Fix mpc Sconscripts

* Remove acados lib path from mpc sources

* Fix typo

* Add watch3 exec on aarch64
2023-08-01 16:18:46 -07:00
Dean Lee
940954c13e swaglog: enable type-checked against format string (#29096)
* check&fix fmt

* bump rednose

* correct format string

* bump rednose

---------

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2023-07-31 17:49:50 -07:00
Nima Khodaveisi
24c7b044de dmmonitoringmodeld: remove unused libyuv import (#29180) 2023-07-31 13:23:13 -07:00
YassineYousfi
14e524d52b models/README: DM input is only luma (#29188)
dm input = only luma
2023-07-31 12:57:22 -07:00
Shane Smiskol
12ed894362 dmonitoringmodeld: initialize model first (#29080)
* hacky fix

* even better

* ordering

* clean up

* fix model replay

* add comment

* catch sigint
2023-07-23 09:28:22 -07:00
Shane Smiskol
6bc28fc769 experimental mode: gate nav (#29007)
* first draft copy, needs updates

* gate behind exp mode

* can be one line

* this is no longer true

* toggle isn't just e2e long now, rename

* don't enable/disable

* kinda works!

* remove old giant qstring

* comment clean up

* similar breakpoint

* more clean up

* fixup onroad

* preserve planner behavior, and we don't need to look at confirmed param if we're onroad

* update translations

* vanish translations

* use scene for op long

* lowercase!

* updated copy

* need to check longitudinal here now too

* clean up!

* here is better

* used

* no nav emoji

* don't check param if not valid

* revert this

revert this

* ed

* revert experimental mode longitudinal checks (still need to revert toggle change)

* revert

* logic works

* revert test

* fix

* update translation

* fix (reset and update)
2023-07-17 21:18:18 -07:00
Kacper Rączy
8ce72760e7 onnx_runner: force determinism (#29000) 2023-07-18 05:52:07 +02:00
Shane Smiskol
b5b431c12d Revert "experimental mode: gate navigate on openpilot (#28883)" (#29005)
This reverts commit f973d605b2.
2023-07-17 19:56:38 -07:00
Dean Lee
8dcd92253b dmonitoring: use sizeof(float) instead of hardcorded size (#28963) 2023-07-15 10:30:50 -07:00
Cameron Clough
ce0717670b modeld: comment out unused variables (#28944) 2023-07-14 17:45:00 +01:00
Shane Smiskol
f973d605b2 experimental mode: gate navigate on openpilot (#28883)
* first draft copy, needs updates

* gate behind exp mode

* can be one line

* this is no longer true

* toggle isn't just e2e long now, rename

* don't enable/disable

* kinda works!

* remove old giant qstring

* comment clean up

* similar breakpoint

* more clean up

* fixup onroad

* preserve planner behavior, and we don't need to look at confirmed param if we're onroad

* update translations

* vanish translations

* use scene for op long

* lowercase!

* updated copy

* need to check longitudinal here now too

* clean up!

* here is better

* used

* no nav emoji

* don't check param if not valid

* revert this

revert this

* ed
2023-07-14 05:26:59 -07:00