Commit Graph

427 Commits

Author SHA1 Message Date
Mitchell Goff 5033da5e27 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
old-commit-hash: e2e39d100b32a6706e83c81a1ef3dcdd7ea4001f
2023-08-24 17:00:26 -07:00
Justin Newberry c4f322ce2d Linter: remove pylint (#29611)
remove pylint
old-commit-hash: 1ee6ed4b16e2ade0dd887c0687243aee769043e5
2023-08-24 16:30:54 -07:00
mitchellgoffpc 01e73c76f8 Moved thneed src to top of modeld sconscript
old-commit-hash: 7dae580441ddad32bab13bea9b2fd87edbe5d887
2023-08-24 15:12:01 -07:00
mitchellgoffpc c4bb5bbf04 Some cleanup in modeld sconscript
old-commit-hash: fc8c97e7a9595e489f3f466cfc6c0097b9b8217c
2023-08-24 14:41:04 -07:00
mitchellgoffpc 0126d840f3 Disable error message in thneed ioctl interceptor to fix pyenv issues
old-commit-hash: a184d40b7aebbebd91000a199d90299457378381
2023-08-24 14:41:04 -07:00
Dean Lee de809632bf cpplint: add filter whitespace/comma (#29595)
old-commit-hash: 7bfd3dac811ae95bfd09495e88377dfbaacda393
2023-08-24 10:42:06 -07:00
Dean Lee 228d30d5a9 cpplint: add filter whitespace/tab (#29588)
old-commit-hash: 9c7bf50703e4da45163e175766b4bdfabcb9916c
2023-08-24 08:06:58 -07:00
Dean Lee 0984736972 cpplint: add filter build/include_subdir (#29585)
old-commit-hash: 21da5a216fc8f5269d2deedc538c2f543a1c270a
2023-08-24 15:42:17 +01:00
Dean Lee 5f4b422305 cpplint: add filter whitespace/semicolon (#29568)
old-commit-hash: f203648de0a9d78121d3a775ae454a43e1211e62
2023-08-23 15:00:30 -07:00
Dean Lee db211ce617 cpplint: add filter whitespace/parens (#29565)
old-commit-hash: 5480d32bb5d98d57100fd709b9ffe7bfcc6e020a
2023-08-23 14:25:05 -07:00
Dean Lee 97e9d55588 cpplint: build/include_what_you_use (#29556)
* include_what_you_use

* remove comments

* include <memory>

---------

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
old-commit-hash: 2d99521e7500902070d0aacce69528bcfd8b9964
2023-08-23 13:25:17 -07:00
mitchellgoffpc 8a1e4d8575 Set paths for cl kernels and onnx_runner.py in modeld SConscript
old-commit-hash: 7699444816b04b95407f43ef631760666f1e2a11
2023-08-21 19:38:40 -07:00
mitchellgoffpc b1a10e45d1 Move USE_RUNTIME flags into runmodel.h
old-commit-hash: 24090d21219cb93de18103cda3a6ada02f4ba3f2
2023-08-21 19:26:48 -07:00
mitchellgoffpc b69de80962 exit if onnxmodel exec fails
old-commit-hash: 8c478708ee53c7b473989cd48ac1fdad8702c372
2023-08-21 19:23:23 -07:00
Adeeb Shihadeh 16ec56398c 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
old-commit-hash: a9626f95b69af19306143fc4def02fb5769405d2
2023-08-20 20:49:55 -07:00
Justin Newberry f33b4de80b Ruff: b905 (strict zip) (#29336)
* added mutable default args

* most of the Bs

* add comment about lrucache

* b905
old-commit-hash: e4ead4f1830618f5f61978491930cb0b8d36ab26
2023-08-11 16:13:51 -07:00
Justin Newberry d487c0501f Ruff: enable most of bugbear (#29320)
* added mutable default args

* most of the Bs

* add comment about lrucache
old-commit-hash: 62c1e6592439119f360dd64b854e7047f35222ba
2023-08-11 15:33:49 -07:00
Mitchell Goff e6e19f8d3e 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
old-commit-hash: c04e5d12fce1801cd555a4846768b68db7090b17
2023-08-09 19:56:45 -07:00
Justin Newberry 3ee0786de3 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
old-commit-hash: 7fdd9fc37c1c5febf1cd3dc86441ebf0dec7f370
2023-08-09 13:26:54 -07:00
Justin Newberry ff96892511 Revert "CI: pylint to ruff (#29276)" (#29284)
This reverts commit ffad7279cbad3c4f2ea786287b4624d3a3aa18d7.
old-commit-hash: a91764954b0c9bfe5ccfc8e64321af6bb6c56536
2023-08-08 14:24:04 -07:00
Justin Newberry 99006365a3 CI: pylint to ruff (#29276)
* pylint to riff

* pylint to riff

* pylint to riff

* revert more

* undo exclude removal

* exclude tinygrad
old-commit-hash: cb31a53d8a93cf6cb1f8bd2fff1431716b3a47e4
2023-08-08 13:41:30 -07:00
eFini 0a9ec3e2aa unused variables removal (#29247)
old-commit-hash: e883789c0e8514e6fe57ac5522b49eb03a3d68d4
2023-08-06 21:41:13 -07:00
mitchellgoffpc 7616368e5b Added modeld gitignore
old-commit-hash: 66dfe8fd5e28f20ce5bbf828fb34612047db6aae
2023-08-04 14:14:45 -07:00
Mitchell Goff 181e9775f7 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
old-commit-hash: 663fc0d8fe7cb203259fceb5b8aef9fde270b9cb
2023-08-01 19:23:18 -07:00
Kacper Rączy edc31db6df 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
old-commit-hash: c640429406c8925b3cce9d979cee880a90fd79c3
2023-08-01 16:18:46 -07:00
Dean Lee b80325aa04 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>
old-commit-hash: 940954c13e4fb352618448e435b5c1a722fdc3aa
2023-07-31 17:49:50 -07:00
Nima Khodaveisi 8fdb381e42 dmmonitoringmodeld: remove unused libyuv import (#29180)
old-commit-hash: 24c7b044de53686bd16eec2ece0951c8c96f010c
2023-07-31 13:23:13 -07:00
YassineYousfi af69774431 models/README: DM input is only luma (#29188)
dm input = only luma
old-commit-hash: 14e524d52b24647c140fbccd0d1d4badb8ecd103
2023-07-31 12:57:22 -07:00
Shane Smiskol 0a6b589f23 dmonitoringmodeld: initialize model first (#29080)
* hacky fix

* even better

* ordering

* clean up

* fix model replay

* add comment

* catch sigint
old-commit-hash: 12ed894362dd22513a21de6689a31511b791e37b
2023-07-23 09:28:22 -07:00
Shane Smiskol c258e9d64a 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)
old-commit-hash: 6bc28fc7698415e41610ddd04bb3ce473870591e
2023-07-17 21:18:18 -07:00
Kacper Rączy fe2fc9dd11 onnx_runner: force determinism (#29000)
old-commit-hash: 8ce72760e784760eb26b9dc87e12919943397c37
2023-07-18 05:52:07 +02:00
Shane Smiskol f9c6c9e8c3 Revert "experimental mode: gate navigate on openpilot (#28883)" (#29005)
This reverts commit 929880496515e3f995634e561145802bf15a60ea.
old-commit-hash: b5b431c12d54aaa115f9750da6d49e62a6d31778
2023-07-17 19:56:38 -07:00
Dean Lee 46d64e90e6 dmonitoring: use sizeof(float) instead of hardcorded size (#28963)
old-commit-hash: 8dcd92253b3117378cc39fa43111419ec3b4d832
2023-07-15 10:30:50 -07:00
Cameron Clough aa0c37ed21 modeld: comment out unused variables (#28944)
old-commit-hash: ce0717670b98acb0e523823df2d60009918566be
2023-07-14 17:45:00 +01:00
Shane Smiskol 296de39f48 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
old-commit-hash: f973d605b2121a575a46f4a18dfcbb2df1f4816b
2023-07-14 05:26:59 -07:00
Adeeb Shihadeh e83ec32c7b dmonitoringmodeld: add more logging around the init (#28920)
old-commit-hash: 8d13ddb943de02a1d8f9f593896aa24ae38db34c
2023-07-13 11:58:51 -07:00
Mitchell Goff a0d705d113 nav model: fix flicker in nav enabled state (#28815)
* Fix flicker in nav enabled state

* Move all relevant information for validity checks into navModel packet

* Ignore locationMonoTime in replay tests

* Check route valid in navmodeld

* sm update

* check that

* update refs

---------

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
old-commit-hash: e346839c68e7f86bf7bdd88966e33a64c0be5680
2023-07-09 15:10:02 -07:00
Mitchell Goff 95051090a1 Refactor model runners (#28598)
* Started work on model runner refactor

* Fixed some compile errors

* everything compiles

* Fixed bug in SNPEModel

* updateInput -> setInputBuffer

* I understand nothing

* whoops lol

* use std::string instead of char*

* Move common logic into RunModel

* formatting fix
old-commit-hash: c9f00678af17dc75b9e56a968c4357704e40c901
2023-07-06 22:26:11 -07:00
Dean Lee 235235b2d9 modeldata.h: convert constants to uppercase (#28769)
old-commit-hash: 32c5e6aafb702a5a17ca7b43c9062ce9e4462d34
2023-07-01 08:26:21 +01:00
Mitchell Goff d663b5843e Moonrise Model (#28761)
* New model: 889463fc-5e5d-497d-9111-c8567a13cabf

* Updated model replay ref
old-commit-hash: 531c13f2acd8d15914aba34a40b356dcb7f02ced
2023-06-30 18:52:20 -07:00
ZwX1616 6e547a2748 Modeld: send confidence class (#28625)
* 0.7

* magic

* faster magic

* more simple

* up

* empty

* more mid bits

* naive

* flatten

* dz

* that can stay

* this is fine

* what the

* what the

* giRevert "what the"

This reverts commit 1619ba68e6098dc581fe9b82e7ecb74562b619cc.

* Revert "what the"

This reverts commit 0037dd368290497a6d0009ca34adb2184b584d2e.

* 1x fine

* that was fine

* combined

* independent cum

* 0 is fine

* use metrics

* up cereal

* process and publish from modeld

* cleanup

* use s.output

* bg

* a greener approach

* dns

* serial

* update ref commit

* rebase

* ref

* cereal master

---------

Co-authored-by: Comma Device <device@comma.ai>
old-commit-hash: ce2dffe56689615597766652576e3711efdb8e61
2023-06-23 16:49:14 -07:00
Mitchell Goff 4ad967f963 Publish navEnabled from modeld (#28647)
* Publish navEnabled from modeld

* Bump cereal
old-commit-hash: 4c2c73b15282f405900b64b0fb67d461f3058b5c
2023-06-22 19:39:51 -07:00
Kacper Rączy 1fa42d0b97 process_replay: modeld and dmonitoringmodeld support (#28463)
* vipc support. modeld and dmonitoringmodeld configs

* Update cereal

* Add vision meta

* Use vision meta in process replay

* Exclude modeld and dmonitoringmodeld from test_processes

* Refactor other pieces of code to use vision meta

* remove unnecessary imports

* Add MAX_FRAMES_PER_SEGMENT

* cameraState migration

* Move camera state migration to migration module

* model_replay refactor

* Fix lint issues

* Reduce number of vipc buffers to 2

* Update spinner message

* Update model replay ref

* Support the new log order

* Replace CameraFrameSizes with dict. Add encode_index field

* Migrate camera states based on encode indices

* Refactor process replay

* Refactor model replay

* Remove unnecessary print

* Update model replay ref

* Make camera state migration optional

* Remove unused import

* Add ignore_alive_pubs field

* Add assertion for carParams inside fingerprinting callback

* Remove WideCameraOnly param setup

* Refactor ModeldCameraSyncRcvCallback

* Update model replay ref commit

* Fix camera state migration

* Only migrate camera states when process has vision pubs

* Refactor model replay again

* Fix linter issues

* One more linter fix

* Update model replay ref commit
old-commit-hash: 2c617e0c7a082aeb3217b14e812e5d3c0c26cd4a
2023-06-22 17:36:25 -07:00
Mitchell Goff 31834eac4c Remove get_model_yuv_transform function (#28568)
* remove yuv_transform from update_calibration

* Remove get_model_yuv_transform entirely
old-commit-hash: ae5bfcf248e20036998331d5db3cf44c323fe802
2023-06-21 20:02:44 -07:00
Mitchell Goff 77b5e197aa Enable nav features in modeld (#28448)
* Enable nav features in modeld

* Enable mapsd/navmodeld

* Updated model_replay_ref_commit and added mapsd/navmodeld to test_onroad

* fixed process name

* always publish from mapsd
old-commit-hash: aadd9ae269e682b6893557a89a02a7ae357206ee
2023-06-16 21:27:35 -07:00
Mitchell Goff 429a638740 New map model: 917a2539-5e7a-4374-878a-9b356f0f1922/500 (#28579)
old-commit-hash: a9cb25501783bcf2a1e1d7169874481aac897358
2023-06-16 19:31:57 -07:00
YassineYousfi 990624c07e Nicolas Cage Model (#28547)
01697194-d32d-4c3a-a803-d8f61cdf24e9/449 2ff8e6a1-7efd-4984-9f29-974164a3747b/700
old-commit-hash: 4fcd82076aeea11e9636c59ed1d50f740f05c6d1
2023-06-16 13:36:56 -07:00
Kacper Rączy 8aa845a1c8 modeld: use any available stream as main, if there's only one (#28514)
* Use whatever stream is available as main, if there's only one

* Move logw somewhere else

* Add wideRoadCameraState to ignore_alive if its not available
old-commit-hash: 4eb3d541492f7695227f4d8a83127cbd0d32ff79
2023-06-12 20:13:56 -07:00
Dean Lee eddc84d104 automatically detect available camera streams (#27640)
* remove WideCameraOnly

* check in set_initial_state

* no block

* remove try block

* apply reviews
old-commit-hash: 4ae0378f639826df5cc1518574842b61b118f371
2023-06-12 13:40:43 -07:00
Adeeb Shihadeh 846cd63f53 thneed: cleanup duplicate GPU config (#28487)
Co-authored-by: Comma Device <device@comma.ai>
old-commit-hash: b22cadc04d569a6f3593fe32eaec3a3a0e21ef9b
2023-06-11 13:26:41 -07:00