Compare commits

..

63 Commits

Author SHA1 Message Date
discountchubbs 274a3a6f86 lint 2026-08-04 15:55:49 -07:00
discountchubbs 79a81ca2b8 allow legacy 2026-08-04 15:48:36 -07:00
discountchubbs 918a0962ea desire me? 2026-08-04 13:34:35 -07:00
discountchubbs 5a2fcde03d add todo-sp 2026-08-04 13:26:04 -07:00
discountchubbs 07bd1dfb52 prev_feat in cpu to prevent corruption 2026-08-04 13:15:12 -07:00
discountchubbs 6bfbf45c6d dump and assign to cpu 2026-08-04 12:35:22 -07:00
discountchubbs 289171fef8 fix chunking 2026-08-02 15:38:02 -07:00
Jason Wen 5305655f78 Merge branch 'master' into deep-rl-maybe 2026-08-02 11:04:24 -04:00
discountchubbs d733058dee that comment was wrong, its still per model, just compiled at with the input/output shapes 2026-08-01 16:13:28 -07:00
discountchubbs ce488dff50 fix pkl loader test 2026-08-01 16:09:04 -07:00
discountchubbs 2e87e08ba6 back 2026-08-01 15:17:26 -07:00
discountchubbs 785a6baa3d Merge remote-tracking branch 'origin/deep-rl-maybe' into deep-rl-maybe 2026-08-01 15:17:05 -07:00
discountchubbs c22f58dae3 lint be crazy now, man i've been away a while 2026-08-01 15:15:54 -07:00
James Vecellio-Grant 3c9dd2e590 Merge branch 'master' into deep-rl-maybe 2026-08-02 00:09:53 +02:00
discountchubbs d086f83aed no 2026-08-01 15:07:47 -07:00
discountchubbs eef36d8b54 too much fluff 2026-08-01 15:05:31 -07:00
discountchubbs 62e0462662 this is annoying me 2026-08-01 14:58:01 -07:00
discountchubbs ee9ee3a6fc np.random.seed is deprecated, use Generator or default rng instead @nayan 2026-08-01 14:48:11 -07:00
discountchubbs c4a3854dc5 fix macos cabana 2026-07-28 11:24:46 -07:00
nayan ad516e619b simplify everything. 2026-07-28 13:21:44 -04:00
nayan 8c3cd2575f fuckit. dynamic everything. 2026-07-28 13:21:44 -04:00
nayan 3ec226474a fix paths 2026-07-25 20:22:04 -04:00
nayan 273eb9f997 whatever 2026-07-25 18:30:29 -04:00
nayan e143888eb1 realize. that i don't know shit 2026-07-25 18:08:17 -04:00
nayan 8092f13438 read/open - what's the difference 2026-07-25 17:43:59 -04:00
nayan a87788b65c Merge remote-tracking branch 'origin/deep-rl-maybe' into deep-rl-maybe 2026-07-25 17:29:35 -04:00
nayan 4cbe97fd20 hmmmm 2026-07-25 17:29:18 -04:00
Nayan 98254867a9 fuck. i AM blind. or dumb. or both. 2026-07-25 16:49:07 -04:00
Nayan bee1cdd45d i might be blind 2026-07-25 16:47:01 -04:00
nayan 91e40b80d8 wtf. ghostwriter 2026-07-25 16:34:01 -04:00
nayan 110568a9d1 it's a supercombo 2026-07-25 16:28:47 -04:00
nayan bb1b9a27d8 Merge remote-tracking branch 'origin/master' into deep-rl
# Conflicts:
#	openpilot/sunnypilot/modeld_v2/compile_modeld.py
#	openpilot/sunnypilot/modeld_v2/modeld.py
#	openpilot/sunnypilot/modeld_v2/tests/test_combined_pkl_loader.py
#	openpilot/sunnypilot/modeld_v2/tests/test_warp.py
#	openpilot/sunnypilot/modeld_v2/warp.py
#	openpilot/sunnypilot/models/manager.py
#	openpilot/sunnypilot/models/runners/helpers.py
#	openpilot/sunnypilot/models/runners/model_runner.py
#	openpilot/sunnypilot/models/runners/tinygrad/model_types.py
#	openpilot/sunnypilot/models/runners/tinygrad/tinygrad_runner.py
#	sunnypilot/models/helpers.py
2026-07-25 16:12:52 -04:00
nayan 76b21c72cf i don't know what i'm doing 2026-07-25 16:08:15 -04:00
discountchubbs 70424bd661 oopsie 2026-06-12 04:08:47 -07:00
discountchubbs d215eab1d4 deeeeep 2026-06-12 03:49:03 -07:00
discountchubbs 91316c8cb5 simplify 2026-06-12 03:38:33 -07:00
discountchubbs fa284be7e6 bye metadata 2026-06-12 03:12:13 -07:00
discountchubbs 6e7d9e5e52 done done done 2026-06-07 11:37:30 -07:00
James Vecellio-Grant a4a7c2335d Merge branch 'compile-modeld-defluff' into deep-rl 2026-06-07 19:54:47 +02:00
James Vecellio-Grant ae573c7c3f Update compile_modeld.py 2026-06-07 10:52:39 -07:00
discountchubbs 7d7b6ee306 i could 2026-06-07 10:32:55 -07:00
discountchubbs 6a4c59c3e0 needed 2026-06-07 10:22:07 -07:00
discountchubbs fb5cb7a1cc i could lie say 2026-06-07 10:06:02 -07:00
discountchubbs 049dfd2eaa Update compile_modeld.py 2026-06-07 09:47:40 -07:00
discountchubbs be20848487 Update compile_modeld.py 2026-06-07 04:17:14 -07:00
discountchubbs cdd232b606 Merge branch 'deep-rl' of github.com:sunnypilot/sunnypilot into deep-rl 2026-06-07 04:06:16 -07:00
discountchubbs b21c70b1ba Update compile_modeld.py 2026-06-07 04:05:54 -07:00
James Vecellio-Grant 67e5bd3c1e Merge branch 'compile-modeld-defluff' into deep-rl 2026-06-07 12:58:59 +02:00
discountchubbs 74692d0b5f summary 2026-06-07 03:56:09 -07:00
discountchubbs dd35c27981 Update compile_modeld.py 2026-06-07 03:44:27 -07:00
discountchubbs 159140e64e Update compile_modeld.py 2026-06-07 03:41:09 -07:00
James Vecellio-Grant f1ab6c8dfb Update compile_modeld.py 2026-06-07 12:21:49 +02:00
James Vecellio-Grant e1fe30fd3e Update compile_modeld.py 2026-06-07 12:19:36 +02:00
James Vecellio-Grant fba521dcff Update fetcher.py 2026-06-07 12:06:02 +02:00
discountchubbs a8ef55bfaa gpu stuffs 2026-06-07 02:14:25 -07:00
discountchubbs a232f54e2d CREAM AND SUGAR 2026-06-07 01:45:42 -07:00
discountchubbs 2697008aa7 redundant 2026-06-06 10:09:07 -07:00
discountchubbs ad5abd242a modeld_v2: refactor compile_modeld 2026-06-06 09:58:48 -07:00
discountchubbs 6c1e0f370b god use full attribute names please 2026-06-06 09:25:50 -07:00
discountchubbs 1083f5bf21 dumb 2026-06-06 09:16:36 -07:00
discountchubbs dc5116c718 numpy 2026-06-06 09:15:51 -07:00
discountchubbs 8611e08dc6 fix string 2026-06-06 09:03:36 -07:00
discountchubbs dc0f73c63b modeld_v2: safe model validation 2026-06-06 08:54:36 -07:00
2 changed files with 41 additions and 21 deletions
@@ -12,11 +12,11 @@ on:
required: false required: false
type: string type: string
recompiled_dir: recompiled_dir:
description: 'Existing recompiled directory number (e.g. 3 for recompiled3)' description: 'Existing recompiled directory number (e.g. 1 for recompiled1)'
required: true required: true
type: string type: string
json_version: json_version:
description: 'driving_models version number to update (e.g. 5 for driving_models_v5.json)' description: 'driving_models version number to update (e.g. 18 for driving_models_v18.json)'
required: true required: true
type: string type: string
artifact_suffix: artifact_suffix:
@@ -63,12 +63,11 @@ on:
default: 'None' default: 'None'
options: options:
- None - None
- Simple Plan Models - Master Models
- Space Lab Models - Release Models
- TR Models - 2025 World Models
- DTR Models - 2026 World Models
- Custom Merge Models - Custom Merge Models
- FOF series models
- Other - Other
custom_model_folder: custom_model_folder:
description: 'Custom model folder name (if "Other" selected)' description: 'Custom model folder name (if "Other" selected)'
+34 -13
View File
@@ -30,6 +30,11 @@ on:
required: false required: false
type: string type: string
default: '' default: ''
target_hardware:
description: 'Hardware target to compile for (qcom or usbgpu)'
required: false
type: string
default: 'qcom'
workflow_dispatch: workflow_dispatch:
inputs: inputs:
upstream_branch: upstream_branch:
@@ -46,6 +51,14 @@ on:
required: false required: false
type: boolean type: boolean
default: true default: true
target_hardware:
description: 'Hardware target to compile for'
required: true
type: choice
options:
- qcom
- usbgpu
default: 'qcom'
run-name: Build model [${{ inputs.custom_name || inputs.upstream_branch }}] from ref [${{ inputs.upstream_branch }}] run-name: Build model [${{ inputs.custom_name || inputs.upstream_branch }}] from ref [${{ inputs.upstream_branch }}]
@@ -161,19 +174,30 @@ jobs:
name: models-${{ env.REF }}${{ inputs.artifact_suffix }} name: models-${{ env.REF }}${{ inputs.artifact_suffix }}
path: ${{ env.MODELS_DIR }} path: ${{ env.MODELS_DIR }}
- run: | - run: |
rm -f ${{ env.MODELS_DIR }}/{dmonitoring_model,big_driving_policy,big_driving_vision}.onnx rm -f ${{ env.MODELS_DIR }}/{dmonitoring_model,big_driving_policy,big_driving_vision,big_driving_supercombo}.onnx
- name: Build Model - name: Build Model
run: | run: |
source /etc/profile source /etc/profile
export UV_PROJECT_ENVIRONMENT=${HOME}/venv export UV_PROJECT_ENVIRONMENT=${HOME}/venv
export VIRTUAL_ENV=$UV_PROJECT_ENVIRONMENT export VIRTUAL_ENV=$UV_PROJECT_ENVIRONMENT
source ${UV_PROJECT_ENVIRONMENT}/bin/activate
export PYTHONPATH="${PYTHONPATH}:${{ env.TINYGRAD_PATH }}:${{ github.workspace }}" export PYTHONPATH="${PYTHONPATH}:${{ env.TINYGRAD_PATH }}:${{ github.workspace }}"
COMPILE_MODELD="${{ github.workspace }}/openpilot/sunnypilot/modeld_v2/compile_modeld.py" COMPILE_MODELD="${{ github.workspace }}/openpilot/sunnypilot/modeld_v2/compile_modeld.py"
MODEL_SIZE=$(python3 -c "from openpilot.common.transformations.model import MEDMODEL_INPUT_SIZE as s; print(f'{s[0]}x{s[1]}')") MODEL_SIZE=$(python3 -c "from openpilot.common.transformations.model import MEDMODEL_INPUT_SIZE as s; print(f'{s[0]}x{s[1]}')")
CAMERA_RES=$(python3 -c "from openpilot.common.transformations.camera import _ar_ox_fisheye as a, _os_fisheye as o; print(f'{a.width}x{a.height} {o.width}x{o.height}')") CAMERA_RES=$(python3 -c "from openpilot.common.transformations.camera import _ar_ox_fisheye as a, _os_fisheye as o; print(f'{a.width}x{a.height} {o.width}x{o.height}')")
if [ "${{ inputs.target_hardware }}" == "usbgpu" ]; then
echo "USBGPU build"
export USBGPU=1
TG_FLAGS="DEV=AMD USBGPU=1 IMAGE=1 FLOAT16=1 NOLOCALS=1 JIT_BATCH_SIZE=0 OPENPILOT_HACKS=1"
OUTPUT_PKL="${{ env.MODELS_DIR }}/big_driving_tinygrad.pkl"
else
echo "QCOM build"
TG_FLAGS="DEV=QCOM IMAGE=1 FLOAT16=1 NOLOCALS=1 JIT_BATCH_SIZE=0 OPENPILOT_HACKS=1" TG_FLAGS="DEV=QCOM IMAGE=1 FLOAT16=1 NOLOCALS=1 JIT_BATCH_SIZE=0 OPENPILOT_HACKS=1"
OUTPUT_PKL="${{ env.MODELS_DIR }}/driving_tinygrad.pkl"
fi
# Generate metadata for all ONNX files # Generate metadata for all ONNX files
find "${{ env.MODELS_DIR }}" -maxdepth 1 -name '*.onnx' | while IFS= read -r onnx_file; do find "${{ env.MODELS_DIR }}" -maxdepth 1 -name '*.onnx' | while IFS= read -r onnx_file; do
@@ -186,7 +210,13 @@ jobs:
POLICY_ONNX="${{ env.MODELS_DIR }}/driving_policy.onnx" POLICY_ONNX="${{ env.MODELS_DIR }}/driving_policy.onnx"
OFF_POLICY_ONNX="${{ env.MODELS_DIR }}/driving_off_policy.onnx" OFF_POLICY_ONNX="${{ env.MODELS_DIR }}/driving_off_policy.onnx"
ON_POLICY_ONNX="${{ env.MODELS_DIR }}/driving_on_policy.onnx" ON_POLICY_ONNX="${{ env.MODELS_DIR }}/driving_on_policy.onnx"
SUPERCOMBO_ONNX="${{ env.MODELS_DIR }}/supercombo.onnx" SUPERCOMBO_ONNX=""
for f in "${{ env.MODELS_DIR }}/supercombo.onnx" "${{ env.MODELS_DIR }}/driving_supercombo.onnx"; do
if [ -f "$f" ]; then
SUPERCOMBO_ONNX="$f"
break
fi
done
MODEL_TYPE="" ONNX_ARGS="" OUTPUT_NAME="" MODEL_TYPE="" ONNX_ARGS="" OUTPUT_NAME=""
if [ -f "$VISION_ONNX" ]; then if [ -f "$VISION_ONNX" ]; then
@@ -207,24 +237,15 @@ jobs:
fi fi
if [ -n "$MODEL_TYPE" ]; then if [ -n "$MODEL_TYPE" ]; then
echo "Detected: $MODEL_TYPE -> driving_tinygrad.pkl" echo "Detected: $MODEL_TYPE -> $OUTPUT_PKL"
env ${TG_FLAGS} python3 "$COMPILE_MODELD" \ env ${TG_FLAGS} python3 "$COMPILE_MODELD" \
--model-type $MODEL_TYPE \ --model-type $MODEL_TYPE \
--model-size $MODEL_SIZE \ --model-size $MODEL_SIZE \
--camera-resolutions $CAMERA_RES \ --camera-resolutions $CAMERA_RES \
$ONNX_ARGS \ $ONNX_ARGS \
--output "${{ env.MODELS_DIR }}/driving_tinygrad.pkl" --output "$OUTPUT_PKL"
fi fi
- name: Validate Model Outputs
run: |
source /etc/profile
export UV_PROJECT_ENVIRONMENT=${HOME}/venv
export VIRTUAL_ENV=$UV_PROJECT_ENVIRONMENT
python3 "${{ github.workspace }}/release/ci/model_generator.py" \
--validate-only \
--model-dir "${{ env.MODELS_DIR }}"
- name: Prepare Output - name: Prepare Output
run: | run: |
sudo rm -rf ${{ env.OUTPUT_DIR }} sudo rm -rf ${{ env.OUTPUT_DIR }}