-
Notifications
You must be signed in to change notification settings - Fork 3
Add FPS benchmark metric to influx #214
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
tjb7
wants to merge
19
commits into
main
Choose a base branch
from
tjb_fps_graphs
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
19 commits
Select commit
Hold shift + click to select a range
cfc995e
Add manual FPS benchmark Influx pipeline
ce82fcd
Use model-based HIL selection for FPS Influx workflow
f14ff42
Temporarily repurpose rvc4 workflow for FPS Influx dispatch
d0bf4d7
Map Influx GitHub variables into FPS workflow env
f65c94d
Read Influx workflow settings from GitHub secrets
5fad3b6
Add fake Influx CSV fixture for FPS metrics
c95f978
Fix annotated CSV format for fake Influx fixture
d9308bd
Add fake Influx line protocol fixture
5e96309
Use correct Influx bucket name in FPS workflows
e7e23cd
Normalize FPS Influx tags and testbed fallback
45768b9
Temporary debugging logging
22fd18c
Cleanup Commit
1579062
Use HIL camera metadata in benchmark tests
be2ccf9
Drop obsolete camera agent metadata
63fdb79
Use HIL_TESTBED directly in benchmark script
a962d3b
Fail benchmark run on missing camera metadata
60a4f54
Use env metadata in benchmark tests
ba2e946
Select rvc4 camera metadata
c24c3ec
Restore RVC4 workflow from main
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,85 @@ | ||
| name: HIL FPS Benchmark Influx | ||
|
|
||
| on: | ||
| workflow_dispatch: | ||
| inputs: | ||
| depthai_version: | ||
| description: "DepthAI version to test against (e.g. 3.3.0)" | ||
| required: true | ||
| type: string | ||
| os_version: | ||
| description: "Optional camera OS version to install before the benchmark" | ||
| required: false | ||
| type: string | ||
| hold_reservation: | ||
| description: "Hold testbed reservation after the run" | ||
| required: false | ||
| type: boolean | ||
|
|
||
| env: | ||
| DEPTHAI_VERSION: ${{ github.event.inputs.depthai_version }} | ||
| OS_VERSION: ${{ github.event.inputs.os_version }} | ||
| HIL_FRAMEWORK_TOKEN: ${{ secrets.HIL_FRAMEWORK_TOKEN }} | ||
| HUBAI_API_KEY: ${{ secrets.HUBAI_API_KEY }} | ||
| HOLD_RESERVATION: ${{ github.event.inputs.hold_reservation }} | ||
| INFLUX_BUCKET: fps_metrics | ||
|
|
||
| jobs: | ||
| fps-benchmark: | ||
| runs-on: ["self-hosted", "testbed-runner"] | ||
|
|
||
| steps: | ||
| - uses: actions/checkout@v4 | ||
|
|
||
| - name: Run benchmark and push to Influx | ||
| run: | | ||
| set -euo pipefail | ||
|
|
||
| pip install hil-framework --upgrade \ | ||
| --index-url "https://__token__:$HIL_FRAMEWORK_TOKEN@gitlab.luxonis.com/api/v4/projects/213/packages/pypi/simple" | ||
|
|
||
| export RESERVATION_NAME="https://github.com/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID#fps-benchmark-influx" | ||
| RESERVATION_OPTION="--reservation-name $RESERVATION_NAME" | ||
|
|
||
| HOLD_RESERVATION_OPTION="" | ||
| if [[ "$HOLD_RESERVATION" == "true" ]]; then | ||
| HOLD_RESERVATION_OPTION="--hold-reservation" | ||
| fi | ||
|
|
||
| OS_VERSION_OPTION="" | ||
| if [[ -n "$OS_VERSION" ]]; then | ||
| OS_VERSION_OPTION="--os-version $OS_VERSION" | ||
| fi | ||
|
|
||
| if [[ "$DEPTHAI_VERSION" =~ ^3\.[0-9]{1,2}\.[0-9]{1,2}$ ]]; then | ||
| DEPTHAI_VERSION_CHECKED="$DEPTHAI_VERSION" | ||
| else | ||
| echo "Invalid depthai version: $DEPTHAI_VERSION" >&2 | ||
| exit 1 | ||
| fi | ||
|
|
||
| : "${INFLUX_HOST:?INFLUX_HOST is required on the runner}" | ||
| : "${INFLUX_ORG:?INFLUX_ORG is required on the runner}" | ||
| : "${INFLUX_TOKEN:?INFLUX_TOKEN is required on the runner}" | ||
|
|
||
| : "${INFLUX_BUCKET:?INFLUX_BUCKET must be set by the workflow}" | ||
|
|
||
| REMOTE_CMD="export HIL_RUN_ID=\"$GITHUB_RUN_ID\" \ | ||
| INFLUX_HOST=\"$INFLUX_HOST\" \ | ||
| INFLUX_ORG=\"$INFLUX_ORG\" \ | ||
| INFLUX_BUCKET=\"$INFLUX_BUCKET\" \ | ||
| INFLUX_TOKEN=\"$INFLUX_TOKEN\" && \ | ||
| cd /tmp/modelconverter && \ | ||
| ./tests/test_benchmark/run_hil_tests.sh \ | ||
| \"$HUBAI_API_KEY\" \ | ||
| \"$HIL_FRAMEWORK_TOKEN\" \ | ||
| \"$DEPTHAI_VERSION_CHECKED\"" | ||
|
|
||
| exec hil_runner \ | ||
| --models "oak4_pro or oak4_d or oak4_s" \ | ||
| $HOLD_RESERVATION_OPTION \ | ||
| --wait \ | ||
| $OS_VERSION_OPTION \ | ||
| $RESERVATION_OPTION \ | ||
| --sync-workspace --rsync-args="--exclude=venv" \ | ||
| --commands "$REMOTE_CMD" | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@danilo-pejovic not sure if this is needed, would you rather have a seperate workflow or instrument all the tests directly (in rvc4_test.yaml) ... it is my preference to instrument all tests/gather all data, but up to your choice.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tests that are running on our hil are bom-test.yaml ones, not rvc4_test - those seem internal tests to ml team. I would just add influx thing to bom-tests and not create a new workflow.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We are still creating a new unnecessary workflow. Can we edit this one that is already part of the bom to also pass info to influx?
https://github.com/luxonis/modelconverter/blob/main/.github/workflows/bom-test.yaml