Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
22bf2e9398 | ||
|
|
99a0b66224 |
@@ -1,6 +1,10 @@
|
||||
## Rig bench submission
|
||||
|
||||
<!-- This PR was auto-generated by `bash scripts/submit-bench.sh --auto-submit --tag <TAG>`. -->
|
||||
> ⚠ Most bench submissions go through an issue (see `CONTRIBUTING.md` "Submitting your bench").
|
||||
> This PR template is for contributors who explicitly chose the direct-PR path.
|
||||
> The maintainer may redirect to an issue thread before merge.
|
||||
|
||||
<!-- This PR was auto-generated by `bash scripts/submit-bench.sh --auto-submit --as-pr --tag <TAG>`. -->
|
||||
<!-- Review the row below; the PR reviewer may move it within the target section. -->
|
||||
|
||||
### New row
|
||||
|
||||
@@ -16,6 +16,16 @@ history; SemVer takes over from `v0.3.0` onward.
|
||||
|
||||
---
|
||||
|
||||
## v0.5.3 — 2026-05-13
|
||||
|
||||
|
||||
### ✨ Features
|
||||
|
||||
- feat(scripts): add submit-bench flow ([ef77032](https://github.com/noonghunna/club-3090/commit/ef770322f43724f612a80393f547e5da218b5bf7))
|
||||
|
||||
|
||||
|
||||
[Pin: `git checkout v0.5.3`] · [Full diff](https://github.com/noonghunna/club-3090/compare/v0.5.2...v0.5.3)
|
||||
## v0.5.2 — 2026-05-13
|
||||
|
||||
|
||||
|
||||
+17
-5
@@ -47,23 +47,35 @@ Two GitHub channels, two different shapes of conversation. Picking the right one
|
||||
|
||||
## Submitting your bench
|
||||
|
||||
After running `bash scripts/rebench-full.sh`, contribute your numbers to `BENCHMARKS.md` with:
|
||||
The matrix is hand-curated — the canonical path is to file an **issue** with your rig + numbers; we'll review, ask clarifying questions, and integrate.
|
||||
|
||||
After running `bash scripts/rebench-full.sh`, generate a paste-ready row:
|
||||
|
||||
```bash
|
||||
bash scripts/submit-bench.sh --tag <your-tag>
|
||||
```
|
||||
|
||||
This generates a paste-ready row at `results/rebench/<tag>/BENCHMARKS-row.md`. Review it, then either auto-submit or open the PR manually.
|
||||
The script writes `results/rebench/<tag>/BENCHMARKS-row.md`. To submit:
|
||||
|
||||
Auto-submit opens a PR via GitHub CLI:
|
||||
### Path A — Auto-issue (recommended, requires `gh auth login`)
|
||||
|
||||
```bash
|
||||
bash scripts/submit-bench.sh --tag <your-tag> --auto-submit
|
||||
```
|
||||
|
||||
Manual path: paste the row into the appropriate `BENCHMARKS.md` section and open a PR yourself.
|
||||
Opens an issue via `gh issue create` with your rig + row pre-filled.
|
||||
|
||||
Auto-submit assumes `gh auth status` is configured. If it is not, run `gh auth login` first.
|
||||
### Path B — Manual issue (no tools beyond browser)
|
||||
|
||||
Open https://github.com/noonghunna/club-3090/issues/new?template=numbers-from-your-rig.yml and paste the row + your `rig.txt` into the body.
|
||||
|
||||
### Path C — Direct PR (advanced)
|
||||
|
||||
```bash
|
||||
bash scripts/submit-bench.sh --tag <your-tag> --auto-submit --as-pr
|
||||
```
|
||||
|
||||
For contributors who know the `BENCHMARKS.md` section structure and want to propose the exact row. The maintainer may still redirect to an issue thread for context-gathering before merge — direct PRs aren't a fast-path bypass.
|
||||
|
||||
---
|
||||
|
||||
|
||||
+87
-16
@@ -5,6 +5,7 @@
|
||||
# Usage:
|
||||
# bash scripts/submit-bench.sh --tag <tag>
|
||||
# bash scripts/submit-bench.sh --tag <tag> --auto-submit
|
||||
# bash scripts/submit-bench.sh --tag <tag> --auto-submit --as-pr
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
@@ -13,6 +14,7 @@ cd "$ROOT_DIR"
|
||||
|
||||
TAG=""
|
||||
AUTO_SUBMIT=0
|
||||
AS_PR=0
|
||||
SECTION_OVERRIDE=""
|
||||
|
||||
usage() {
|
||||
@@ -40,6 +42,10 @@ while [[ $# -gt 0 ]]; do
|
||||
AUTO_SUBMIT=1
|
||||
shift
|
||||
;;
|
||||
--as-pr)
|
||||
AS_PR=1
|
||||
shift
|
||||
;;
|
||||
--section)
|
||||
[[ $# -ge 2 ]] || die "--section requires a value"
|
||||
SECTION_OVERRIDE="$2"
|
||||
@@ -135,6 +141,35 @@ PY
|
||||
fi
|
||||
}
|
||||
|
||||
write_issue_body() {
|
||||
local body_file="$1"
|
||||
local row="$2"
|
||||
local tag="$3"
|
||||
local section="$4"
|
||||
|
||||
# The repo's numbers-from-your-rig issue template is a structured YAML form
|
||||
# with required textarea/dropdown fields. `gh issue create --template` opens
|
||||
# that interactive form shape, which is not useful once submit-bench has
|
||||
# already generated the structured report. Use a direct markdown body instead.
|
||||
{
|
||||
echo "**Compose / section**: \`${section}\`"
|
||||
echo
|
||||
echo "**Rig**:"
|
||||
echo
|
||||
echo '```text'
|
||||
cat "${TAG_DIR}/rig.txt"
|
||||
echo '```'
|
||||
echo
|
||||
echo "**Proposed BENCHMARKS.md row**:"
|
||||
echo
|
||||
echo "$row"
|
||||
echo
|
||||
echo "**Full report**: \`results/rebench/${tag}/REPORT.md\`"
|
||||
echo
|
||||
echo "**Generated row file**: \`results/rebench/${tag}/BENCHMARKS-row.md\`"
|
||||
} > "$body_file"
|
||||
}
|
||||
|
||||
insert_row() {
|
||||
local section="$1"
|
||||
local row="$2"
|
||||
@@ -186,8 +221,24 @@ PY
|
||||
}
|
||||
|
||||
if [[ "$AUTO_SUBMIT" -ne 1 ]]; then
|
||||
echo "Inspect at ${OUTPUT}. To submit:"
|
||||
echo " bash scripts/submit-bench.sh --tag ${TAG} --auto-submit"
|
||||
cat <<EOF
|
||||
Inspect at ${OUTPUT}. Three ways to land it (recommended order):
|
||||
|
||||
1. Issue + maintainer integrates (preferred — vetting before merge):
|
||||
bash scripts/submit-bench.sh --tag ${TAG} --auto-submit
|
||||
(opens an issue via \`gh issue create\`)
|
||||
Or, no-gh-needed:
|
||||
https://github.com/noonghunna/club-3090/issues/new?template=numbers-from-your-rig.yml
|
||||
— paste the contents of ${OUTPUT} + ${TAG_DIR}/rig.txt into the body
|
||||
|
||||
2. Direct PR (advanced — for contributors who know the matrix structure):
|
||||
bash scripts/submit-bench.sh --tag ${TAG} --auto-submit --as-pr
|
||||
Note: matrix is hand-curated; direct PRs may get redirected to an
|
||||
issue thread for context-gathering before merge.
|
||||
|
||||
3. Manual edit (zero tools):
|
||||
Paste the row from ${OUTPUT} into BENCHMARKS.md via the GitHub web editor.
|
||||
EOF
|
||||
exit 0
|
||||
fi
|
||||
|
||||
@@ -199,30 +250,50 @@ if [[ -n "$SECTION_OVERRIDE" ]]; then
|
||||
fi
|
||||
fi
|
||||
|
||||
TITLE="bench(matrix): @${BENCH_ROW_GITHUB_USER} $(bench_row_rig_shortname "$TAG_DIR")"
|
||||
PR_TITLE="bench(matrix): @${BENCH_ROW_GITHUB_USER} $(bench_row_rig_shortname "$TAG_DIR")"
|
||||
ISSUE_TITLE="[bench] @${BENCH_ROW_GITHUB_USER} $(bench_row_rig_shortname "$TAG_DIR")"
|
||||
BRANCH_USER="$(printf '%s' "${BENCH_ROW_GITHUB_USER}" | tr -cd '[:alnum:]_.-')"
|
||||
BRANCH_TAG="$(printf '%s' "${TAG}" | tr -cd '[:alnum:]_.-')"
|
||||
BRANCH="bench/${BRANCH_USER}-${BRANCH_TAG}"
|
||||
BODY_FILE="$TAG_DIR/PR-body.md"
|
||||
write_pr_body "$BODY_FILE" "$ROW" "$TAG"
|
||||
if [[ "$AS_PR" -eq 1 ]]; then
|
||||
BODY_FILE="$TAG_DIR/PR-body.md"
|
||||
write_pr_body "$BODY_FILE" "$ROW" "$TAG"
|
||||
else
|
||||
BODY_FILE="$TAG_DIR/ISSUE-body.md"
|
||||
write_issue_body "$BODY_FILE" "$ROW" "$TAG" "$SECTION"
|
||||
fi
|
||||
|
||||
if [[ "${GH_MOCK:-0}" == "1" ]]; then
|
||||
MOCK_LOG="$TAG_DIR/auto-submit-mock.log"
|
||||
{
|
||||
echo "git switch -c ${BRANCH}"
|
||||
echo "insert BENCHMARKS.md row under: ${SECTION}"
|
||||
echo "git commit -m ${TITLE}"
|
||||
echo "git push -u origin ${BRANCH}"
|
||||
echo "gh pr create --title ${TITLE} --body-file ${BODY_FILE}"
|
||||
} > "$MOCK_LOG"
|
||||
log "GH_MOCK=1 — wrote mocked auto-submit commands: ${MOCK_LOG}"
|
||||
log "PR title: ${TITLE}"
|
||||
if [[ "$AS_PR" -eq 1 ]]; then
|
||||
{
|
||||
echo "git switch -c ${BRANCH}"
|
||||
echo "insert BENCHMARKS.md row under: ${SECTION}"
|
||||
echo "git commit -m ${PR_TITLE}"
|
||||
echo "git push -u origin ${BRANCH}"
|
||||
echo "gh pr create --title ${PR_TITLE} --body-file ${BODY_FILE}"
|
||||
} > "$MOCK_LOG"
|
||||
log "GH_MOCK=1 — wrote mocked PR auto-submit commands: ${MOCK_LOG}"
|
||||
log "PR title: ${PR_TITLE}"
|
||||
else
|
||||
{
|
||||
echo "gh issue create --title ${ISSUE_TITLE} --body-file ${BODY_FILE} --label bench-contribution"
|
||||
} > "$MOCK_LOG"
|
||||
log "GH_MOCK=1 — wrote mocked issue auto-submit command: ${MOCK_LOG}"
|
||||
log "Issue title: ${ISSUE_TITLE}"
|
||||
fi
|
||||
exit 0
|
||||
fi
|
||||
|
||||
command -v gh >/dev/null 2>&1 || die "'gh' not found. Install GitHub CLI or submit manually."
|
||||
gh auth status >/dev/null 2>&1 || die "not authed with gh. Run: gh auth login"
|
||||
|
||||
if [[ "$AS_PR" -ne 1 ]]; then
|
||||
ISSUE_URL="$(gh issue create --title "$ISSUE_TITLE" --body-file "$BODY_FILE" --label bench-contribution)"
|
||||
log "Opened issue: ${ISSUE_URL}"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if ! git diff --quiet -- BENCHMARKS.md; then
|
||||
die "BENCHMARKS.md already has local edits; commit/stash them before --auto-submit"
|
||||
fi
|
||||
@@ -235,7 +306,7 @@ else
|
||||
fi
|
||||
insert_row "$SECTION" "$ROW"
|
||||
git add BENCHMARKS.md
|
||||
git commit -m "$TITLE"
|
||||
git commit -m "$PR_TITLE"
|
||||
git push -u origin "$BRANCH"
|
||||
PR_URL="$(gh pr create --title "$TITLE" --body-file "$BODY_FILE")"
|
||||
PR_URL="$(gh pr create --title "$PR_TITLE" --body-file "$BODY_FILE")"
|
||||
log "Opened PR: ${PR_URL}"
|
||||
|
||||
@@ -59,11 +59,15 @@ done
|
||||
tag="qwen-int8-pth-n4-2026-05-10"
|
||||
rm -f "results/rebench/${tag}/BENCHMARKS-row.md" \
|
||||
"results/rebench/${tag}/PR-body.md" \
|
||||
"results/rebench/${tag}/ISSUE-body.md" \
|
||||
"results/rebench/${tag}/auto-submit-mock.log"
|
||||
|
||||
out="$(bash scripts/submit-bench.sh --tag "$tag")"
|
||||
assert_contains "$out" "Generated BENCHMARKS row for section: Dual-card (2× RTX 3090, TP=2)"
|
||||
assert_contains "$out" "Wrote: results/rebench/${tag}/BENCHMARKS-row.md"
|
||||
assert_contains "$out" "1. Issue + maintainer integrates"
|
||||
assert_contains "$out" "2. Direct PR"
|
||||
assert_contains "$out" "3. Manual edit"
|
||||
test -s "results/rebench/${tag}/BENCHMARKS-row.md"
|
||||
|
||||
if out="$(bash scripts/submit-bench.sh --tag does-not-exist 2>&1)"; then
|
||||
@@ -73,14 +77,21 @@ fi
|
||||
assert_contains "$out" "tag dir not found: results/rebench/does-not-exist"
|
||||
|
||||
out="$(GH_MOCK=1 GH_MOCK_USER=octocat bash scripts/submit-bench.sh --tag "$tag" --auto-submit)"
|
||||
assert_contains "$out" "PR title: bench(matrix): @octocat ${tag}"
|
||||
assert_contains "$out" "Issue title: [bench] @octocat ${tag}"
|
||||
test -s "results/rebench/${tag}/auto-submit-mock.log"
|
||||
assert_contains "$(cat "results/rebench/${tag}/auto-submit-mock.log")" "gh pr create --title bench(matrix): @octocat ${tag}"
|
||||
assert_contains "$(cat "results/rebench/${tag}/auto-submit-mock.log")" "gh issue create --title [bench] @octocat ${tag}"
|
||||
test -s "results/rebench/${tag}/ISSUE-body.md"
|
||||
assert_contains "$(cat "results/rebench/${tag}/ISSUE-body.md")" "results/rebench/${tag}/REPORT.md"
|
||||
assert_contains "$(cat "results/rebench/${tag}/ISSUE-body.md")" "Proposed BENCHMARKS.md row"
|
||||
|
||||
out="$(GH_MOCK=1 GH_MOCK_USER=octocat bash scripts/submit-bench.sh --tag "$tag" --auto-submit --as-pr)"
|
||||
assert_contains "$out" "PR title: bench(matrix): @octocat ${tag}"
|
||||
test -s "results/rebench/${tag}/PR-body.md"
|
||||
assert_contains "$(cat "results/rebench/${tag}/auto-submit-mock.log")" "gh pr create --title bench(matrix): @octocat ${tag}"
|
||||
assert_contains "$(cat "results/rebench/${tag}/PR-body.md")" "results/rebench/${tag}/REPORT.md"
|
||||
|
||||
tmp_bin="$(mktemp -d)"
|
||||
trap 'rm -rf "$tmp_bin"; rm -f "results/rebench/${tag}/BENCHMARKS-row.md" "results/rebench/${tag}/PR-body.md" "results/rebench/${tag}/auto-submit-mock.log"' EXIT
|
||||
trap 'rm -rf "$tmp_bin"; rm -f "results/rebench/${tag}/BENCHMARKS-row.md" "results/rebench/${tag}/PR-body.md" "results/rebench/${tag}/ISSUE-body.md" "results/rebench/${tag}/auto-submit-mock.log"' EXIT
|
||||
cat > "${tmp_bin}/gh" <<'MOCK_GH'
|
||||
#!/usr/bin/env bash
|
||||
if [[ "$1" == "auth" && "$2" == "status" ]]; then
|
||||
|
||||
Reference in New Issue
Block a user