mirror of
https://github.com/sunnypilot/sunnypilot.git
synced 2026-08-23 19:43:44 +08:00
@@ -6,7 +6,7 @@ env:
|
||||
SCONS_CACHE_DIR: ${{ github.workspace }}/release/ci/scons_cache
|
||||
UPSTREAM_REPO: "commaai/openpilot"
|
||||
TINYGRAD_PATH: ${{ github.workspace }}/openpilot/tinygrad_repo
|
||||
MODELS_DIR: ${{ github.workspace }}/openpilot/selfdrive/modeld/models
|
||||
MODELS_DIR: ${{ github.workspace }}/openpilot/openpilot/selfdrive/modeld/models
|
||||
|
||||
on:
|
||||
workflow_call:
|
||||
@@ -105,7 +105,7 @@ jobs:
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: models-${{ env.REF }}${{ inputs.artifact_suffix }}
|
||||
path: ${{ github.workspace }}/openpilot/selfdrive/modeld/models/*.onnx
|
||||
path: ${{ github.workspace }}/openpilot/openpilot/selfdrive/modeld/models/*.onnx
|
||||
|
||||
build_model:
|
||||
runs-on: [self-hosted, tici]
|
||||
@@ -170,9 +170,9 @@ jobs:
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: models-${{ env.REF }}${{ inputs.artifact_suffix }}
|
||||
path: ${{ github.workspace }}/openpilot/selfdrive/modeld/models
|
||||
path: ${{ github.workspace }}/openpilot/openpilot/selfdrive/modeld/models
|
||||
- run: |
|
||||
rm -f ${{ github.workspace }}/openpilot/selfdrive/modeld/models/{dmonitoring_model,big_driving_policy,big_driving_vision,big_driving_supercombo}.onnx
|
||||
rm -f ${{ github.workspace }}/openpilot/openpilot/selfdrive/modeld/models/{dmonitoring_model,big_driving_policy,big_driving_vision, big_driving_supercombo}.onnx
|
||||
|
||||
- name: Build Model
|
||||
run: |
|
||||
@@ -181,7 +181,7 @@ jobs:
|
||||
export VIRTUAL_ENV=$UV_PROJECT_ENVIRONMENT
|
||||
export PYTHONPATH="${PYTHONPATH}:${{ env.TINYGRAD_PATH }}:${{ github.workspace }}"
|
||||
|
||||
COMPILE_MODELD="${{ github.workspace }}/openpilot/sunnypilot/modeld_v2/compile_modeld.py"
|
||||
COMPILE_MODELD="${{ github.workspace }}/openpilot/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]}')")
|
||||
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}')")
|
||||
|
||||
@@ -199,7 +199,7 @@ jobs:
|
||||
# Generate metadata for all ONNX files
|
||||
find "${{ env.MODELS_DIR }}" -maxdepth 1 -name '*.onnx' | while IFS= read -r onnx_file; do
|
||||
echo "Generating metadata: $onnx_file"
|
||||
env ${TG_FLAGS} python3 "${{ github.workspace }}/openpilot/selfdrive/modeld/get_model_metadata.py" "$onnx_file" || true
|
||||
env ${TG_FLAGS} python3 "${{ github.workspace }}/openpilot/openpilot/selfdrive/modeld/get_model_metadata.py" "$onnx_file" || true
|
||||
done
|
||||
|
||||
# Detect model type and build compile args
|
||||
|
||||
Reference in New Issue
Block a user