Skip to content

Suggest jobs to use in run-slow #39100

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

Merged
merged 9 commits into from
Jul 1, 2025
Merged

Suggest jobs to use in run-slow #39100

merged 9 commits into from
Jul 1, 2025

Conversation

ydshieh
Copy link
Collaborator

@ydshieh ydshieh commented Jun 28, 2025

What does this PR do?

@ydshieh ydshieh force-pushed the better_workflows branch from 0ec25bf to 2631688 Compare June 28, 2025 15:35
@HuggingFaceDocBuilderDev

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.

Copy link
Contributor

github-actions bot commented Jul 1, 2025

Suggested jobs to run:\n

Copy link
Contributor

github-actions bot commented Jul 1, 2025

Suggested jobs to run:\nrun-slow: bark bert autoround fbgemm_fp8

@ydshieh
Copy link
Collaborator Author

ydshieh commented Jul 1, 2025

run-slow: bark, bert, autoround, fbgemm_fp8

1 similar comment
@ydshieh
Copy link
Collaborator Author

ydshieh commented Jul 1, 2025

run-slow: bark, bert, autoround, fbgemm_fp8

Copy link
Contributor

github-actions bot commented Jul 1, 2025

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

models: ['models/bark', 'models/bert']
quantizations: ['quantization/autoround', 'quantization/fbgemm_fp8'] ...

@ydshieh ydshieh force-pushed the better_workflows branch from f698c63 to c49e876 Compare July 1, 2025 13:27
Copy link
Contributor

github-actions bot commented Jul 1, 2025

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

run-slow: bark, bert, autoround, fbgemm_fp8

@ydshieh ydshieh force-pushed the better_workflows branch from 3d40aac to d3002e2 Compare July 1, 2025 14:38
@ydshieh ydshieh changed the title [don't merge] better jobs Suggest jobs to use in run-slow Jul 1, 2025
@ydshieh ydshieh requested a review from ArthurZucker July 1, 2025 15:03
@@ -0,0 +1,163 @@
name: PR slow CI
on:
pull_request_target:
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

only pull_request_target and not checkout to PR branch manually later, safe!

Comment on lines +122 to +133
# Compute (from the added/modified files) the directories under `tests/`, `tests/models/` and `tests/quantization`to run tests.
# These are already with the prefix `models/` or `quantization/`, so we don't need to add them.
jobs_to_run = get_jobs_to_run()
jobs_to_run = [x.replace("models/", "").replace("quantization/", "") for x in jobs_to_run]
jobs_to_run = [job for job in jobs_to_run if check_name(job)]

if len(jobs_to_run) > MAX_NUM_JOBS_TO_SUGGEST:
jobs_to_run = jobs_to_run[:MAX_NUM_JOBS_TO_SUGGEST]

suggestion = f"{', '.join(jobs_to_run)}"

print(suggestion)
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

we are in this part.

Later on, we will remove utils/pr_slow_ci_models.py and only keep this file.

Copy link
Collaborator

Choose a reason for hiding this comment

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

which will run them by default?

Copy link
Collaborator

@ArthurZucker ArthurZucker left a comment

Choose a reason for hiding this comment

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

Thanks 🤗

Comment on lines +122 to +133
# Compute (from the added/modified files) the directories under `tests/`, `tests/models/` and `tests/quantization`to run tests.
# These are already with the prefix `models/` or `quantization/`, so we don't need to add them.
jobs_to_run = get_jobs_to_run()
jobs_to_run = [x.replace("models/", "").replace("quantization/", "") for x in jobs_to_run]
jobs_to_run = [job for job in jobs_to_run if check_name(job)]

if len(jobs_to_run) > MAX_NUM_JOBS_TO_SUGGEST:
jobs_to_run = jobs_to_run[:MAX_NUM_JOBS_TO_SUGGEST]

suggestion = f"{', '.join(jobs_to_run)}"

print(suggestion)
Copy link
Collaborator

Choose a reason for hiding this comment

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

which will run them by default?

@ydshieh
Copy link
Collaborator Author

ydshieh commented Jul 1, 2025

which will run them by default?

nono, just suggestion. I don't want to trigger GPU runs on each PR commit.

And for security reason, we can't checkout to PR branch without team member explicitly leaving the comment.

@ydshieh ydshieh merged commit ab59cc2 into main Jul 1, 2025
11 checks passed
@ydshieh ydshieh deleted the better_workflows branch July 1, 2025 18:19
@yaswanth19
Copy link
Contributor

Hi @ydshieh , This workflow is adding the comment after every commit and even on a draft PR. It would be great if we can fix this as it's super annoying - probably only add the comment if the PR is approved so kind of suggesting the maintainers that run-slow before merging if required as the PR is approved.

@ydshieh
Copy link
Collaborator Author

ydshieh commented Jul 2, 2025

Hi @yaswanth19

The previous comment is deleted in the workflow, but one has to refresh page, don't know why it (page content refresh) could not be done automatically.

only add the comment if the PR is approv

I tried to trigger when an approval review submitted but that could not be used (security reason).

I will try to add the comment (and of course delete the previous one) only if the previous one is 30 minutes ago or longer.

@ydshieh
Copy link
Collaborator Author

ydshieh commented Jul 2, 2025

#39170 should make it better 🤗

@ArthurZucker
Copy link
Collaborator

Great feedback @yaswanth19 ! Completely 🤗

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