Skip to content

Conversation

@ydshieh
Copy link
Collaborator

@ydshieh ydshieh commented Aug 26, 2025

What does this PR do?

CI when PR merged to main.

We restrict to the pre-defined list of important models.

A job run: https://github.com/huggingface/transformers/actions/runs/17234576559

The slack notification : https://huggingface.slack.com/archives/C01QRHS4K3P/p1756202582644859

Screenshot 2025-08-26 121801

@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.

@ydshieh
Copy link
Collaborator Author

ydshieh commented Aug 26, 2025

@ivarflakstad @remi-or if you would like to review (and eventually we can have something similar for AMD later)

Comment on lines -7 to -16
env:
OUTPUT_SLACK_CHANNEL_ID: "C06L2SGMEEA"
HF_HUB_READ_TOKEN: ${{ secrets.HF_HUB_READ_TOKEN }}
HF_HOME: /mnt/cache
TRANSFORMERS_IS_CI: yes
OMP_NUM_THREADS: 8
MKL_NUM_THREADS: 8
RUN_SLOW: yes # For gated repositories, we still need to agree to share information on the Hub repo. page in order to get access. # This token is created under the bot `hf-transformers-bot`.
SIGOPT_API_TOKEN: ${{ secrets.SIGOPT_API_TOKEN }}
TF_FORCE_GPU_ALLOW_GROWTH: true
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

no need this in the caller (where the tests are only run in the callee)

Comment on lines 17 to 19
- name: Get changed files using GitHub API
id: get-changed-files
uses: actions/github-script@v7
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Use github script/api to get the changed files.

matrix_string=$(printf '"%s", ' "${model_arrays[@]}" | sed 's/, $//')
echo "matrix=[$matrix_string]" >> $GITHUB_OUTPUT
test_modified_files:
python3 - << 'EOF'
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I just want to use python (more familiar to process the list of changed files and get the list of models), but I don't want to create a new python file in the repository.

f.write("matrix=[]\n")
EOF
model-ci:
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

simply call ./.github/workflows/self-scheduled.yml

Comment on lines +34 to +37
models:
default: ""
required: false
type: string
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

to handle the case where the caller already prepare the list

working-directory: /transformers
run: |
git fetch && git checkout ${{ github.sha }}
git fetch && git checkout ${{ inputs.commit_sha || github.sha }}
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

this is missed in a previous PR.

ci_title_workflow_run = os.environ.get("CI_TITLE_WORKFLOW_RUN")
ci_title = ci_title_push if ci_title_push else ci_title_workflow_run

ci_title = os.environ.get("CI_TITLE", "")
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

CI_TITLE_PUSH and CI_TITLE_WORKFLOW_RUN are used in the

.github/workflows/self-push.yml

that is outdated for some time.

Here just make it more clean


if merged_by is None:
ci_title = f"<{ci_url}|{ci_title}>\nAuthor: {ci_author}"
ci_title = f"<{ci_url}|{ci_title}>\nAuthor: GH_{ci_author}"
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

GH_ here is for keyword mention on slack (if the team members set it)

@ydshieh
Copy link
Collaborator Author

ydshieh commented Aug 27, 2025

Merge so we could have this running on the main branch 🚀

@ydshieh ydshieh merged commit 80f4c0c into main Aug 27, 2025
15 checks passed
@ydshieh ydshieh deleted the update_important_models branch August 27, 2025 08:56
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.

3 participants