Skip to content

feat: report kernel bot upload results#1033

Merged
drbh merged 1 commit into
mainfrom
report-upload-results
Jul 20, 2026
Merged

feat: report kernel bot upload results#1033
drbh merged 1 commit into
mainfrom
report-upload-results

Conversation

@drbh

@drbh drbh commented Jul 17, 2026

Copy link
Copy Markdown
Collaborator

this PR implements two release upload features that build on recent kernel-builder changes.

first, it uses the --create-pr flag added in huggingface/kernels#694 when a kernel uploads to a Hub repo outside kernels-community. this lets CI upload kernels like MiniMaxAI/msa and sgl-project/sgl-flash-attn3 by opening Hub PRs instead of assuming we can push directly.

second, it uses the upload json output added in huggingface/kernels#716 so each build can write its upload result, the workflow can aggregate the results after the matrix completes, and the kernel bot can update its existing comment with the Hub repo / Hub PR links.

the main plumbing is:

  • resolve upload args from build.toml, using --create-pr for external repos and --repo-id for community repos
  • write kernel-builder upload --output-json results as short lived workflow artifacts
  • pass the kernel bot comment id through dispatch and update that comment from report-status
  • use the external Hub repo ids for msa and sgl-flash-attn3

added script usage

this script checks if the build should be a PR or not and creates the args needed to be passed to the upload command

uv run .github/scripts/hub_pr_upload_args.py upload-args msa kernels-community

outputs

--create-pr

and this script reads the json output and structures it into text that is appended to the kernel bot's last comment

uv run .github/scripts/format_hub_upload_comment.py msa kernels-community '{"pull_requests":[{"url":"https://hf.co/kernels/MiniMaxAI/msa/discussions/1"}]}'

outputs

Hub uploads:
- Hub repo: https://huggingface.co/kernels/MiniMaxAI/msa
- Hub pull request: https://hf.co/kernels/MiniMaxAI/msa/discussions/1

also ran the dispatch/pr bot tests, yaml parsing, py_compile, and diff whitespace checks.

TLDR; this PR improves uploads to respect creating PR's and better reporting on the results

@github-actions github-actions Bot added the feature New functionality / capability label Jul 17, 2026

@sayakpaul sayakpaul left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very cool!

@vasqu FYI. I think we should also do the same for #1010

Comment on lines +2 to +6
# Input:
# [--base <comment-body>] <kernel> <repo-prefix> <upload-json-or-path>...
#
# Output:
# A Hub upload section, or <comment-body> with that section updated.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(nit): Possible to include an actual representative example?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just below this section are some copy pastable commands to test the script and see the output. for example in the PR description above there is an example running the script and its output

I avoided including the string output in the comment in the case we tweak the formatting - however it should be very easy to run the command to see what the output would look like using on of the examples in the header comments

@drbh
drbh merged commit ccca001 into main Jul 20, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature New functionality / capability

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants