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

Fix test spec for scheduled jobs #4734

Closed
wants to merge 1 commit into from
Closed
Changes from all 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
12 changes: 11 additions & 1 deletion .github/workflows/android-perf.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ on:
schedule:
- cron: 0 0 * * *
# Note: GitHub has an upper limit of 10 inputs
pull_request:
workflow_dispatch:
inputs:
models:
Expand Down Expand Up @@ -78,6 +79,7 @@ jobs:
models: ${{ steps.set-parameters.outputs.models }}
devices: ${{ steps.set-parameters.outputs.devices }}
delegates: ${{ steps.set-parameters.outputs.delegates }}
test_spec: ${{ steps.set-parameters.outputs.test_spec }}
steps:
- name: Set parameters
id: set-parameters
Expand All @@ -89,6 +91,7 @@ jobs:
CRON_DEFAULT_MODELS: "stories110M"
CRON_DEFAULT_DEVICES: "samsung_galaxy_s2x"
CRON_DEFAULT_DELEGATES: "xnnpack"
CRON_DEFAULT_TEST_SPEC: "https://ossci-android.s3.amazonaws.com/executorch/android-llm-device-farm-test-spec.yml"
run: |
set -ex
MODELS="${{ inputs.models }}"
Expand All @@ -103,6 +106,10 @@ jobs:
if [ -z "$DELEGATES" ]; then
DELEGATES="$CRON_DEFAULT_DELEGATES"
fi
TEST_SPEC="${{ inputs.test_spec }}"
if [ -z "$TEST_SPEC" ]; then
TEST_SPEC="$CRON_DEFAULT_TEST_SPEC"
fi

# Mapping devices to their corresponding device-pool-arn
declare -A DEVICE_POOL_ARNS
Expand All @@ -125,6 +132,7 @@ jobs:
MAPPED_ARNS_JSON=$(printf '%s\n' "${MAPPED_ARNS[@]}" | jq -R . | jq -s .)
echo "devices=$(echo "$MAPPED_ARNS_JSON" | jq -c .)" >> $GITHUB_OUTPUT
echo "delegates=$(echo $DELEGATES | jq -Rc 'split(",")')" >> $GITHUB_OUTPUT
echo "test_spec=$(echo $TEST_SPEC)" >> $GITHUB_OUTPUT

export-models:
name: export-models
Expand Down Expand Up @@ -254,6 +262,8 @@ jobs:
model: ${{ fromJson(needs.set-parameters.outputs.models) }}
delegate: ${{ fromJson(needs.set-parameters.outputs.delegates) }}
device: ${{ fromJson(needs.set-parameters.outputs.devices) }}
env:
test_spec: ${{ fromJson(needs.set-parameters.outputs.test_spec) }}
with:
device-type: android
runner: linux.2xlarge
Expand All @@ -268,6 +278,6 @@ jobs:
# TODO: Hard code llm_demo_bpe for now in this job.
android-app-archive: https://gha-artifacts.s3.amazonaws.com/${{ github.repository }}/${{ github.run_id }}/artifact/llm_demo_bpe/app-debug.apk
android-test-archive: https://gha-artifacts.s3.amazonaws.com/${{ github.repository }}/${{ github.run_id }}/artifact/llm_demo_bpe/app-debug-androidTest.apk
test-spec: ${{ inputs.test_spec }}
test-spec: ${test_spec}
guangy10 marked this conversation as resolved.
Show resolved Hide resolved
# Uploaded to S3 from the previous job
extra-data: https://gha-artifacts.s3.amazonaws.com/${{ github.repository }}/${{ github.run_id }}/artifact/${{ matrix.model }}_${{ matrix.delegate }}/model.zip
Loading