3939 runs-on : ubuntu-latest
4040 permissions :
4141 contents : read
42+ pull-requests : read # Read a stacked parent PR's head.
4243 if : >-
4344 github.event.pull_request.head.repo.full_name == github.repository &&
4445 (
5253 )
5354 outputs :
5455 skip-pr-sweep : ${{ steps.sweep_policy.outputs.skip-pr-sweep }}
56+ plan-base-ref : ${{ steps.stack_base.outputs.base-ref }}
57+ stack-parent-pr : ${{ steps.stack_base.outputs.parent-pr }}
5558 steps :
5659 - name : Reject conflicting sweep labels
5760 env :
9396 - name : Set up uv
9497 uses : astral-sh/setup-uv@20cfd1bf945f4377ade1205e4dbc17946fc9a30d # v10.0.1
9598
99+ - name : Resolve stacked append-only base
100+ id : stack_base
101+ env :
102+ GH_TOKEN : ${{ github.token }}
103+ PR_HEAD_SHA : ${{ github.event.pull_request.head.sha }}
104+ PR_NUMBER : ${{ github.event.pull_request.number }}
105+ run : |
106+ cd "$GITHUB_WORKSPACE/inferencex-e2e"
107+ uv run --no-project --exclude-newer PT12H --python 3.12 \
108+ --with "pydantic>=2" --with pyyaml python -m infx.workflows.stack_base \
109+ --repo "${GITHUB_REPOSITORY}" \
110+ --pr-number "${PR_NUMBER}" \
111+ --base-ref "origin/${GITHUB_BASE_REF}" \
112+ --head-ref "${PR_HEAD_SHA}" \
113+ --changelog-file perf-changelog.yaml
114+
96115 - name : Validate perf-changelog matrix
97116 env :
117+ PLAN_BASE_REF : ${{ steps.stack_base.outputs.base-ref }}
98118 PR_HEAD_SHA : ${{ github.event.pull_request.head.sha }}
99119 ALL_EVALS : ${{ contains(github.event.pull_request.labels.*.name, 'all-evals') }}
100120 EVALS_ONLY : ${{ contains(github.event.pull_request.labels.*.name, 'evals-only') }}
@@ -104,7 +124,7 @@ jobs:
104124 uv run --no-project --exclude-newer PT12H --python 3.12
105125 --with "pydantic>=2" --with pyyaml python -m infx.workflows.validate_perf_changelog
106126 --changelog-file perf-changelog.yaml
107- --base-ref "origin/${GITHUB_BASE_REF }"
127+ --base-ref "${PLAN_BASE_REF }"
108128 --head-ref "${PR_HEAD_SHA}"
109129 )
110130 if [ "$ALL_EVALS" = "true" ]; then
@@ -232,9 +252,19 @@ jobs:
232252 anthropic-api-key : ${{ secrets.ANTHROPIC_API_KEY }} # zizmor: ignore[secrets-outside-env]
233253 github-token : ${{ github.token }}
234254
255+ - name : Fetch stacked parent head
256+ if : needs.check-changelog.outputs.stack-parent-pr != ''
257+ env :
258+ PARENT_PR : ${{ needs.check-changelog.outputs.stack-parent-pr }}
259+ PLAN_BASE_REF : ${{ needs.check-changelog.outputs.plan-base-ref }}
260+ run : |
261+ git cat-file -e "${PLAN_BASE_REF}^{commit}" 2>/dev/null ||
262+ git fetch --no-tags origin "+refs/pull/${PARENT_PR}/head"
263+
235264 - id : setup
236265 env :
237266 PR_HEAD_SHA : ${{ github.event.pull_request.head.sha }}
267+ PLAN_BASE_REF : ${{ needs.check-changelog.outputs.plan-base-ref || format('origin/{0}', github.base_ref) }}
238268 PRIORITY_CRITERIA : ${{ steps.priority-criteria.outputs.criteria || '' }}
239269 ALL_EVALS : ${{ contains(github.event.pull_request.labels.*.name, 'all-evals') }}
240270 EVALS_ONLY : ${{ contains(github.event.pull_request.labels.*.name, 'evals-only') }}
@@ -245,7 +275,7 @@ jobs:
245275 uv run --no-project --exclude-newer PT12H --python 3.12 --with pydantic --with pyyaml \
246276 python -m infx.matrix.plan
247277 --changelog-file "${GITHUB_WORKSPACE}/inferencex-e2e/perf-changelog.yaml"
248- --base-ref "origin/${GITHUB_BASE_REF }"
278+ --base-ref "${PLAN_BASE_REF }"
249279 --head-ref "${PR_HEAD_SHA}"
250280 )
251281 if [ "$ALL_EVALS" = "true" ]; then
@@ -1013,16 +1043,21 @@ jobs:
10131043 steps :
10141044 - name : Update unofficial run visualizer links on PR
10151045 uses : actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
1046+ env :
1047+ # Video results live on the VideoGenX page, not the inference charts.
1048+ HAS_VIDEO : ${{ toJson(fromJson(needs.setup.outputs.search-space-config).single_node.video) != 'null' && toJson(fromJson(needs.setup.outputs.search-space-config).single_node.video) != '[]' }}
10161049 with :
10171050 github-token : ${{ github.token }}
10181051 script : |
10191052 const marker = '<!-- inferencex-unofficial-run-visualizer -->';
10201053 const inferenceUrl = `https://inferencex.semianalysis.com/inference?unofficialRun=${context.runId}`;
10211054 const evaluationUrl = `https://inferencex.semianalysis.com/evaluation?unofficialRun=${context.runId}`;
1055+ const videoUrl = `https://inferencex.semianalysis.com/vgx?unofficialRun=${context.runId}`;
10221056 const body = [
10231057 marker,
10241058 `View unofficial run (performance): ${inferenceUrl}`,
10251059 `View unofficial run (accuracy): ${evaluationUrl}`,
1060+ ...(process.env.HAS_VIDEO === 'true' ? [`View unofficial run (video): ${videoUrl}`] : []),
10261061 ].join('\n\n');
10271062 const comments = await github.paginate(github.rest.issues.listComments, {
10281063 ...context.repo,
0 commit comments