Skip to content
Open
Show file tree
Hide file tree
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
9 changes: 5 additions & 4 deletions .github/scripts/inference-publication.test.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,14 @@ async function status(eventName, publication, overrides = {}) {
const process = { env: {
SOURCE_SHA: 'a'.repeat(40), PLAN: 'success', RESULT: 'success',
PUBLICATION_REQUIRED: 'true', PUBLICATION: publication,
RUN_URL: 'https://example.invalid/run', ...overrides,
RUN_URL: 'https://example.invalid/run', PROFILE: 'nightly', COMPARISON: 'skipped', ...overrides,
} };
const github = { rest: { repos: {
createCommitStatus: async value => statuses.push(value),
} } };
await evaluate(process, github, { eventName, repo: { owner: 'Mesh-LLM', repo: 'skippy' } },
{ setFailed: message => failures.push(message) });
const summary = { addHeading() { return this; }, addRaw() { return this; }, async write() {} };
await evaluate(process, github, { eventName, repo: { owner: 'Mesh-LLM', repo: 'skippy' }, payload: { pull_request: { labels: [] } } },
{ summary, setFailed: message => failures.push(message) });
assert.equal(statuses.length, 1);
return { state: statuses[0].state, failures };
}
Expand All @@ -38,7 +39,7 @@ test('scheduled and manual nightly success requires successful publication', asy
});

test('PR qualification requires admission and skipped plans cannot satisfy it', async () => {
assert.deepEqual(await status('pull_request_target', 'skipped', { PUBLICATION_REQUIRED: 'false' }),
assert.deepEqual(await status('pull_request_target', 'skipped', { PUBLICATION_REQUIRED: 'false', PROFILE: 'pr', COMPARISON: 'success' }),
{ state: 'success', failures: [] });
const skipped = await status('pull_request_target', 'skipped', {
PUBLICATION_REQUIRED: '', PLAN: 'skipped', RESULT: 'skipped',
Expand Down
8 changes: 5 additions & 3 deletions .github/scripts/inference-schedule.test.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ const needs = (profile, result = 'success', event = github) => ({ plan: { result

test('scheduled Release calls do not select nightly smoke expansion or public metrics collection', () => {
const flags = [...workflow.matchAll(/^ +NIGHTLY_PUBLICATION: \$\{\{ (.+) \}\}$/gm)];
assert.equal(flags.length, 2);
assert.equal(flags.length, 1);
assert.match(workflow, /if \[\[ "\$PROFILE" == pr \|\| "\$PROFILE" == nightly \]\]; then flags\+=\(--collect-metrics\)/);
for (const [, expression] of flags) {
const enabled = new Function('github', 'steps', 'needs', `return (${expression});`);
assert.equal(enabled(github, steps('release'), needs('release')), 'false');
Expand Down Expand Up @@ -41,10 +42,11 @@ async function status(profile, publication, result = 'success', plan = 'success'
const statuses = [], failures = [];
await evaluate({ env: {
SOURCE_SHA: 'a'.repeat(40), PROFILE: profile, PLAN: plan, RESULT: result,
PUBLICATION_REQUIRED: String(profile === 'nightly'), PUBLICATION: publication, RUN_URL: 'https://example.invalid/run',
PUBLICATION_REQUIRED: String(profile === 'nightly'), COMPARISON: 'success', PUBLICATION: publication, RUN_URL: 'https://example.invalid/run',
} }, { eventName, repo: { owner: 'Mesh-LLM', repo: 'skippy' } }, {
rest: { repos: { createCommitStatus: async value => statuses.push(value) } },
}, { setFailed: message => failures.push(message) });
}, { setFailed: message => failures.push(message),
summary: { addHeading() { return this; }, addRaw() { return this; }, async write() {} } });
return { state: statuses[0].state, failures };
}

Expand Down
74 changes: 65 additions & 9 deletions .github/workflows/inference.yml
Original file line number Diff line number Diff line change
Expand Up @@ -100,13 +100,16 @@ jobs:
profile: ${{ steps.admission.outputs.profile || 'pr' }}
publication: ${{ steps.admission.outputs.publication }}
matrix: ${{ steps.matrix.outputs.matrix }}
controller: ${{ steps.controller.outputs.sha }}
steps:
# Credentialed controller source always comes from protected main.
# Candidate source is never checked out or executed by this workflow.
- uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09
with:
ref: ${{ (github.event_name == 'schedule' || (github.event_name == 'workflow_dispatch' && github.ref == 'refs/heads/main')) && github.sha || 'main' }}
persist-credentials: false
- id: controller
run: printf 'sha=%s\n' "$(git rev-parse HEAD)" >> "$GITHUB_OUTPUT"
- uses: ./.github/actions/setup
- id: admission
env:
Expand Down Expand Up @@ -139,19 +142,18 @@ jobs:
steps:
- uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09
with:
ref: ${{ (github.event_name == 'schedule' || (github.event_name == 'workflow_dispatch' && github.ref == 'refs/heads/main')) && github.sha || 'main' }}
ref: ${{ needs.plan.outputs.controller }}
persist-credentials: false
- uses: ./.github/actions/setup
- name: Dispatch and await native Spark qualification
env:
SOURCE_SHA: ${{ needs.plan.outputs.source }}
PROFILE: ${{ matrix.profile }}
CONFIGURATION: ${{ matrix.configuration }}
NIGHTLY_PUBLICATION: ${{ needs.plan.outputs.publication }}
JIANYANG_INFERENCE_SSH_KEY: ${{ secrets.JIANYANG_INFERENCE_SSH_KEY }}
run: |
flags=()
if [[ "$NIGHTLY_PUBLICATION" == true ]]; then flags+=(--collect-public); fi
if [[ "$PROFILE" == pr || "$PROFILE" == nightly ]]; then flags+=(--collect-metrics); fi
just inference-dispatch "$PROFILE" "$SOURCE_SHA" "$EVIDENCE" "$CONFIGURATION" "${flags[@]}"
- name: Cancel outstanding JY jobs and formations
if: cancelled() || failure()
Expand Down Expand Up @@ -190,7 +192,7 @@ jobs:
- uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c
continue-on-error: true
with:
pattern: inference-*-${{ github.run_id }}-${{ github.run_attempt }}
pattern: inference-*-${{ github.run_id }}-*
path: target/ci-evidence/nightly-inference
- name: Prepare reporting dependencies
env:
Expand Down Expand Up @@ -219,8 +221,46 @@ jobs:
path: target/ci-evidence/nightly-inference/publication-report.json
if-no-files-found: warn
retention-days: 30

compare:
name: Compare with published inference baseline
needs: [plan, qualification]
if: >-
always() && !cancelled() && needs.plan.result == 'success' &&
needs.plan.outputs.publication != 'true' &&
(github.event_name == 'pull_request_target' || github.event_name == 'workflow_dispatch') &&
(needs.plan.outputs.profile == 'pr' || needs.plan.outputs.profile == 'nightly')
runs-on: ${{ vars.SKIPPY_DEPOT_RUNNERS_ENABLED == 'true' && 'depot-ubuntu-24.04-4' || 'ubuntu-24.04' }}
timeout-minutes: 10
permissions:
contents: read
actions: read
steps:
- uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09
with:
ref: ${{ needs.plan.outputs.controller }}
persist-credentials: false
- name: Collect source-bound measurements
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c
continue-on-error: true
with:
# Failed-jobs-only reruns can retain successful configurations from prior attempts.
pattern: inference-*-${{ github.run_id }}-*
path: target/ci-evidence/inference-comparison
- name: Publish comparison charts and check for regressions
env:
GH_TOKEN: ${{ github.token }}
PROFILE: ${{ needs.plan.outputs.profile }}
SOURCE_SHA: ${{ needs.plan.outputs.source }}
MATRIX_RESULT: ${{ needs.qualification.result }}
run: |
RUN_STARTED_AT=$(gh api "repos/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID/attempts/$GITHUB_RUN_ATTEMPT" \
--jq '.run_started_at')
export RUN_STARTED_AT
just inference-compare target/ci-evidence/inference-comparison

summary:
needs: [plan, qualification, nightly_publish]
needs: [plan, qualification, nightly_publish, compare]
if: always() && needs.plan.result != 'skipped'
runs-on: ${{ vars.SKIPPY_DEPOT_RUNNERS_ENABLED == 'true' && 'depot-ubuntu-24.04-4' || 'ubuntu-24.04' }}
timeout-minutes: 5
Expand All @@ -234,20 +274,36 @@ jobs:
PLAN: ${{ needs.plan.result }}
RESULT: ${{ needs.qualification.result }}
PUBLICATION: ${{ needs.nightly_publish.result }}
COMPARISON: ${{ needs.compare.result }}
RELEASE_CANDIDATE: ${{ inputs.release_candidate }}
PUBLICATION_REQUIRED: ${{ needs.plan.outputs.publication }}
RUN_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
with:
script: |
const { SOURCE_SHA: sha, PROFILE: profile, PLAN: plan, RESULT: result, PUBLICATION: publication, RUN_URL: url } = process.env;
const { SOURCE_SHA: sha, PLAN: plan, RESULT: result, PUBLICATION: publication,
COMPARISON: comparison, PROFILE: profile, RELEASE_CANDIDATE: candidate, RUN_URL: url } = process.env;
if (!/^[a-f0-9]{40}$/i.test(sha)) throw new Error('Invalid qualification source SHA');
const pullRequest = context.eventName === 'pull_request_target';
const nightly = process.env.PUBLICATION_REQUIRED === 'true';
const compare = !nightly && (pullRequest || context.eventName === 'workflow_dispatch') &&
(profile === 'pr' || profile === 'nightly');
const passed = plan === 'success' && result === 'success' &&
(!nightly || publication === 'success');
(!nightly || publication === 'success') && (!compare || comparison === 'success');
const description = passed
? 'Native Spark lab qualification'
: nightly
? 'Nightly qualification or publication incomplete or failed'
: compare && result === 'success'
? 'Published baseline comparison failed or incomplete'
: 'Inference admission or qualification incomplete or failed';
if (plan !== 'success' || profile === 'release') {
const detail = plan !== 'success'
? 'Qualification did not reach the lab. See the admission job for details.'
: 'The release profile runs longer AgentX trials and has no matching published baseline.';
const outcome = passed ? 'Passed' : 'Failed';
await core.summary.addHeading('Inference qualification')
.addRaw(`**${outcome}** · \`${sha.slice(0, 12)}\`\n\n${detail}\n`, true).write();
}
await github.rest.repos.createCommitStatus({
...context.repo, sha, context: 'Inference qualification',
state: passed ? 'success' : 'failure', description, target_url: url
Expand All @@ -266,13 +322,13 @@ jobs:
steps:
- uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09
with:
ref: main
ref: ${{ needs.plan.outputs.controller }}
persist-credentials: false
- name: Collect controller receipts when available
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c
continue-on-error: true
with:
pattern: inference-*-${{ github.run_id }}-${{ github.run_attempt }}
pattern: inference-*-${{ github.run_id }}-*
path: target/inference-comment
merge-multiple: true
- name: Update the PR results comment
Expand Down
4 changes: 4 additions & 0 deletions Justfile
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,10 @@ ci-plan:
inference-plan profile source output="target/ci-evidence/inference-plan.json":
@"{{ automation_python }}" scripts/inference-plan.py plan "$@"

[positional-arguments]
inference-compare evidence:
@"{{ automation_python }}" scripts/inference-compare.py "$@"

process-supervision-test:
@cargo test --locked -p skippy-subprocess

Expand Down
11 changes: 11 additions & 0 deletions ci/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -267,6 +267,17 @@ the token. Public receipts contain aggregate results, source and workload
identities, and verdicts. Native logs, lab receipts, and native access
credentials stay in their existing systems.

Labeled PRs and manual smoke runs use
the same metric receipts and 1% tolerance to compare with the public dataset.
They read a pinned dataset revision anonymously and publish a chart and table
to the Actions summary. A regression, incomplete required lab evidence, or a
failure to read or verify the published baseline fails qualification. The
summary identifies measurements with no matching baseline, including before
the first nightly publication and when benchmark inputs change. The longer
`release` workload continues to use its lab qualification result because the
dataset has no comparable release workload. A merge to `main` adds no
qualification run.

Dispatch `inference.yml` on `main` with `profile=nightly` to run the same
nineteen-configuration matrix, collect public measurements, and publish the
report as a scheduled run. Both triggers require publication to succeed for
Expand Down
2 changes: 2 additions & 0 deletions docs/design/inference-qualification-examples/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,3 +62,5 @@ Two trials per configuration. Throughput and latency values are means of trial s
The ±1% rule expresses tolerance, not statistical significance. Comparisons preserve workload identity; a changed benchmark starts a new series.

[Full results and history](https://huggingface.co/datasets/meshllm/skippy-inference-qualification/tree/main/runs)

[Saved baseline snapshot](https://huggingface.co/datasets/meshllm/skippy-inference-qualification/blob/ffffffffffffffffffffffffffffffffffffffff/baselines.json)
Original file line number Diff line number Diff line change
Expand Up @@ -46,3 +46,5 @@ Two trials per configuration. Throughput and latency values are means of trial s
The ±1% rule expresses tolerance, not statistical significance. Comparisons preserve workload identity; a changed benchmark starts a new series.

[Full results and history](https://huggingface.co/datasets/meshllm/skippy-inference-qualification/tree/main/runs)

[Saved baseline snapshot](https://huggingface.co/datasets/meshllm/skippy-inference-qualification/blob/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee/baselines.json)
Original file line number Diff line number Diff line change
Expand Up @@ -53,3 +53,5 @@ Two trials per configuration. Throughput and latency values are means of trial s
The ±1% rule expresses tolerance, not statistical significance. Comparisons preserve workload identity; a changed benchmark starts a new series.

[Full results and history](https://huggingface.co/datasets/meshllm/skippy-inference-qualification/tree/main/runs)

[Saved baseline snapshot](https://huggingface.co/datasets/meshllm/skippy-inference-qualification/blob/ffffffffffffffffffffffffffffffffffffffff/baselines.json)
2 changes: 2 additions & 0 deletions docs/design/inference-qualification-examples/pr-pass.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,5 @@ Current values and signed changes against the saved reference, or the previous c
Smoke throughput uses scored request token totals divided by measured phase time. It is a different workload from nightly AgentX.

The ±1% rule expresses tolerance, not statistical significance. Comparisons preserve workload identity; a changed benchmark starts a new series.

[Saved baseline snapshot](https://huggingface.co/datasets/meshllm/skippy-inference-qualification/blob/ffffffffffffffffffffffffffffffffffffffff/baselines.json)
2 changes: 2 additions & 0 deletions docs/design/inference-qualification-examples/pr-regression.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,3 +44,5 @@ Current values and signed changes against the saved reference, or the previous c
Smoke throughput uses scored request token totals divided by measured phase time. It is a different workload from nightly AgentX.

The ±1% rule expresses tolerance, not statistical significance. Comparisons preserve workload identity; a changed benchmark starts a new series.

[Saved baseline snapshot](https://huggingface.co/datasets/meshllm/skippy-inference-qualification/blob/ffffffffffffffffffffffffffffffffffffffff/baselines.json)
Loading
Loading