Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
49 commits
Select commit Hold shift + click to select a range
b082303
Remove redundant else in activations to simplify control flow
leaderofARS Dec 4, 2025
c43d256
Merge branch 'huggingface:main' into fix-redundant-else
leaderofARS Dec 4, 2025
2b88b07
Merge branch 'main' into fix-redundant-else
leaderofARS Dec 4, 2025
93f1d61
Merge branch 'main' into fix-redundant-else
leaderofARS Dec 4, 2025
c80ea33
[loading] Allow loading to happen without threading (#42619)
Cyrilvallez Dec 4, 2025
2ad56c6
Remove splitted_tests.txt file (#42625)
Rocketknight1 Dec 4, 2025
abd1ad9
Fix interactions between require_read_token and staticmethod (#42522)
Rocketknight1 Dec 4, 2025
50dee8c
Fix FSDP bnb error (#42600)
SunMarc Dec 5, 2025
66c4366
Move max_new_tokens recommendation into GenerationConfig docstring (#…
hawon223 Dec 5, 2025
a3c6bd3
Tiny Clean up `_deps` in setup.py (#42607)
Sai-Suraj-27 Dec 5, 2025
b7ba509
[torchao] safetensors (#42529)
liangel-02 Dec 5, 2025
ceff129
Fixed convert_batch_to_list_format staticmethod function call (#42476)
Sai-Suraj-27 Dec 5, 2025
9047726
regression from tokenizers v5 to fix fast reference for pipeline (#42…
itazap Dec 5, 2025
79b8cb5
Better security for `pr-repo-consistency-bot.yml` (#42646)
ydshieh Dec 5, 2025
45d01c5
test ci training for text model only (#42597)
3outeille Dec 5, 2025
5eed437
Ultra security for `pr-repo-consistency-bot.yml` (#42652)
ydshieh Dec 5, 2025
9d5cb52
Fix a typo in GGML integration of Qwen2 MoE (#42650)
a4lg Dec 5, 2025
a7915ce
Offloading need to add the prefix into the offload_index (#42624)
Cyrilvallez Dec 5, 2025
f356925
Fix saving multiple tokenizers for custom processors (#42630)
yonigozlan Dec 5, 2025
15d1de2
Compress (#42643)
jiqing-feng Dec 5, 2025
796809f
[kernels] fix typing for Kernel mapping (#42623)
MekkCyber Dec 5, 2025
1db7c4a
small cleaning of quantization class (#42633)
SunMarc Dec 5, 2025
1f19be0
Fixing typo in documentation (philosophy) (#42647)
Bissmella Dec 5, 2025
e459ce0
[docs] TP blog post (#42637)
stevhliu Dec 5, 2025
caf8426
[loading] Correctly load params during offloading & careful memory co…
Cyrilvallez Dec 5, 2025
ec6ce27
[docs] Attention backends + continuous batching (#42329)
stevhliu Dec 5, 2025
cbec92c
Lasr model (#42648)
eustlb Dec 5, 2025
3f7fb77
Improve SSH into runner (#42695)
ydshieh Dec 8, 2025
75c70be
update and add Expectations for mistral3/internvl tests (#42616)
Abdennacer-Badaoui Dec 8, 2025
065aa9a
[Quantization] Fix FP8 experts replacing (#42654)
MekkCyber Dec 8, 2025
f7164b6
Use hfh's is_offline_mode helper (#42657)
Wauplin Dec 8, 2025
b81b441
Let transformers know when a model is being traced via jax.jit (torch…
qihqi Dec 8, 2025
cdf41c9
[`mRope`] Fix warnings (#42660)
vasqu Dec 8, 2025
ada5cae
CircleCI failed test summary (#42240)
ArthurZucker Dec 8, 2025
7d49fb9
Remove Neptune integration references and deprecate `NeptuneCallback`…
qgallouedec Dec 8, 2025
fa36271
FIX Error when trying to load non-LoRA PEFT (#42663)
BenjaminBossan Dec 8, 2025
ffbdef2
Fixed paged|FA2 kernel loading logic and UT. (#42547)
YangKai0616 Dec 8, 2025
caf51b2
Fix PEFT integration with new weight loader (#42701)
Cyrilvallez Dec 8, 2025
befee83
Remove duplicated imports (#42689)
AgainstEntropy Dec 8, 2025
ba029bd
update gemma3 exepectations and switch to dynamic cache (#42688)
Abdennacer-Badaoui Dec 8, 2025
fa81db0
Fixed failing `BioGPT` batch generation test (#42677)
Sai-Suraj-27 Dec 8, 2025
695f75b
Fix failing `ColPaliModelIntegrationTest` (#42705)
Sai-Suraj-27 Dec 8, 2025
8ab9bb3
Fixed failing Bart-Model Integration Tests (#42676)
Sai-Suraj-27 Dec 8, 2025
8a4a1e5
Fixed failing batch_generation test for `opt` model (#42693)
Sai-Suraj-27 Dec 8, 2025
45bf855
hotfix for circleci summary workflow (#42708)
ydshieh Dec 8, 2025
53a9187
fix tp (#42704)
SunMarc Dec 8, 2025
d454fb6
Raise error when missing or incorrect dates (#42610)
yonigozlan Dec 8, 2025
d0ca93e
Fix indentation in EoMT fast image processor (#42707)
simonreise Dec 8, 2025
8df4109
Delete previous comments of `View the CircleCI Test Summary` (#42725)
ydshieh Dec 9, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion .circleci/create_circleci_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -318,6 +318,14 @@ def job_name(self):
parallelism=6,
)

training_ci_job = CircleCIJob(
"training_ci",
additional_env={"RUN_TRAINING_TESTS": True},
docker_image=[{"image": "huggingface/transformers-torch-light"}],
install_steps=["uv pip install ."],
marker="is_training_test",
parallelism=6,
)

# We also include a `dummy.py` file in the files to be doc-tested to prevent edge case failure. Otherwise, the pytest
# hangs forever during test collection while showing `collecting 0 items / 21 errors`. (To see this, we have to remove
Expand Down Expand Up @@ -348,7 +356,8 @@ def job_name(self):
PIPELINE_TESTS = [pipelines_torch_job]
REPO_UTIL_TESTS = [repo_utils_job]
DOC_TESTS = [doc_test_job]
ALL_TESTS = REGULAR_TESTS + EXAMPLES_TESTS + PIPELINE_TESTS + REPO_UTIL_TESTS + DOC_TESTS + [custom_tokenizers_job] + [exotic_models_job] # fmt: skip
TRAINING_CI_TESTS = [training_ci_job]
ALL_TESTS = REGULAR_TESTS + EXAMPLES_TESTS + PIPELINE_TESTS + REPO_UTIL_TESTS + DOC_TESTS + [custom_tokenizers_job] + [exotic_models_job] + TRAINING_CI_TESTS # fmt: skip


def create_circleci_config(folder=None):
Expand Down
245 changes: 245 additions & 0 deletions .github/workflows/circleci-failure-summary-comment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,245 @@
name: CircleCI Failure Summary Comment

on:
pull_request_target:
types: [opened, synchronize, reopened]

jobs:
comment:
runs-on: ubuntu-22.04
permissions:
pull-requests: write
env:
TARGET_BRANCH: ${{ github.event.pull_request.head.ref }}
TARGET_SHA: ${{ github.event.pull_request.head.sha }}
PR_NUMBER: ${{ github.event.pull_request.number }}
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: "3.13"

- name: Install dependencies
run: python -m pip install requests huggingface_hub

- name: Wait for CircleCI check suite completion
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
COMMIT_SHA: ${{ github.event.pull_request.head.sha }}
GITHUB_REPOSITORY: ${{ github.repository }}
run: |
# Exit on error, undefined variables, or pipe failures
set -euo pipefail
echo "Waiting for CircleCI check suite to complete..."
# Timeout after 30 minutes (1800 seconds)
end=$((SECONDS + 1800))
while [ $SECONDS -lt $end ]; do
# Query GitHub API for check suites associated with this commit
# || echo "" allows retry on transient API failures instead of exiting
suite_json=$(gh api "repos/${GITHUB_REPOSITORY}/commits/${COMMIT_SHA}/check-suites" \
--jq '.check_suites[] | select(.app.slug == "circleci-checks")' || echo "")
if [ -z "$suite_json" ]; then
echo "CircleCI check suite not found yet, retrying..."
else
status=$(echo "$suite_json" | jq -r '.status')
conclusion=$(echo "$suite_json" | jq -r '.conclusion // empty')
echo "CircleCI status: $status, conclusion: $conclusion"
# Check suite is done when status is "completed" AND conclusion is set
if [ "$status" = "completed" ] && [ -n "$conclusion" ]; then
echo "Check suite completed successfully"
exit 0
fi
fi
# Poll every 20 seconds
sleep 20
done
echo "ERROR: Timed out waiting for CircleCI check suite"
exit 1

- name: Get CircleCI run's artifacts and upload them to Hub
id: circleci
env:
COMMIT_SHA: ${{ github.event.pull_request.head.sha }}
REPO: ${{ github.repository }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
# Step 1: Get CircleCI check suite ID
echo "Getting check suites for commit ${COMMIT_SHA}..."
check_suites=$(curl -s -H "Authorization: token ${GITHUB_TOKEN}" \
"https://api.github.com/repos/${REPO}/commits/${COMMIT_SHA}/check-suites")
circleci_suite_id=$(echo "$check_suites" | jq -r '.check_suites[] | select(.app.slug == "circleci-checks") | .id' | head -n 1)
echo "CircleCI check suite ID: ${circleci_suite_id}"
# Step 2: Get check runs from the CircleCI suite
echo "Getting check runs for suite ${circleci_suite_id}..."
check_runs=$(curl -s -H "Authorization: token ${GITHUB_TOKEN}" \
"https://api.github.com/repos/${REPO}/check-suites/${circleci_suite_id}/check-runs")
# Step 3: Extract workflow ID from the "run_tests" check run
workflow_id=$(echo "$check_runs" | jq -r '.check_runs[] | select(.name == "run_tests") | .details_url' | grep -oP 'workflows/\K[a-f0-9-]+')
echo "CircleCI Workflow ID: ${workflow_id}"
# Step 4: Get all jobs in the workflow
echo "Getting jobs for workflow ${workflow_id}..."
jobs=$(curl -s \
"https://circleci.com/api/v2/workflow/${workflow_id}/job")
# Step 5: Extract collection_job details
collection_job_number=$(echo "$jobs" | jq -r '.items[] | select(.name == "collection_job") | .job_number')
collection_job_id=$(echo "$jobs" | jq -r '.items[] | select(.name == "collection_job") | .id')
echo "CircleCI Collection job number: ${collection_job_number}"
echo "CircleCI Collection job ID: ${collection_job_id}"
# Step 6: Get artifacts list
echo "Getting artifacts for job ${collection_job_number}..."
artifacts=$(curl -s \
"https://circleci.com/api/v2/project/gh/${REPO}/${collection_job_number}/artifacts")
echo "$artifacts" | jq '.'
# Step 7: Download failure_summary.json specifically
failure_summary_url=$(echo "$artifacts" | jq -r '.items[] | select(.path == "outputs/failure_summary.json") | .url')
if [ -z "$failure_summary_url" ]; then
echo "failure_summary.json not found in artifacts - PR may not have latest main merged. Skipping."
echo "artifact_found=false" >> $GITHUB_OUTPUT
exit 0
fi
echo "Downloading failure_summary.json from: ${failure_summary_url}"
mkdir -p outputs
curl -s -L "${failure_summary_url}" -o outputs/failure_summary.json
ls -la outputs
echo "Downloaded failure_summary.json successfully"
# Verify the file was downloaded
if [ ! -f outputs/failure_summary.json ]; then
echo "Failed to download failure_summary.json - skipping."
echo "artifact_found=false" >> $GITHUB_OUTPUT
exit 0
fi
echo "File size: $(wc -c < outputs/failure_summary.json) bytes"
# Export variables for next steps
echo "artifact_found=true" >> $GITHUB_OUTPUT
echo "workflow_id=${workflow_id}" >> $GITHUB_OUTPUT
echo "collection_job_number=${collection_job_number}" >> $GITHUB_OUTPUT
- name: Upload summaries to Hub
if: steps.circleci.outputs.artifact_found == 'true'
env:
HF_TOKEN: ${{ secrets.HF_CI_WRITE_TOKEN }}
CIRCLECI_RESULTS_DATASET_ID: "transformers-community/circleci-test-results"
PR_NUMBER: ${{ github.event.pull_request.number }}
COMMIT_SHA: ${{ github.event.pull_request.head.sha }}
run: |
python << 'EOF'
import os
from pathlib import Path
from huggingface_hub import HfApi
# Setup paths
pr_number = os.environ["PR_NUMBER"]
commit_short = os.environ["COMMIT_SHA"][:12]
folder_path = f"pr-{pr_number}/sha-{commit_short}"
# Create folder and move file
Path(folder_path).mkdir(parents=True, exist_ok=True)
Path("outputs/failure_summary.json").rename(f"{folder_path}/failure_summary.json")
# Upload to Hub
dataset_id = os.environ["CIRCLECI_RESULTS_DATASET_ID"]
api = HfApi(token=os.environ["HF_TOKEN"])
api.upload_folder(
commit_message=f"Update CircleCI artifacts for PR {pr_number} ({commit_short})",
folder_path=folder_path,
path_in_repo=folder_path,
repo_id=dataset_id,
repo_type="dataset",
)
print(f"Uploaded {folder_path} to {dataset_id}")
EOF
- name: Delete existing CircleCI summary comments
if: steps.circleci.outputs.artifact_found == 'true'
env:
PR_NUMBER: ${{ github.event.pull_request.number }}
uses: actions/github-script@v7
with:
script: |
const PR_NUMBER = parseInt(process.env.PR_NUMBER, 10);
// Get all comments on the PR
const { data: comments } = await github.rest.issues.listComments({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: PR_NUMBER
});
// Find existing bot comments that start with "View the CircleCI Test Summary for this PR:"
const existingComments = comments.filter(comment =>
comment.user.login === 'github-actions[bot]' &&
comment.body.startsWith('View the CircleCI Test Summary for this PR:')
);
// Delete all matching comments
for (const comment of existingComments) {
console.log(`Deleting comment #${comment.id}`);
await github.rest.issues.deleteComment({
owner: context.repo.owner,
repo: context.repo.repo,
comment_id: comment.id
});
}
console.log(`Deleted ${existingComments.length} old CircleCI summary comment(s)`);
- name: Post comment with helper link
if: steps.circleci.outputs.artifact_found == 'true'
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_REPOSITORY: ${{ github.repository }}
PR_NUMBER: ${{ github.event.pull_request.number }}
PR_SHA: ${{ github.event.pull_request.head.sha }}
run: |
COMMIT_SHORT="${PR_SHA:0:12}"
SUMMARY_FILE="pr-${PR_NUMBER}/sha-${COMMIT_SHORT}/failure_summary.json"
if [ ! -f "$SUMMARY_FILE" ]; then
echo "failure_summary.json missing, skipping comment."
exit 0
fi
failures=$(jq '.failures | length' "$SUMMARY_FILE")
if [ "$failures" -eq 0 ]; then
echo "No failures detected, skipping PR comment."
exit 0
fi
# Build Space URL with encoded parameters
repo_enc=$(jq -rn --arg v "$GITHUB_REPOSITORY" '$v|@uri')
pr_enc=$(jq -rn --arg v "$PR_NUMBER" '$v|@uri')
sha_short="${PR_SHA:0:6}"
sha_enc=$(jq -rn --arg v "$sha_short" '$v|@uri')
SPACE_URL="https://huggingface.co/spaces/transformers-community/circle-ci-viz?pr=${pr_enc}&sha=${sha_enc}"
# Post comment (using printf for proper newlines)
gh api \
--method POST \
-H "Accept: application/vnd.github+json" \
-H "X-GitHub-Api-Version: 2022-11-28" \
"repos/${GITHUB_REPOSITORY}/issues/${PR_NUMBER}/comments" \
-f body="$(printf "View the CircleCI Test Summary for this PR:\n\n%s" "$SPACE_URL")"
Loading