Skip to content

Add PR comment CI for AMD (MI300) - #48065

Merged
ydshieh merged 28 commits into
mainfrom
pr-ci-amd
Sep 7, 2026
Merged

ydshieh merged 28 commits into
mainfrom
pr-ci-amd

Conversation

@ydshieh

@ydshieh ydshieh commented Aug 18, 2026 •

Copy link
Copy Markdown
Collaborator

CPU CI GPU run-slow

Summary

  • Adds self-comment-ci-amd.yml — AMD equivalent of the Nvidia PR comment CI workflow
  • Triggered by run-slow comments (same as Nvidia), runs on hfc-amd-mi300 runners
  • Calls check_failed_tests_amd.yml (in hf-workflows) to bisect new failures and report back as a PR comment
  • Commit status context: pytest/custom-tests-amd

Dependencies

  • hf-workflows pr-ci-amd branch must be merged first (adds check_failed_tests_amd.yml + new inputs to AMD CI workflows)
  • optimum-amd/transformers_pr_ci Hub repo needs to be created

TODO before merge

  • Remove [tmp] hacks in self-comment-ci-amd.yml (pull_request trigger, hardcoded PR_COMMENT, bypassed timestamp check, missing if: guard)
  • Revert @pr-ci-amd → @main in self-comment-ci-amd.yml
  • Revert @pr-ci-amd → @main references in hf-workflows
  • Remove dummy assert 1 == 2 from tests/models/vit/test_modeling_vit.py
  • Restore all 4 jobs in self-scheduled-amd-mi300-caller.yml (currently stripped down for verification)

@github-actions

Copy link
Copy Markdown
Contributor

Workflow Run ⚙️

This comment contains run-slow, running the specified jobs on AMD:

models: ["models/vit"]

@github-actions

Copy link
Copy Markdown
Contributor

CI Results (AMD)

Workflow Run ⚙️

Commit Info

Context Commit Description
RUN 74a64004 workflow commit (merge commit)
PR 540339d7 branch commit (from PR)
main f9b76f2d base commit (on main)

✅ No failing test specific to this PR 🎉 👏 !

ydshieh and others added 10 commits August 18, 2026 18:19
Add `workflow_dispatch` inputs, `env` block for `prev_workflow_run_id` /
`other_workflow_run_id`, and a `setup` job that uploads these as an
artifact — matching the pattern in `self-scheduled-caller.yml`. Also
pass `commit_sha: \${{ github.sha }}` in every job's `with:` block so
the reusable workflow and `check_new_failures` have the correct SHA.

This allows triggering a run via push with a hardcoded
`prev_workflow_run_id` to verify the `check_new_failures` pipeline.

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
- trigger on push to pr-ci-amd branch
- set prev_workflow_run_id=31296988966 for bisection comparison
- limit model-ci to models/vit for a quick test run
- point reusable workflows at @pr-ci-amd branch in hf-workflows

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
@github-actions

Copy link
Copy Markdown
Contributor

Workflow Run ⚙️

This comment contains run-slow, running the specified jobs on AMD:

models: ["models/vit"]

… comment CI verification

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
@HuggingFaceDocBuilderDev

Copy link
Copy Markdown

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.

@github-actions

Copy link
Copy Markdown
Contributor

CI Results (AMD)

Workflow Run ⚙️

Commit Info

Context Commit Description
RUN ef8df946 workflow commit (merge commit)
PR 98cb6b75 branch commit (from PR)
main f9b76f2d base commit (on main)

⚠️ No test being reported (job is skipped or cancelled)!

@github-actions

Copy link
Copy Markdown
Contributor

Workflow Run ⚙️

This comment contains run-slow, running the specified jobs on AMD:

models: ["models/vit"]

@github-actions

Copy link
Copy Markdown
Contributor

CI Results (AMD)

Workflow Run ⚙️

Commit Info

Context Commit Description
RUN 0ce2b853 workflow commit (merge commit)
PR 70712a04 branch commit (from PR)
main f9b76f2d base commit (on main)

✅ No failing test specific to this PR 🎉 👏 !

1 similar comment
@github-actions

Copy link
Copy Markdown
Contributor

CI Results (AMD)

Workflow Run ⚙️

Commit Info

Context Commit Description
RUN 0ce2b853 workflow commit (merge commit)
PR 70712a04 branch commit (from PR)
main f9b76f2d base commit (on main)

✅ No failing test specific to this PR 🎉 👏 !

@ydshieh

ydshieh commented Aug 18, 2026

Copy link
Copy Markdown
Collaborator Author

run-slow: vit

@github-actions

Copy link
Copy Markdown
Contributor

Workflow Run ⚙️

This comment contains run-slow, running the specified jobs:

models: ["models/vit"]
quantizations: []

@github-actions

Copy link
Copy Markdown
Contributor

CI Results

Workflow Run ⚙️

Commit Info

Context Commit Description
RUN 0ce2b853 workflow commit (merge commit)
PR 70712a04 branch commit (from PR)
main f9b76f2d base commit (on main)

⚠️ Model CI failed to report results

The test failure analysis could not be completed. Please check the workflow run for details.

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
@github-actions

Copy link
Copy Markdown
Contributor

Workflow Run ⚙️

This comment contains run-slow, running the specified jobs on AMD:

models: ["models/vit"]

@github-actions

Copy link
Copy Markdown
Contributor

CI Results

Workflow Run ⚙️

Commit Info

Context Commit Description
RUN 0ce2b853 workflow commit (merge commit)
PR 70712a04 branch commit (from PR)
main f9b76f2d base commit (on main)

Model CI Report

❌ 1 new failed tests from this PR 😭

  • vit:
    tests/models/vit/test_modeling_vit.py::ViTModelIntegrationTest::test_dummy_failure_for_pr_ci_amd_verification (✅ ⟹ ❌)

@github-actions

Copy link
Copy Markdown
Contributor

CI Results (AMD)

Workflow Run ⚙️

Commit Info

Context Commit Description
RUN e8afd1bc workflow commit (merge commit)
PR dbc2030f branch commit (from PR)
main f9b76f2d base commit (on main)

✅ No failing test specific to this PR 🎉 👏 !

2 similar comments
@github-actions

Copy link
Copy Markdown
Contributor

CI Results (AMD)

Workflow Run ⚙️

Commit Info

Context Commit Description
RUN e8afd1bc workflow commit (merge commit)
PR dbc2030f branch commit (from PR)
main f9b76f2d base commit (on main)

✅ No failing test specific to this PR 🎉 👏 !

@github-actions

Copy link
Copy Markdown
Contributor

CI Results (AMD)

Workflow Run ⚙️

Commit Info

Context Commit Description
RUN e8afd1bc workflow commit (merge commit)
PR dbc2030f branch commit (from PR)
main f9b76f2d base commit (on main)

✅ No failing test specific to this PR 🎉 👏 !

@github-actions

Copy link
Copy Markdown
Contributor

Workflow Run ⚙️

This comment contains run-slow, running the specified jobs on AMD:

models: ["models/vit"]

@github-actions

Copy link
Copy Markdown
Contributor

CI Results (AMD)

Workflow Run ⚙️

Commit Info

Context Commit Description
RUN 5e3da2c6 workflow commit (merge commit)
PR bd34ad39 branch commit (from PR)
main 94f09cfe base commit (on main)

Model CI Report

❌ 1 new failed tests from this PR 😭

  • vit:
    tests/models/vit/test_modeling_vit.py::ViTModelIntegrationTest::test_dummy_failure_for_pr_ci_amd_verification (✅ ⟹ ❌)

@github-actions

Copy link
Copy Markdown
Contributor

Workflow Run ⚙️

This comment contains run-slow, running the specified jobs on AMD:

models: ["models/vit"]

@github-actions

Copy link
Copy Markdown
Contributor

CI Results (AMD)

Workflow Run ⚙️

Commit Info

Context Commit Description
RUN 46745fb9 workflow commit (merge commit)
PR 66207fc4 branch commit (from PR)
main 94f09cfe base commit (on main)

✅ No failing test specific to this PR 🎉 👏 !

@github-actions

Copy link
Copy Markdown
Contributor

CI Results (AMD)

Workflow Run ⚙️

Commit Info

Context Commit Description
RUN 5e3da2c6 workflow commit (merge commit)
PR bd34ad39 branch commit (from PR)
main 94f09cfe base commit (on main)

Model CI Report

❌ 1 new failed tests from this PR 😭

  • vit:
    tests/models/vit/test_modeling_vit.py::ViTModelIntegrationTest::test_dummy_failure_for_pr_ci_amd_verification (✅ ⟹ ❌)

@github-actions

Copy link
Copy Markdown
Contributor

[For maintainers] Suggested jobs to run (before merge)

run-slow: vit

@github-actions

Copy link
Copy Markdown
Contributor

Workflow Run ⚙️

This comment contains run-slow, running the specified jobs on AMD:

models: ["models/vit"]

@github-actions

Copy link
Copy Markdown
Contributor

CI Results (AMD)

Workflow Run ⚙️

Commit Info

Context Commit Description
RUN 30aad1bd workflow commit (merge commit)
PR 49dff2e1 branch commit (from PR)
main fe1dfb38 base commit (on main)

Model CI Report

❌ 1 new failed tests from this PR 😭

  • vit:
    tests/models/vit/test_modeling_vit.py::ViTModelIntegrationTest::test_dummy_failure_for_pr_ci_amd_verification (✅ ⟹ ❌)

@github-actions

Copy link
Copy Markdown
Contributor

Workflow Run ⚙️💔 This comment contains run-slow, but unknown error occurred and the workflow run aborted! (AMD CI)

@github-actions

Copy link
Copy Markdown
Contributor

Workflow Run ⚙️

This comment contains run-slow, running the specified jobs on AMD:

models: ["models/vit"]

@github-actions

Copy link
Copy Markdown
Contributor

CI Results (AMD)

Workflow Run ⚙️

Commit Info

Context Commit Description
RUN c0a74fad workflow commit (merge commit)
PR bba225aa branch commit (from PR)
main 50adfa19 base commit (on main)

✅ No failing test specific to this PR 🎉 👏 !

ydshieh and others added 3 commits August 25, 2026 17:11
… single-artifact issue

When only one artifact exists in a workflow run, actions/download-artifact
(upstream, not our fork) extracts files directly to workspace root instead
of a named subdir (artifacts.length===1 branch). This breaks
notification_service.py's retrieve_available_artifacts() which scans for
*_test_reports directories, causing KeyError: 'Models'.

The Nvidia PR comment CI avoids this because daily-ci_reusable.yml always
runs run_extract_warnings which uploads warnings_in_ci, ensuring 2+ artifacts.
AMD has no equivalent yet, so upload a dummy artifact here as a temporary
workaround until a proper solution is added on the reusable workflow side.

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
@github-actions

Copy link
Copy Markdown
Contributor

Workflow Run ⚙️

This comment contains run-slow, running the specified jobs on AMD:

models: ["models/vit"]

@github-actions

Copy link
Copy Markdown
Contributor

CI Results (AMD)

Workflow Run ⚙️

Commit Info

Context Commit Description
RUN c9760df2 workflow commit (merge commit)
PR e001beb2 branch commit (from PR)
main 50adfa19 base commit (on main)

Model CI Report

❌ 1 new failed tests from this PR 😭

  • vit:
    tests/models/vit/test_modeling_vit.py::ViTModelIntegrationTest::test_dummy_failure_for_pr_ci_amd_verification (✅ ⟹ ❌)

ydshieh and others added 4 commits August 25, 2026 17:59
…ller pattern

- Add workflow_dispatch inputs, env block, and setup job (mirroring self-scheduled-caller.yml)
- Restore torch-pipeline, example-ci, deepspeed-ci jobs with commit_sha
- Fix runner_group hfc-amd-mi300 -> amd-mi300
- Clear hardcoded prev_workflow_run_id

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
- Add workflow_dispatch inputs, env block, and setup job (mirroring self-scheduled-caller.yml)
- Restore torch-pipeline, example-ci, deepspeed-ci jobs
- Use correct commit_sha: github.event.workflow_run.head_sha || github.sha (from self-nightly-caller.yml pattern)

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
- Remove pull_request: trigger (only needed for testing before merge)
- Restore if: condition on get-pr-number job
- Restore real timestamp security check (replace echo "bonbon")
- Revert PR_COMMENT to github.event.comment.body
- Fix model-ci to use @main instead of @pr-ci-amd

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
@github-actions

Copy link
Copy Markdown
Contributor

CI recap

Dashboard: View test results in Grafana
Latest run: 32869233279:1
Result: success | Jobs: 2 | Tests: 25 | Failures: 0 | Duration: 2m 5s

@ydshieh ydshieh changed the title [WIP] Add PR comment CI for AMD (MI300) Add PR comment CI for AMD (MI300) Sep 7, 2026
@ydshieh
ydshieh merged commit e898a10 into main Sep 7, 2026
29 checks passed
@ydshieh
ydshieh deleted the pr-ci-amd branch September 7, 2026 14:45
sbucaille pushed a commit to sbucaille/transformers that referenced this pull request Sep 16, 2026
* sync AMD MI300 scheduled caller with Nvidia caller pattern

Add `workflow_dispatch` inputs, `env` block for `prev_workflow_run_id` /
`other_workflow_run_id`, and a `setup` job that uploads these as an
artifact — matching the pattern in `self-scheduled-caller.yml`. Also
pass `commit_sha: \${{ github.sha }}` in every job's `with:` block so
the reusable workflow and `check_new_failures` have the correct SHA.

This allows triggering a run via push with a hardcoded
`prev_workflow_run_id` to verify the `check_new_failures` pipeline.

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>

* [tmp] configure AMD MI300 caller for check_new_failures verification

- trigger on push to pr-ci-amd branch
- set prev_workflow_run_id=31296988966 for bisection comparison
- limit model-ci to models/vit for a quick test run
- point reusable workflows at @pr-ci-amd branch in hf-workflows

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>

* [tmp] add dummy failing test in ViT to verify AMD check_new_failures

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>

* [tmp] keep only model-ci job in AMD MI300 caller for verification

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>

* [tmp] retrigger AMD CI run with 1gpu-only hf-workflows

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>

* [tmp] use @testing branch of hf-workflows for AMD CI verification

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>

* [tmp] use hfc-amd-mi300 runner group for verification run

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>

* Add PR comment CI workflow for AMD (self-comment-ci-amd.yml)

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>

* [tmp] point model-ci at @pr-ci-amd branch of hf-workflows for testing

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>

* [tmp] add TODO comments on hacks for pipeline verification

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>

* [tmp] add dummy slow failing test in ViT integration tests for AMD PR comment CI verification

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>

* [tmp] retrigger CI run

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>

* [tmp] add debug prints to notification_service.py to diagnose KeyError: 'Models'

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>

* [tmp] extend debug prints with cwd and full listdir

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>

* Remove debug prints from notification_service.py

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>

* Add setup job to upload setup_values artifact in AMD PR CI

Nvidia's daily-ci_reusable.yml always uploads a warnings_in_ci artifact
(via run_extract_warnings) before send_results, ensuring artifacts.length>1
so ydshieh/download-artifact creates named subdirs for test report artifacts.
AMD has no equivalent, so with only 1 test report artifact, files land at
workspace root and notification_service.py can't find them -> KeyError.

Fix: add setup job (mirroring self-scheduled-amd-mi300-caller.yml) that
uploads setup_values artifact, ensuring 2 artifacts exist when slack-report
downloads them.

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>

* trigger CI run

* Update AMD PR CI slack channel to #amd-transformers-pr-ci

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>

* trigger CI run

* trigger CI run

* trigger CI run

* Add dummy artifact upload as workaround for actions/download-artifact single-artifact issue

When only one artifact exists in a workflow run, actions/download-artifact
(upstream, not our fork) extracts files directly to workspace root instead
of a named subdir (artifacts.length===1 branch). This breaks
notification_service.py's retrieve_available_artifacts() which scans for
*_test_reports directories, causing KeyError: 'Models'.

The Nvidia PR comment CI avoids this because daily-ci_reusable.yml always
runs run_extract_warnings which uploads warnings_in_ci, ensuring 2+ artifacts.
AMD has no equivalent yet, so upload a dummy artifact here as a temporary
workaround until a proper solution is added on the reusable workflow side.

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>

* Move dummy artifact upload just before model-ci with correct if condition

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>

* Use create_run as dependency for upload_dummy_artifact

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>

* Remove temporary dummy failing tests from ViT test file

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>

* Clean up self-scheduled-amd-mi300-caller.yml: align with Nvidia CI caller pattern

- Add workflow_dispatch inputs, env block, and setup job (mirroring self-scheduled-caller.yml)
- Restore torch-pipeline, example-ci, deepspeed-ci jobs with commit_sha
- Fix runner_group hfc-amd-mi300 -> amd-mi300
- Clear hardcoded prev_workflow_run_id

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>

* Align self-scheduled-amd-mi300-caller.yml with Nvidia CI caller pattern

- Add workflow_dispatch inputs, env block, and setup job (mirroring self-scheduled-caller.yml)
- Restore torch-pipeline, example-ci, deepspeed-ci jobs
- Use correct commit_sha: github.event.workflow_run.head_sha || github.sha (from self-nightly-caller.yml pattern)

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>

* Clean up self-comment-ci-amd.yml: remove temporary testing hacks

- Remove pull_request: trigger (only needed for testing before merge)
- Restore if: condition on get-pr-number job
- Restore real timestamp security check (replace echo "bonbon")
- Revert PR_COMMENT to github.event.comment.body
- Fix model-ci to use @main instead of @pr-ci-amd

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>

---------

Co-authored-by: ydshieh <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants