Install latest prerelease from huggingface_hub when installing transf… · zsc/diffusers@b596545 · GitHub
Skip to content

Commit b596545

Browse files
authored
Install latest prerelease from huggingface_hub when installing transformers from main (huggingface#12395)
* Allow prerelease when installing transformers from main * maybe better * maybe better * and now? * just bored * should be better * works now
1 parent 0e12ba7 commit b596545

4 files changed

Lines changed: 17 additions & 21 deletions

File tree

‎.github/workflows/pr_modular_tests.yml‎

Lines changed: 2 additions & 3 deletions

‎.github/workflows/pr_tests.yml‎

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -116,9 +116,8 @@ jobs:
116116
run: |
117117
python -m venv /opt/venv && export PATH="/opt/venv/bin:$PATH"
118118
python -m uv pip install -e [quality,test]
119-
# Stopping this update temporarily until the Hub RC is fully shipped and integrated.
120-
# pip uninstall transformers -y && python -m uv pip install -U transformers@git+https://github.com/huggingface/transformers.git --no-deps
121-
# pip uninstall accelerate -y && python -m uv pip install -U accelerate@git+https://github.com/huggingface/accelerate.git --no-deps
119+
pip uninstall transformers -y && pip uninstall huggingface_hub -y && python -m uv pip install --prerelease allow -U transformers@git+https://github.com/huggingface/transformers.git
120+
pip uninstall accelerate -y && python -m uv pip install -U accelerate@git+https://github.com/huggingface/accelerate.git --no-deps
122121
123122
- name: Environment
124123
run: |
@@ -254,10 +253,9 @@ jobs:
254253
python -m uv pip install -e [quality,test]
255254
# TODO (sayakpaul, DN6): revisit `--no-deps`
256255
python -m pip install -U peft@git+https://github.com/huggingface/peft.git --no-deps
257-
# Stopping this update temporarily until the Hub RC is fully shipped and integrated.
258-
# python -m uv pip install -U transformers@git+https://github.com/huggingface/transformers.git --no-deps
259-
# python -m uv pip install -U tokenizers
260-
# pip uninstall accelerate -y && python -m uv pip install -U accelerate@git+https://github.com/huggingface/accelerate.git --no-deps
256+
python -m uv pip install -U tokenizers
257+
pip uninstall accelerate -y && python -m uv pip install -U accelerate@git+https://github.com/huggingface/accelerate.git --no-deps
258+
pip uninstall transformers -y && pip uninstall huggingface_hub -y && python -m uv pip install --prerelease allow -U transformers@git+https://github.com/huggingface/transformers.git
261259
262260
- name: Environment
263261
run: |

‎.github/workflows/pr_tests_gpu.yml‎

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -132,9 +132,8 @@ jobs:
132132
run: |
133133
python -m venv /opt/venv && export PATH="/opt/venv/bin:$PATH"
134134
python -m uv pip install -e [quality,test]
135-
# Stopping this update temporarily until the Hub RC is fully shipped and integrated.
136-
# pip uninstall accelerate -y && python -m uv pip install -U accelerate@git+https://github.com/huggingface/accelerate.git
137-
# pip uninstall transformers -y && python -m uv pip install -U transformers@git+https://github.com/huggingface/transformers.git --no-deps
135+
pip uninstall accelerate -y && python -m uv pip install -U accelerate@git+https://github.com/huggingface/accelerate.git
136+
pip uninstall transformers -y && pip uninstall huggingface_hub -y && python -m uv pip install --prerelease allow -U transformers@git+https://github.com/huggingface/transformers.git
138137
139138
- name: Environment
140139
run: |
@@ -204,9 +203,8 @@ jobs:
204203
python -m venv /opt/venv && export PATH="/opt/venv/bin:$PATH"
205204
python -m uv pip install -e [quality,test]
206205
python -m uv pip install peft@git+https://github.com/huggingface/peft.git
207-
# Stopping this update temporarily until the Hub RC is fully shipped and integrated.
208-
# pip uninstall accelerate -y && python -m uv pip install -U accelerate@git+https://github.com/huggingface/accelerate.git
209-
# pip uninstall transformers -y && python -m uv pip install -U transformers@git+https://github.com/huggingface/transformers.git --no-deps
206+
pip uninstall accelerate -y && python -m uv pip install -U accelerate@git+https://github.com/huggingface/accelerate.git
207+
pip uninstall transformers -y && pip uninstall huggingface_hub -y && python -m uv pip install --prerelease allow -U transformers@git+https://github.com/huggingface/transformers.git
210208
211209
- name: Environment
212210
run: |
@@ -268,8 +266,7 @@ jobs:
268266
- name: Install dependencies
269267
run: |
270268
python -m venv /opt/venv && export PATH="/opt/venv/bin:$PATH"
271-
# Stopping this update temporarily until the Hub RC is fully shipped and integrated.
272-
# pip uninstall transformers -y && python -m uv pip install -U transformers@git+https://github.com/huggingface/transformers.git --no-deps
269+
pip uninstall transformers -y && pip uninstall huggingface_hub -y && python -m uv pip install --prerelease allow -U transformers@git+https://github.com/huggingface/transformers.git
273270
python -m uv pip install -e [quality,test,training]
274271
275272
- name: Environment

‎tests/models/test_modeling_common.py‎

Lines changed: 5 additions & 3 deletions

0 commit comments

Comments
 (0)