Skip to content

Commit 49391cd

Browse files
authored
Merge branch 'main' into minicpm_o_2_6
2 parents ae12902 + ca402e2 commit 49391cd

File tree

2,561 files changed

+92096
-121426
lines changed

Some content is hidden

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

2,561 files changed

+92096
-121426
lines changed

.circleci/config.yml

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -43,18 +43,6 @@ jobs:
4343
parallelism: 1
4444
steps:
4545
- checkout
46-
- run: git branch
47-
- run: git log -n 1
48-
- run: python3 utils/extract_pr_number_from_circleci.py > pr_number.txt
49-
- run: echo $(cat pr_number.txt)
50-
- run: if [[ "$(cat pr_number.txt)" == "" && "$CIRCLE_BRANCH" != "main" && "$CIRCLE_BRANCH" != *-release ]]; then echo "Not a PR, not the main branch and not a release branch, skip test!"; circleci-agent step halt; fi
51-
- run: 'curl -L -H "Accept: application/vnd.github+json" -H "X-GitHub-Api-Version: 2022-11-28" https://api.github.com/repos/$CIRCLE_PROJECT_USERNAME/$CIRCLE_PROJECT_REPONAME/pulls/$(cat pr_number.txt) >> github.txt'
52-
- run: cat github.txt
53-
- run: (python3 -c 'import json; from datetime import datetime; fp = open("github.txt"); data = json.load(fp); fp.close(); f = "%Y-%m-%dT%H:%M:%SZ"; created = datetime.strptime(data["created_at"], f); updated = datetime.strptime(data["updated_at"], f); s = (updated - created).total_seconds(); print(int(s))' || true) > elapsed.txt
54-
- run: if [ "$(cat elapsed.txt)" == "" ]; then echo 60 > elapsed.txt; fi
55-
- run: cat elapsed.txt
56-
- run: if [ "$(cat elapsed.txt)" -lt "30" ]; then echo "PR is just opened, wait some actions from GitHub"; sleep 30; fi
57-
- run: 'if grep -q "\"draft\": true," github.txt; then echo "draft mode, skip test!"; circleci-agent step halt; fi'
5846
- run: uv pip install -U -e .
5947
- run: echo 'export "GIT_COMMIT_MESSAGE=$(git show -s --format=%s)"' >> "$BASH_ENV" && source "$BASH_ENV"
6048
- run: mkdir -p test_preparation
@@ -124,8 +112,6 @@ jobs:
124112

125113
- run:
126114
name: "Retrieve Artifact Paths"
127-
env:
128-
CIRCLE_TOKEN: ${{ secrets.CI_ARTIFACT_TOKEN }}
129115
command: |
130116
project_slug="gh/${CIRCLE_PROJECT_USERNAME}/${CIRCLE_PROJECT_REPONAME}"
131117
job_number=${CIRCLE_BUILD_NUM}
@@ -198,6 +184,7 @@ jobs:
198184
- run: python utils/check_dummies.py
199185
- run: python utils/check_repo.py
200186
- run: python utils/check_inits.py
187+
- run: python utils/check_pipeline_typing.py
201188
- run: python utils/check_config_docstrings.py
202189
- run: python utils/check_config_attributes.py
203190
- run: python utils/check_doctest_list.py

.circleci/create_circleci_config.py

Lines changed: 4 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,6 @@ def __post_init__(self):
110110
print(f"Using {self.docker_image} docker image")
111111
if self.install_steps is None:
112112
self.install_steps = ["uv venv && uv pip install ."]
113-
self.install_steps.append("uv venv && uv pip install git+https://github.com/ydshieh/[email protected] git+https://github.com/ydshieh/[email protected]")
114113
if self.pytest_options is None:
115114
self.pytest_options = {}
116115
if isinstance(self.tests_to_run, str):
@@ -214,7 +213,7 @@ def job_name(self):
214213
docker_image=[{"image": "huggingface/transformers-torch-light"}],
215214
# networkx==3.3 (after #36957) cause some issues
216215
# TODO: remove this once it works directly
217-
install_steps=["uv venv && uv pip install . && uv pip install networkx==3.2.1"],
216+
install_steps=["uv venv && uv pip install ."],
218217
marker="generate",
219218
parallelism=6,
220219
)
@@ -231,22 +230,6 @@ def job_name(self):
231230
parallelism=8,
232231
)
233232

234-
tf_job = CircleCIJob(
235-
"tf",
236-
docker_image=[{"image":"huggingface/transformers-tf-light"}],
237-
parallelism=6,
238-
)
239-
240-
241-
flax_job = CircleCIJob(
242-
"flax",
243-
docker_image=[{"image":"huggingface/transformers-jax-light"}],
244-
parallelism=6,
245-
pytest_num_workers=16,
246-
resource_class="2xlarge",
247-
)
248-
249-
250233
pipelines_torch_job = CircleCIJob(
251234
"pipelines_torch",
252235
additional_env={"RUN_PIPELINE_TESTS": True},
@@ -255,16 +238,6 @@ def job_name(self):
255238
parallelism=4,
256239
)
257240

258-
259-
pipelines_tf_job = CircleCIJob(
260-
"pipelines_tf",
261-
additional_env={"RUN_PIPELINE_TESTS": True},
262-
docker_image=[{"image":"huggingface/transformers-tf-light"}],
263-
marker="is_pipeline_test",
264-
parallelism=4,
265-
)
266-
267-
268241
custom_tokenizers_job = CircleCIJob(
269242
"custom_tokenizers",
270243
additional_env={"RUN_CUSTOM_TOKENIZERS": True},
@@ -281,15 +254,6 @@ def job_name(self):
281254
pytest_num_workers=4,
282255
)
283256

284-
285-
examples_tensorflow_job = CircleCIJob(
286-
"examples_tensorflow",
287-
additional_env={"OMP_NUM_THREADS": 8},
288-
docker_image=[{"image":"huggingface/transformers-examples-tf"}],
289-
pytest_num_workers=2,
290-
)
291-
292-
293257
hub_job = CircleCIJob(
294258
"hub",
295259
additional_env={"HUGGINGFACE_CO_STAGING": True},
@@ -310,7 +274,7 @@ def job_name(self):
310274
docker_image=[{"image":"huggingface/transformers-torch-tf-light"}],
311275
install_steps=[
312276
"uv venv",
313-
"uv pip install .[torch,tf,testing,sentencepiece,onnxruntime,vision,rjieba]",
277+
"uv pip install .[testing,sentencepiece,onnxruntime,vision,rjieba]",
314278
],
315279
pytest_options={"k onnx": None},
316280
pytest_num_workers=1,
@@ -339,7 +303,7 @@ def job_name(self):
339303
docker_image=[{"image": "huggingface/transformers-torch-light"}],
340304
# networkx==3.3 (after #36957) cause some issues
341305
# TODO: remove this once it works directly
342-
install_steps=["uv venv && uv pip install . && uv pip install networkx==3.2.1"],
306+
install_steps=["uv venv && uv pip install ."],
343307
marker="not generate",
344308
parallelism=6,
345309
)
@@ -369,7 +333,7 @@ def job_name(self):
369333
pytest_num_workers=1,
370334
)
371335

372-
REGULAR_TESTS = [torch_job, flax_job, hub_job, onnx_job, tokenization_job, processor_job, generate_job, non_model_job] # fmt: skip
336+
REGULAR_TESTS = [torch_job, hub_job, onnx_job, tokenization_job, processor_job, generate_job, non_model_job] # fmt: skip
373337
EXAMPLES_TESTS = [examples_torch_job]
374338
PIPELINE_TESTS = [pipelines_torch_job]
375339
REPO_UTIL_TESTS = [repo_utils_job]

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ Library:
5151
- pipelines: @Rocketknight1
5252
- tensorflow: @gante and @Rocketknight1
5353
- tokenizers: @ArthurZucker
54-
- trainer: @zach-huggingface and @SunMarc
54+
- trainer: @zach-huggingface, @SunMarc and @qgallouedec
5555
- chat templates: @Rocketknight1
5656
5757
Integrations:

.github/workflows/benchmark.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ jobs:
6464
commit_id=$GITHUB_SHA
6565
fi
6666
commit_msg=$(git show -s --format=%s | cut -c1-70)
67-
python3 benchmark/benchmarks_entrypoint.py "$BRANCH_NAME" "$commit_id" "$commit_msg"
67+
python3 benchmark/benchmarks_entrypoint.py "huggingface/transformers" "$BRANCH_NAME" "$commit_id" "$commit_msg"
6868
env:
6969
HF_TOKEN: ${{ secrets.HF_HUB_READ_TOKEN }}
7070
# Enable this to see debug logs

.github/workflows/build-docker-images.yml

Lines changed: 1 addition & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ concurrency:
1919

2020
jobs:
2121
latest-docker:
22-
name: "Latest PyTorch + TensorFlow [dev]"
22+
name: "Latest PyTorch [dev]"
2323
runs-on:
2424
group: aws-general-8-plus
2525
steps:
@@ -267,44 +267,6 @@ jobs:
267267
status: ${{ job.status }}
268268
slack_token: ${{ secrets.SLACK_CIFEEDBACK_BOT_TOKEN }}
269269

270-
latest-tensorflow:
271-
name: "Latest TensorFlow [dev]"
272-
# Push CI doesn't need this image
273-
if: inputs.image_postfix != '-push-ci'
274-
runs-on:
275-
group: aws-general-8-plus
276-
steps:
277-
-
278-
name: Set up Docker Buildx
279-
uses: docker/setup-buildx-action@v3
280-
-
281-
name: Check out code
282-
uses: actions/checkout@v4
283-
-
284-
name: Login to DockerHub
285-
uses: docker/login-action@v3
286-
with:
287-
username: ${{ secrets.DOCKERHUB_USERNAME }}
288-
password: ${{ secrets.DOCKERHUB_PASSWORD }}
289-
-
290-
name: Build and push
291-
uses: docker/build-push-action@v5
292-
with:
293-
context: ./docker/transformers-tensorflow-gpu
294-
build-args: |
295-
REF=main
296-
push: true
297-
tags: huggingface/transformers-tensorflow-gpu
298-
299-
- name: Post to Slack
300-
if: always()
301-
uses: huggingface/hf-workflows/.github/actions/post-slack@main
302-
with:
303-
slack_channel: ${{ secrets.CI_SLACK_CHANNEL_DOCKER }}
304-
title: 🤗 Results of the huggingface/transformers-tensorflow-gpu build
305-
status: ${{ job.status }}
306-
slack_token: ${{ secrets.SLACK_CIFEEDBACK_BOT_TOKEN }}
307-
308270
latest-pytorch-deepspeed-amd:
309271
name: "PyTorch + DeepSpeed (AMD) [dev]"
310272
runs-on:

.github/workflows/change_pr_to_draft.yml

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

0 commit comments

Comments
 (0)