Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add a workflow for updating torch-mlir #14952

Closed
wants to merge 1 commit into from
Closed

Conversation

dan-garvey
Copy link
Contributor

No description provided.

@dan-garvey
Copy link
Contributor Author

@ScottTodd don't review yet, I dont have a way of testing syntax figured out locally so I'm using github

@dan-garvey dan-garvey force-pushed the roll_torchmlir branch 4 times, most recently from 4928960 to 6af80d0 Compare September 11, 2023 19:23
@dan-garvey
Copy link
Contributor Author

Ok, seems safe to try it now. Afaik there is no way to test this without merging it and running it.

update torch-mlir version
committer: Roll torch-mlir <[email protected]>>
title: "[roll torch-mlir] update torch-mlir"
token: ${{ secrets.WRITE_ACCESS_TOKEN }}
Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

In this situation, it will approve it but doesn't someone still have to come and merge it after seeing if checks pass?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

So I guess in that case someone is saved the few seconds of approving before merging?

Copy link
Contributor

@pzread pzread Sep 11, 2023

Choose a reason for hiding this comment

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

I think this line also enables the auto-merge on the PR, so once the bot approves it (and the tests passed), the PR will be auto-merged

https://github.com/openxla/openxla-pjrt-plugin/blob/97deaf61dac7826a3fefaa5d4d3598e46e558026/.github/workflows/roll_nightly_deps.yml#L77C1-L77C1

Not sure if peter-evans/create-pull-request offers the same option

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm silly. Thanks. I'll just switch to using the gh cli like the one there

on:
schedule:
- cron: '0 13 * * *'
workflow_dispatch:
Copy link
Contributor

@pzread pzread Sep 11, 2023

Choose a reason for hiding this comment

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

You can temporarily add pull_request: here to test workflow until the creating PR step, which might be still helpful

@dan-garvey dan-garvey force-pushed the roll_torchmlir branch 8 times, most recently from 3125159 to 7424269 Compare September 11, 2023 23:15
@dan-garvey
Copy link
Contributor Author

dan-garvey commented Sep 12, 2023

remote: Permission to openxla/iree.git denied to github-actions[bot].

am I doing something wrong with the GH_TOKEN?

Copy link
Member

Choose a reason for hiding this comment

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

Ok, seems safe to try it now. Afaik there is no way to test this without merging it and running it.

You can test on your fork. Some of the commit author and token details will be a little different, but the rest should all be the same.

@@ -0,0 +1,65 @@
name: Roll PyTorch
Copy link
Member

Choose a reason for hiding this comment

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

It isn't clear to me from this PR and the code what exactly this is trying to do. Can you add PR description and maybe a comment in the file?

  • Is this creating pull requests that trigger CI jobs?
  • Is it committing directly to main?
  • How are commits selected?

Comment on lines +41 to +50
initial_sha="$(git rev-parse --short HEAD)"
echo "$initial_sha"
git fetch --tags origin
git checkout origin/main
new_sha="$(git rev-parse --short HEAD)"
echo "$new_sha"
if [ "$initial_sha" == "$new_sha" ]; then
echo "No updates made"
else
echo "SHA changed, updating submodule"
Copy link
Member

Choose a reason for hiding this comment

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

If this logic gets any more complicated, it should be extracted into a script that can be run locally by developers (for debugging and manual updates), then the workflow should run the script. Any committing and PR creation details should still go in the workflow file.

@benvanik
Copy link
Collaborator

benvanik commented May 9, 2024

@dan-garvey please close if stale

@ScottTodd
Copy link
Member

Superceded by #17236

@ScottTodd ScottTodd closed this May 9, 2024
@ScottTodd ScottTodd deleted the roll_torchmlir branch May 9, 2024 20:40
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.

4 participants