Skip to content

Cx Organization#1884

Open
JuanPedroGHM wants to merge 26 commits intomainfrom
cx/workflow_action_refactor
Open

Cx Organization#1884
JuanPedroGHM wants to merge 26 commits intomainfrom
cx/workflow_action_refactor

Conversation

@JuanPedroGHM
Copy link
Copy Markdown
Member

@JuanPedroGHM JuanPedroGHM commented Jun 13, 2025

Due Diligence

  • General:
  • Implementation:
    • unit tests: all split configurations tested
    • unit tests: multiple dtypes tested
    • NEW unit tests: MPS tested (1 MPI process, 1 GPU)
    • benchmarks: created for new functionality
    • benchmarks: performance improved or maintained
    • documentation updated where needed

Description

Goal is to organize our workflows by modularizing certain steps and jobs.
Reusable workflows should be turned into actions, that can be added onto larger workflows.

Anger towards #1937 made me finish this out of spite. It does all the changes proposed. Let's talk about what's missing.

Benchmarks are also working again.

What are we getting from this

  • More detailed test reports in gitlab and codecov (allegedly)
  • Actions that are easier to maintain and workflows that are easier to plan.

TODO

  • Clean-up secrets and old tokens
  • Change GH_TOKEN, CB cannot comment on pr's at the moment.
  • Restore full CI runs (after pr approved, and on main?)
  • Somehow test the weekly workflow.
  • Make sure special cases CI cases (support) are somehow handled properly.

See #1874 Cx section for rationale.

Changes proposed:

  • Weekly actions packed into weekly workflow
  • A single Github CI Action
  • A single Codebase CI Action
  • A single Benchmark trigger action
  • A PR open/update workflow
  • A PR approve workflow
  • A push to main workflow
  • NO MORE THANKING YOU FOR THE PR!

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Nov 3, 2025

This pull request is stale because it has been open for 60 days with no activity.

@github-actions github-actions Bot added the stale label Nov 3, 2025
@JuanPedroGHM JuanPedroGHM removed the stale label Nov 4, 2025
@JuanPedroGHM JuanPedroGHM modified the milestones: 1.7.0, 2.0 Dec 8, 2025
@brownbaerchen
Copy link
Copy Markdown
Collaborator

What is the status of this PR? Is this still relevant after #2139? Some things like removing thanking for PR are certainly still relevant but may be better merged separately.

@JuanPedroGHM JuanPedroGHM force-pushed the cx/workflow_action_refactor branch from 2f2694c to 7765578 Compare April 23, 2026 13:08
Copy link
Copy Markdown
Collaborator

@brownbaerchen brownbaerchen left a comment

Choose a reason for hiding this comment

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

Thanks for cleaning up all this stuff!

I left a few comments, but I have one larger issue outside of that, which is that no tests currently run on push to non-main branches, right?
I really like running the CI on push to any branch because I don't always run the entire test suite locally. Most of the time, I just run the tests I am working on and I know that I will get an email if I messed up something else. Or maybe the tests pass on my machine and not on GitHub or whatever. Or there is a new optional dependency that I have yet to install. Or maybe I just forgot to check different number of tasks.
I think it's really nice to be able to run the CI on push on my fork before doing a PR because then I can fix failures without sending out a bunch of emails to everybody.

Unfortunately, this is a bit tricky to implement in this framework because we don't want duplicate runs when pushing to a branch within the main repository that is currently part of a PR. There needs to be some check that the CI on push is skipped if the repository is not a fork and if the branch is currently part of a PR or something like that.

What's your opinion on this?

Comment thread .github/actions/gh_tests/action.yml Outdated
Comment thread .github/actions/gh_tests/action.yml Outdated
Comment thread .github/actions/gh_tests/action.yml Outdated
Comment thread .github/actions/gh_tests/action.yml Outdated
Comment thread .github/actions/gh_tests/action.yml Outdated
shell: bash
run: |
pip install pytest
pip install ${{ inputs.pytorch-version }} ${{ inputs.install-options }} --extra-index-url https://download.pytorch.org/whl/cpu
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Note that this will then only check with the additional optional dependencies installed, which I think is fine. Actually, I have suggested this myself in #2196, but @mtar wanted to keep a run with no optional dependencies. I am indifferent as long as they run concurrently.

@github-project-automation github-project-automation Bot moved this from Todo to In Progress in Roadmap Apr 24, 2026
@JuanPedroGHM
Copy link
Copy Markdown
Member Author

Hi @brownbaerchen, I forgot how quickly you answer reviews. There were some changes that needed to be tested. But I think the current version now addresses most of the issues you mentioned.

  • push_other.yml is meant to run only on branches without a PR or forks.
  • Dependencies have been changed to .[dev]
  • Restored the full CI matrix for pushes to main and stable.
  • Using uv for caching and faster dependency installation.
  • Restored the push_support action for testing newer pytorch versions.

brownbaerchen
brownbaerchen previously approved these changes Apr 24, 2026
Copy link
Copy Markdown
Collaborator

@brownbaerchen brownbaerchen left a comment

Choose a reason for hiding this comment

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

This is great, thanks!

I don't really see the point in the quick CI, to be honest. To me, the current lean CI is fast enough. So I would stick to the current medium and full, while renaming medium to quick just to keep the workflows simpler.
But I am also fine with what the state is now. You (or any other reviewer) choose.

Comment thread .github/workflows/pr_update.yml Outdated
@github-project-automation github-project-automation Bot moved this from In Progress to Merge queue in Roadmap Apr 24, 2026
@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 24, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 91.71%. Comparing base (991f913) to head (46b29a4).
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1884   +/-   ##
=======================================
  Coverage   91.71%   91.71%           
=======================================
  Files          86       86           
  Lines       14221    14221           
=======================================
  Hits        13043    13043           
  Misses       1178     1178           
Flag Coverage Δ
unit 91.71% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@brownbaerchen
Copy link
Copy Markdown
Collaborator

brownbaerchen commented Apr 27, 2026

We need to merge #2262 before this one in order to run the optional IO tests. That's probably also why coverage is reduced currently..

@JuanPedroGHM
Copy link
Copy Markdown
Member Author

I fixed the issues with the access token, wrote more documentation on the CX repository, and added the necessary setting for the support new pytorch version workflow. The last pipeline ran without any issue. Ready to merge in my opinion, @brownbaerchen @mtar.

Copy link
Copy Markdown
Collaborator

@brownbaerchen brownbaerchen left a comment

Choose a reason for hiding this comment

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

I actually noticed a few things I hadn't before:

  • We should trigger more CI on PR open and synchronize
  • We may want to limit CI runs on dependabot PRs, but not as much as we are currently doing

Then again, I may be misunderstanding some stuff. So feel free to dismiss the comments if they don't make sense.

Comment on lines 7 to 10
paths:
- 'heat/**'
- 'tests/**'
- 'pyproject.toml'
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

One issue that came up is the update of the setup-mpi action. The dependabot PR doesn't trigger any CI action in the current main. Luckily, we know there are issues and so I ran the CI on this manually and indeed it failed. had we not known that, I would want to know at least when the PR is merged into main. So maybe always run the CI on push to main? Not sure what's the best way of handling this..
Maybe we should bring back the medium CI on dependabot PRs. The quick one would pass with the setup-MPI thing.

The suggestion diff is messed up. I want to remove all paths, not just the last one.

Suggested change
- 'pyproject.toml'

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

This would get tested anyway on any push to main, which should be enough for most dependabot updates. For the special cases, like the setup-mpi actions, triggering manually is fairly simple with a small commit.

Another option would be to just enable the quick tests when a PR is open, regardless of the source.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Is there a reason to only run the CI on push to main with changes to select paths?

Comment thread .github/workflows/push_main.yml
Comment thread .github/workflows/push_other.yml Outdated
Comment thread .github/workflows/push_support.yml Outdated
Comment thread .github/workflows/push_support.yml Outdated
Comment thread .github/workflows/pr_update.yml
Comment thread .github/workflows/pr_open.yml
@github-project-automation github-project-automation Bot moved this from Merge queue to In Progress in Roadmap Apr 28, 2026
Comment thread .github/workflows/push_main.yml Outdated
@JuanPedroGHM
Copy link
Copy Markdown
Member Author

Updates based on the review comments:

  • On Push PR also triggers when opening/reopening a PR, to get instant tests.
  • On Push PR, the github tests are closer to the medium tests, testing the oldest and newest python and pytorch versions, without any dependencies. It makes sense to do this, we would rather not find the compatibility issues after a merge to main.
  • Tests will still not run dependabot PR's, I don't think it makes sense 99% of the time, but they can be triggered manually by creating a "fake" commit if we feel the need to test it.

Copy link
Copy Markdown
Collaborator

@mtar mtar left a comment

Choose a reason for hiding this comment

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

Some action SHA pinning for security. It's non-critical code though.

Comment thread .github/workflows/push_other.yml Outdated
Comment thread .github/actions/gh_tests/action.yml Outdated
Comment thread .github/actions/gh_tests/action.yml Outdated
brownbaerchen
brownbaerchen previously approved these changes Apr 28, 2026
Comment on lines 7 to 10
paths:
- 'heat/**'
- 'tests/**'
- 'pyproject.toml'
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Is there a reason to only run the CI on push to main with changes to select paths?

@github-project-automation github-project-automation Bot moved this from In Progress to Merge queue in Roadmap Apr 28, 2026
@brownbaerchen brownbaerchen mentioned this pull request Apr 28, 2026
5 tasks
Co-authored-by: Michael Tarnawa <18899420+mtar@users.noreply.github.com>
@JuanPedroGHM
Copy link
Copy Markdown
Member Author

@brownbaerchen From your last comment: changes to github workflows will be tested on PR Open/Update (unless they have dependabot/** branch), to ensure that they work (just like the ones here), but I would say, once they work on the PR, there is no need to test them on main. Many dependabot merges won't clog the CI anymore. Same principle applies to documentation changes, or other non-source code changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Merge queue

Development

Successfully merging this pull request may close these issues.

[RFC] Technical Debt TODO

4 participants