Skip to content
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

Handle illegal character in benchmark configs filename #7461

Merged
merged 5 commits into from
Dec 31, 2024
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions .github/workflows/android-perf.yml
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ jobs:
- uses: actions/checkout@v3

- name: Prepare the spec
id: prepare
shell: bash
env:
BENCHMARK_CONFIG: ${{ toJSON(matrix) }}
Expand All @@ -120,8 +121,10 @@ jobs:
# Just print the test spec for debugging
cat android-llm-device-farm-test-spec.yml

BENCHMARK_CONFIG_FILENAME=$(echo "${BENCHMARK_CONFIG_ID}" | sed -e 's/[^A-Za-z0-9._-]/_/g')
# Save the benchmark configs so that we can use it later in the dashboard
echo "${BENCHMARK_CONFIG}" > "${BENCHMARK_CONFIG_ID}.json"
echo "${BENCHMARK_CONFIG}" > "${BENCHMARK_CONFIG_FILENAME}.json"
echo "benchmark-config-filename=${BENCHMARK_CONFIG_FILENAME}" >> $GITHUB_OUTPUT

- name: Upload the spec
uses: seemethere/upload-artifact-s3@v5
Expand All @@ -141,7 +144,7 @@ jobs:
${{ github.repository }}/${{ github.run_id }}/artifacts/benchmark-configs/
retention-days: 1
if-no-files-found: error
path: extension/benchmark/android/benchmark/${{ matrix.model }}_${{ matrix.config }}.json
path: extension/benchmark/android/benchmark/${{ steps.prepare.outputs.benchmark-config-filename }}.json

export-models:
name: export-models
Expand Down
7 changes: 5 additions & 2 deletions .github/workflows/apple-perf.yml
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ jobs:
- uses: actions/checkout@v3

- name: Prepare the spec
id: prepare
shell: bash
env:
BENCHMARK_CONFIG: ${{ toJSON(matrix) }}
Expand All @@ -122,8 +123,10 @@ jobs:
# Just print the test spec for debugging
cat default-ios-device-farm-appium-test-spec.yml

BENCHMARK_CONFIG_FILENAME=$(echo "${BENCHMARK_CONFIG_ID}" | sed -e 's/[^A-Za-z0-9._-]/_/g')
# Save the benchmark configs so that we can use it later in the dashboard
echo "${BENCHMARK_CONFIG}" > "${BENCHMARK_CONFIG_ID}.json"
echo "${BENCHMARK_CONFIG}" > "${BENCHMARK_CONFIG_FILENAME}.json"
echo "benchmark-config-filename=${BENCHMARK_CONFIG_FILENAME}" >> $GITHUB_OUTPUT

- name: Upload the spec
uses: seemethere/upload-artifact-s3@v5
Expand All @@ -143,7 +146,7 @@ jobs:
${{ github.repository }}/${{ github.run_id }}/artifacts/benchmark-configs/
retention-days: 1
if-no-files-found: error
path: extension/benchmark/apple/Benchmark/${{ matrix.model }}_${{ matrix.config }}.json
path: extension/benchmark/apple/Benchmark/${{ steps.prepare.outputs.benchmark-config-filename }}.json

export-models:
name: export-models
Expand Down
Loading