Skip to content

Commit 065d7da

Browse files
authored
Merge branch 'main' into plr_fixes
2 parents 29a67d2 + e446372 commit 065d7da

File tree

167 files changed

+16837
-325
lines changed

Some content is hidden

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

167 files changed

+16837
-325
lines changed

.circleci/create_circleci_config.py

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ def __post_init__(self):
109109
self.docker_image[0]["image"] = f"{self.docker_image[0]['image']}:dev"
110110
print(f"Using {self.docker_image} docker image")
111111
if self.install_steps is None:
112-
self.install_steps = ["uv venv && uv pip install ."]
112+
self.install_steps = ["uv pip install ."]
113113
if self.pytest_options is None:
114114
self.pytest_options = {}
115115
if isinstance(self.tests_to_run, str):
@@ -213,7 +213,7 @@ def job_name(self):
213213
docker_image=[{"image": "huggingface/transformers-torch-light"}],
214214
# networkx==3.3 (after #36957) cause some issues
215215
# TODO: remove this once it works directly
216-
install_steps=["uv venv && uv pip install ."],
216+
install_steps=["uv pip install ."],
217217
marker="generate",
218218
parallelism=6,
219219
)
@@ -250,7 +250,7 @@ def job_name(self):
250250
additional_env={"OMP_NUM_THREADS": 8},
251251
docker_image=[{"image":"huggingface/transformers-examples-torch"}],
252252
# TODO @ArthurZucker remove this once docker is easier to build
253-
install_steps=["uv venv && uv pip install . && uv pip install -r examples/pytorch/_tests_requirements.txt"],
253+
install_steps=["uv pip install . && uv pip install -r examples/pytorch/_tests_requirements.txt"],
254254
pytest_num_workers=4,
255255
)
256256

@@ -259,7 +259,7 @@ def job_name(self):
259259
additional_env={"HUGGINGFACE_CO_STAGING": True},
260260
docker_image=[{"image":"huggingface/transformers-torch-light"}],
261261
install_steps=[
262-
'uv venv && uv pip install .',
262+
'uv pip install .',
263263
'git config --global user.email "[email protected]"',
264264
'git config --global user.name "ci"',
265265
],
@@ -273,7 +273,6 @@ def job_name(self):
273273
"onnx",
274274
docker_image=[{"image":"huggingface/transformers-torch-tf-light"}],
275275
install_steps=[
276-
"uv venv",
277276
"uv pip install .[testing,sentencepiece,onnxruntime,vision,rjieba]",
278277
],
279278
pytest_options={"k onnx": None},
@@ -303,7 +302,7 @@ def job_name(self):
303302
docker_image=[{"image": "huggingface/transformers-torch-light"}],
304303
# networkx==3.3 (after #36957) cause some issues
305304
# TODO: remove this once it works directly
306-
install_steps=["uv venv && uv pip install .[serving]"],
305+
install_steps=["uv pip install .[serving]"],
307306
marker="not generate",
308307
parallelism=6,
309308
)
@@ -321,7 +320,7 @@ def job_name(self):
321320
additional_env={"TRANSFORMERS_VERBOSITY": "error", "DATASETS_VERBOSITY": "error", "SKIP_CUDA_DOCTEST": "1"},
322321
install_steps=[
323322
# Add an empty file to keep the test step running correctly even no file is selected to be tested.
324-
"uv venv && pip install .",
323+
"uv pip install .",
325324
"touch dummy.py",
326325
command,
327326
"cat pr_documentation_tests_temp.txt",
Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
name: Self-hosted runner scale set (AMD mi355 scheduled CI caller)
2+
3+
# Note: For every job in this workflow, the name of the runner scale set is finalized in the runner yaml i.e. huggingface/hf-workflows/.github/workflows/transformers_amd_ci_scheduled_arc_scale_set.yaml
4+
# For example, 1gpu : amd-mi355-ci-1gpu
5+
# 2gpu : amd-mi355-ci-2gpu
6+
7+
on:
8+
workflow_run:
9+
workflows: ["Self-hosted runner (AMD scheduled CI caller)"]
10+
branches: ["main"]
11+
types: [completed]
12+
push:
13+
branches:
14+
- run_amd_scheduled_ci_caller*
15+
16+
jobs:
17+
model-ci:
18+
name: Model CI
19+
uses: huggingface/hf-workflows/.github/workflows/transformers_amd_ci_scheduled_arc_scale_set.yaml@main
20+
with:
21+
job: run_models_gpu
22+
slack_report_channel: "#amd-hf-ci"
23+
runner_scale_set: amd-mi355-ci
24+
docker: huggingface/transformers-pytorch-amd-gpu
25+
ci_event: Scheduled CI (AMD) - mi355
26+
report_repo_id: optimum-amd/transformers_daily_ci
27+
secrets: inherit
28+
29+
torch-pipeline:
30+
name: Torch pipeline CI
31+
uses: huggingface/hf-workflows/.github/workflows/transformers_amd_ci_scheduled_arc_scale_set.yaml@main
32+
with:
33+
job: run_pipelines_torch_gpu
34+
slack_report_channel: "#amd-hf-ci"
35+
runner_scale_set: amd-mi355-ci
36+
docker: huggingface/transformers-pytorch-amd-gpu
37+
ci_event: Scheduled CI (AMD) - mi355
38+
report_repo_id: optimum-amd/transformers_daily_ci
39+
secrets: inherit
40+
41+
example-ci:
42+
name: Example CI
43+
uses: huggingface/hf-workflows/.github/workflows/transformers_amd_ci_scheduled_arc_scale_set.yaml@main
44+
with:
45+
job: run_examples_gpu
46+
slack_report_channel: "#amd-hf-ci"
47+
runner_scale_set: amd-mi355-ci
48+
docker: huggingface/transformers-pytorch-amd-gpu
49+
ci_event: Scheduled CI (AMD) - mi355
50+
report_repo_id: optimum-amd/transformers_daily_ci
51+
secrets: inherit
52+
53+
deepspeed-ci:
54+
name: DeepSpeed CI
55+
uses: huggingface/hf-workflows/.github/workflows/transformers_amd_ci_scheduled_arc_scale_set.yaml@main
56+
with:
57+
job: run_torch_cuda_extensions_gpu
58+
slack_report_channel: "#amd-hf-ci"
59+
runner_scale_set: amd-mi355-ci
60+
docker: huggingface/transformers-pytorch-deepspeed-amd-gpu
61+
ci_event: Scheduled CI (AMD) - mi355
62+
report_repo_id: optimum-amd/transformers_daily_ci
63+
secrets: inherit

conftest.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,8 @@ def pytest_configure(config):
8383
config.addinivalue_line("markers", "is_staging_test: mark test to run only in the staging environment")
8484
config.addinivalue_line("markers", "accelerate_tests: mark test that require accelerate")
8585
config.addinivalue_line("markers", "not_device_test: mark the tests always running on cpu")
86+
config.addinivalue_line("markers", "torch_compile_test: mark test which tests torch compile functionality")
87+
config.addinivalue_line("markers", "torch_export_test: mark test which tests torch export functionality")
8688

8789

8890
def pytest_collection_modifyitems(items):

docker/consistency.dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ USER root
44
ARG REF=main
55
RUN apt-get update && apt-get install -y time git g++ pkg-config make git-lfs
66
ENV UV_PYTHON=/usr/local/bin/python
7-
RUN pip install uv && uv venv && uv pip install --no-cache-dir -U pip setuptools GitPython
7+
RUN pip install uv && uv pip install --no-cache-dir -U pip setuptools GitPython
88
RUN uv pip install --no-cache-dir --upgrade 'torch' 'torchaudio' 'torchvision' --index-url https://download.pytorch.org/whl/cpu
99
# tensorflow pin matching setup.py
1010
RUN uv pip install --no-cache-dir pypi-kenlm

docker/custom-tokenizers.dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ ARG REF=main
44
USER root
55
RUN apt-get update && apt-get install -y libsndfile1-dev espeak-ng time git cmake wget xz-utils build-essential g++5 libprotobuf-dev protobuf-compiler
66
ENV UV_PYTHON=/usr/local/bin/python
7-
RUN pip --no-cache-dir install uv && uv venv && uv pip install --no-cache-dir -U pip setuptools
7+
RUN pip --no-cache-dir install uv && uv pip install --no-cache-dir -U pip setuptools
88

99
RUN wget https://github.com/ku-nlp/jumanpp/releases/download/v2.0.0-rc3/jumanpp-2.0.0-rc3.tar.xz
1010
RUN tar xvf jumanpp-2.0.0-rc3.tar.xz
@@ -20,7 +20,7 @@ RUN uv pip install --no-cache --upgrade 'torch' --index-url https://download.pyt
2020
RUN uv pip install --no-cache-dir --no-deps accelerate --extra-index-url https://download.pytorch.org/whl/cpu
2121
RUN uv pip install --no-cache-dir "git+https://github.com/huggingface/transformers.git@${REF}#egg=transformers[ja,testing,sentencepiece,jieba,spacy,ftfy,rjieba]" unidic unidic-lite
2222
# spacy is not used so not tested. Causes to failures. TODO fix later
23-
RUN python3 -m unidic download
23+
RUN uv run python -m unidic download
2424
RUN uv pip uninstall transformers
2525

2626
RUN apt-get clean && rm -rf /var/lib/apt/lists/*

docker/examples-tf.dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ USER root
55
RUN apt-get update && apt-get install -y libsndfile1-dev espeak-ng time git
66
RUN apt-get install -y g++ cmake
77
ENV UV_PYTHON=/usr/local/bin/python
8-
RUN pip --no-cache-dir install uv && uv venv
8+
RUN pip --no-cache-dir install uv
99
RUN uv pip install --no-cache-dir -U pip setuptools albumentations seqeval
1010
RUN uv pip install --upgrade --no-cache-dir "git+https://github.com/huggingface/transformers.git@${REF}#egg=transformers[tf-cpu,sklearn,testing,sentencepiece,tf-speech,vision]"
1111
RUN uv pip install --no-cache-dir "protobuf==3.20.3"

docker/examples-torch.dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ ARG REF=main
44
USER root
55
RUN apt-get update && apt-get install -y --no-install-recommends libsndfile1-dev espeak-ng time git g++ cmake pkg-config openssh-client git ffmpeg
66
ENV UV_PYTHON=/usr/local/bin/python
7-
RUN pip --no-cache-dir install uv && uv venv && uv pip install --no-cache-dir -U pip setuptools
7+
RUN pip --no-cache-dir install uv && uv pip install --no-cache-dir -U pip setuptools
88
RUN uv pip install --no-cache-dir 'torch' 'torchaudio' 'torchvision' 'torchcodec' --index-url https://download.pytorch.org/whl/cpu
99
RUN uv pip install --no-deps timm accelerate --extra-index-url https://download.pytorch.org/whl/cpu
1010
RUN uv pip install --no-cache-dir librosa "git+https://github.com/huggingface/transformers.git@${REF}#egg=transformers[sklearn,sentencepiece,vision,testing]" seqeval albumentations jiwer

docker/exotic-models.dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@ ARG REF=main
44
USER root
55
RUN apt-get update && apt-get install -y libsndfile1-dev espeak-ng time git libgl1-mesa-glx libgl1 g++ tesseract-ocr
66
ENV UV_PYTHON=/usr/local/bin/python
7-
RUN pip --no-cache-dir install uv && uv venv && uv pip install --no-cache-dir -U pip setuptools
7+
RUN pip --no-cache-dir install uv && uv pip install --no-cache-dir -U pip setuptools
88
RUN uv pip install --no-cache-dir 'torch' 'torchaudio' 'torchvision' --index-url https://download.pytorch.org/whl/cpu
99
RUN uv pip install --no-cache-dir --no-deps timm accelerate
10-
RUN pip install -U --upgrade-strategy eager --no-cache-dir pytesseract python-Levenshtein opencv-python nltk
10+
RUN uv pip install -U --upgrade-strategy eager --no-cache-dir pytesseract python-Levenshtein opencv-python nltk
1111
# RUN uv pip install --no-cache-dir natten==0.15.1+torch210cpu -f https://shi-labs.com/natten/wheels
1212
RUN uv pip install --no-cache-dir "git+https://github.com/huggingface/transformers.git@${REF}#egg=transformers[testing, vision]" 'scikit-learn' 'torch-stft' 'nose' 'dataset'
1313
# RUN git clone https://github.com/facebookresearch/detectron2.git

docker/jax-light.dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ ARG REF=main
44
USER root
55
RUN apt-get update && apt-get install -y libsndfile1-dev espeak-ng time git g++ cmake
66
ENV UV_PYTHON=/usr/local/bin/python
7-
RUN pip --no-cache-dir install uv && uv venv && uv pip install --no-cache-dir -U pip setuptools
7+
RUN pip --no-cache-dir install uv && uv pip install --no-cache-dir -U pip setuptools
88
RUN uv pip install --no-cache-dir "scipy<1.13" "git+https://github.com/huggingface/transformers.git@${REF}#egg=transformers[flax,testing,sentencepiece,flax-speech,vision]"
99
RUN uv pip uninstall transformers
1010
RUN apt-get clean && rm -rf /var/lib/apt/lists/* && apt-get autoremove && apt-get autoclean

docker/pipeline-tf.dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ ARG REF=main
44
USER root
55
RUN apt-get update && apt-get install -y libsndfile1-dev espeak-ng time git cmake g++
66
ENV UV_PYTHON=/usr/local/bin/python
7-
RUN pip --no-cache-dir install uv && uv venv && uv pip install --no-cache-dir -U pip setuptools
7+
RUN pip --no-cache-dir install uv && uv pip install --no-cache-dir -U pip setuptools
88
RUN uv pip install --no-cache-dir "git+https://github.com/huggingface/transformers.git@${REF}#egg=transformers[sklearn,tf-cpu,testing,sentencepiece,tf-speech,vision]"
99
RUN uv pip install --no-cache-dir "protobuf==3.20.3" tensorflow_probability
1010
RUN apt-get clean && rm -rf /var/lib/apt/lists/*

0 commit comments

Comments
 (0)