Skip to content

Commit e5eb9a6

Browse files
authored
Merge branch 'main' into alm-base-model-class
2 parents af429ef + 2d6815e commit e5eb9a6

1,229 files changed

Lines changed: 65345 additions & 24058 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.ai/AGENTS.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,4 +64,4 @@ Do not raise PRs without human validation.
6464
We try to avoid direct inheritance between model-specific files in `src/transformers/models/`. We have two mechanisms to manage the resulting code duplication:
6565

6666
1) The older method is to mark classes or functions with `# Copied from ...`. Copies are kept in sync by `make fix-repo`. Do not edit a `# Copied from` block, as it will be reverted by `make fix-repo`. Ideally you should edit the code it's copying from and propagate the change, but you can break the `# Copied from` link if needed.
67-
2) The newer method is to add a file named `modular_<name>.py` in the model directory. `modular` files **can** inherit from other models. `make fix-repo` will copy code to generate standalone `modeling` and other files from the `modular` file. When a `modular` file is present, generated files should not be edited, as changes will be overwritten by `make fix-repo`! Instead, edit the `modular` file. See [docs/source/en/modular_transformers.md](docs/source/en/modular_transformers.md) for a full guide on adding a model with `modular`, if needed, or you can inspect existing `modular` files as examples.
67+
2) The newer method is to add a file named `modular_<name>.py` in the model directory. `modular` files **can** inherit from other models. `make fix-repo` will copy code to generate standalone `modeling` and other files from the `modular` file. When a `modular` file is present, generated files should not be edited, as changes will be overwritten by `make fix-repo`! Instead, edit the `modular` file. See [docs/source/en/modular_transformers.md](../docs/source/en/modular_transformers.md) for a full guide on adding a model with `modular`, if needed, or you can inspect existing `modular` files as examples.

.ai/skills/add-mlinter-rule/SKILL.md

Lines changed: 0 additions & 104 deletions
This file was deleted.

.github/workflows/build_documentation.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ on:
1111

1212
jobs:
1313
build:
14-
uses: huggingface/doc-builder/.github/workflows/build_main_documentation.yml@90b4ee2c10b81b5c1a6367c4e6fc9e2fb510a7e3 # main
14+
uses: huggingface/doc-builder/.github/workflows/build_main_documentation.yml@2430c1ec91d04667414e2fa31ecfc36c153ea391 # main
1515
with:
1616
commit_sha: ${{ github.sha }}
1717
package: transformers
@@ -23,7 +23,7 @@ jobs:
2323
hf_token: ${{ secrets.HF_DOC_BUILD_PUSH }}
2424

2525
build_other_lang:
26-
uses: huggingface/doc-builder/.github/workflows/build_main_documentation.yml@90b4ee2c10b81b5c1a6367c4e6fc9e2fb510a7e3 # main
26+
uses: huggingface/doc-builder/.github/workflows/build_main_documentation.yml@2430c1ec91d04667414e2fa31ecfc36c153ea391 # main
2727
with:
2828
commit_sha: ${{ github.sha }}
2929
package: transformers

.github/workflows/check_failed_tests.yml

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ jobs:
5555
n_runners: ${{ steps.set-matrix.outputs.n_runners }}
5656
process: ${{ steps.set-matrix.outputs.process }}
5757
steps:
58-
- uses: actions/download-artifact@v4
58+
- uses: actions/download-artifact@v8
5959
continue-on-error: true
6060
with:
6161
name: ci_results_${{ inputs.job }}
@@ -127,16 +127,19 @@ jobs:
127127
image: ${{ inputs.docker }}
128128
options: --gpus all --shm-size "16gb" --ipc host -v /mnt/cache/.cache/huggingface:/mnt/cache/
129129
steps:
130-
- uses: actions/download-artifact@v4
130+
- uses: actions/download-artifact@v8
131131
with:
132132
name: ci_results_${{ inputs.job }}
133133
path: /transformers/ci_results_${{ inputs.job }}
134134

135-
- uses: actions/download-artifact@v4
135+
- uses: actions/download-artifact@v8
136+
env:
137+
ACTIONS_ARTIFACT_MAX_ARTIFACT_COUNT: 2000
136138
with:
137139
pattern: setup_values*
138140
path: setup_values
139141
merge-multiple: true
142+
github-token: ${{ secrets.GITHUB_TOKEN }}
140143

141144
- name: Prepare some setup values
142145
run: |
@@ -255,16 +258,19 @@ jobs:
255258
image: ${{ inputs.docker }}
256259
options: --gpus all --shm-size "16gb" --ipc host -v /mnt/cache/.cache/huggingface:/mnt/cache/
257260
steps:
258-
- uses: actions/download-artifact@v4
261+
- uses: actions/download-artifact@v8
259262
with:
260263
name: ci_results_${{ inputs.job }}
261264
path: /transformers/ci_results_${{ inputs.job }}
262265

263-
- uses: actions/download-artifact@v4
266+
- uses: actions/download-artifact@v8
267+
env:
268+
ACTIONS_ARTIFACT_MAX_ARTIFACT_COUNT: 2000
264269
with:
265270
pattern: new_failures_with_bad_commit_${{ inputs.job }}*
266271
path: /transformers/new_failures_with_bad_commit_${{ inputs.job }}
267272
merge-multiple: true
273+
github-token: ${{ secrets.GITHUB_TOKEN }}
268274

269275
- name: Check files
270276
working-directory: /transformers

.github/workflows/pr-ci-caller.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
name: PR CI
2+
3+
on:
4+
pull_request:
5+
6+
concurrency:
7+
group: ${{ github.workflow }}-${{ github.event.pull_request.number }}
8+
cancel-in-progress: true
9+
10+
jobs:
11+
pr-ci:
12+
if: contains(fromJSON('["MEMBER","OWNER","COLLABORATOR"]'), github.event.pull_request.author_association)
13+
uses: huggingface/transformers-test-ci/.github/workflows/pr-ci_dynamic_caller_example.yml@main

.github/workflows/self-scheduled.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -601,9 +601,12 @@ jobs:
601601
- name: Create output directory
602602
run: mkdir warnings_in_ci
603603

604-
- uses: actions/download-artifact@v4
604+
- uses: actions/download-artifact@v8
605+
env:
606+
ACTIONS_ARTIFACT_MAX_ARTIFACT_COUNT: 2000
605607
with:
606608
path: warnings_in_ci
609+
github-token: ${{ secrets.GITHUB_TOKEN }}
607610

608611
- name: Show artifacts
609612
run: echo "$(python3 -c 'import os; d = os.listdir(); print(d)')"

.github/workflows/slack-report.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,11 @@ jobs:
5555
# Security: checkout to the `main` branch for untrusted triggers (issue_comment, pull_request_target), otherwise use the specified ref
5656
ref: ${{ (github.event_name == 'issue_comment' || github.event_name == 'pull_request_target') && 'main' || (inputs.commit_sha || github.sha) }}
5757

58-
- uses: actions/download-artifact@v4
58+
- uses: actions/download-artifact@v8
59+
env:
60+
ACTIONS_ARTIFACT_MAX_ARTIFACT_COUNT: 2000
61+
with:
62+
github-token: ${{ secrets.GITHUB_TOKEN }}
5963

6064
- name: Prepare some setup values
6165
run: |

.github/workflows/upload_pr_documentation.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ on:
88

99
jobs:
1010
build:
11-
uses: huggingface/doc-builder/.github/workflows/upload_pr_documentation.yml@90b4ee2c10b81b5c1a6367c4e6fc9e2fb510a7e3 # main
11+
uses: huggingface/doc-builder/.github/workflows/upload_pr_documentation.yml@9ad2de8582b56c017cb530c1165116d40433f1c6 # main
1212
with:
1313
package_name: transformers
1414
secrets:

.gitignore

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -170,8 +170,7 @@ tags
170170
# ruff
171171
.ruff_cache
172172

173-
# modeling structure lint cache
174-
utils/mlinter/.mlinter_cache.json
173+
# checkers cache
175174
utils/.checkers_cache.json
176175

177176
# modular conversion

0 commit comments

Comments
 (0)