Compare commits

...

8 Commits

Author SHA1 Message Date
Wauplin
ae1c1d88ed Merge branch 'main' into maybe-fix-ci 2025-09-29 16:55:54 +02:00
Wauplin
c50715bbc6 works now 2025-09-29 16:52:42 +02:00
Wauplin
f14dbc011a should be better 2025-09-26 12:07:03 +02:00
Wauplin
4767547e91 just bored 2025-09-26 11:48:30 +02:00
Wauplin
9522d34bea and now? 2025-09-26 11:33:04 +02:00
Wauplin
50befc6312 maybe better 2025-09-26 11:14:52 +02:00
Wauplin
8c07129182 maybe better 2025-09-26 10:56:06 +02:00
Wauplin
fb6aae6476 Allow prerelease when installing transformers from main 2025-09-26 10:49:49 +02:00
4 changed files with 17 additions and 21 deletions

View File

@@ -110,9 +110,8 @@ jobs:
run: | run: |
python -m venv /opt/venv && export PATH="/opt/venv/bin:$PATH" python -m venv /opt/venv && export PATH="/opt/venv/bin:$PATH"
python -m uv pip install -e [quality,test] python -m uv pip install -e [quality,test]
# Stopping this update temporarily until the Hub RC is fully shipped and integrated. 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
# pip uninstall transformers -y && python -m uv pip install -U transformers@git+https://github.com/huggingface/transformers.git --no-deps pip uninstall accelerate -y && python -m uv pip install -U accelerate@git+https://github.com/huggingface/accelerate.git --no-deps
# pip uninstall accelerate -y && python -m uv pip install -U accelerate@git+https://github.com/huggingface/accelerate.git --no-deps
- name: Environment - name: Environment
run: | run: |

View File

@@ -116,9 +116,8 @@ jobs:
run: | run: |
python -m venv /opt/venv && export PATH="/opt/venv/bin:$PATH" python -m venv /opt/venv && export PATH="/opt/venv/bin:$PATH"
python -m uv pip install -e [quality,test] python -m uv pip install -e [quality,test]
# Stopping this update temporarily until the Hub RC is fully shipped and integrated. 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
# pip uninstall transformers -y && python -m uv pip install -U transformers@git+https://github.com/huggingface/transformers.git --no-deps pip uninstall accelerate -y && python -m uv pip install -U accelerate@git+https://github.com/huggingface/accelerate.git --no-deps
# pip uninstall accelerate -y && python -m uv pip install -U accelerate@git+https://github.com/huggingface/accelerate.git --no-deps
- name: Environment - name: Environment
run: | run: |
@@ -254,10 +253,9 @@ jobs:
python -m uv pip install -e [quality,test] python -m uv pip install -e [quality,test]
# TODO (sayakpaul, DN6): revisit `--no-deps` # TODO (sayakpaul, DN6): revisit `--no-deps`
python -m pip install -U peft@git+https://github.com/huggingface/peft.git --no-deps python -m pip install -U peft@git+https://github.com/huggingface/peft.git --no-deps
# Stopping this update temporarily until the Hub RC is fully shipped and integrated. python -m uv pip install -U tokenizers
# python -m uv pip install -U transformers@git+https://github.com/huggingface/transformers.git --no-deps pip uninstall accelerate -y && python -m uv pip install -U accelerate@git+https://github.com/huggingface/accelerate.git --no-deps
# python -m uv pip install -U tokenizers 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
# pip uninstall accelerate -y && python -m uv pip install -U accelerate@git+https://github.com/huggingface/accelerate.git --no-deps
- name: Environment - name: Environment
run: | run: |

View File

@@ -132,9 +132,8 @@ jobs:
run: | run: |
python -m venv /opt/venv && export PATH="/opt/venv/bin:$PATH" python -m venv /opt/venv && export PATH="/opt/venv/bin:$PATH"
python -m uv pip install -e [quality,test] python -m uv pip install -e [quality,test]
# Stopping this update temporarily until the Hub RC is fully shipped and integrated. pip uninstall accelerate -y && python -m uv pip install -U accelerate@git+https://github.com/huggingface/accelerate.git
# pip uninstall accelerate -y && python -m uv pip install -U accelerate@git+https://github.com/huggingface/accelerate.git 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
# pip uninstall transformers -y && python -m uv pip install -U transformers@git+https://github.com/huggingface/transformers.git --no-deps
- name: Environment - name: Environment
run: | run: |
@@ -204,9 +203,8 @@ jobs:
python -m venv /opt/venv && export PATH="/opt/venv/bin:$PATH" python -m venv /opt/venv && export PATH="/opt/venv/bin:$PATH"
python -m uv pip install -e [quality,test] python -m uv pip install -e [quality,test]
python -m uv pip install peft@git+https://github.com/huggingface/peft.git python -m uv pip install peft@git+https://github.com/huggingface/peft.git
# Stopping this update temporarily until the Hub RC is fully shipped and integrated. pip uninstall accelerate -y && python -m uv pip install -U accelerate@git+https://github.com/huggingface/accelerate.git
# pip uninstall accelerate -y && python -m uv pip install -U accelerate@git+https://github.com/huggingface/accelerate.git 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
# pip uninstall transformers -y && python -m uv pip install -U transformers@git+https://github.com/huggingface/transformers.git --no-deps
- name: Environment - name: Environment
run: | run: |
@@ -268,8 +266,7 @@ jobs:
- name: Install dependencies - name: Install dependencies
run: | run: |
python -m venv /opt/venv && export PATH="/opt/venv/bin:$PATH" python -m venv /opt/venv && export PATH="/opt/venv/bin:$PATH"
# Stopping this update temporarily until the Hub RC is fully shipped and integrated. 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
# pip uninstall transformers -y && python -m uv pip install -U transformers@git+https://github.com/huggingface/transformers.git --no-deps
python -m uv pip install -e [quality,test,training] python -m uv pip install -e [quality,test,training]
- name: Environment - name: Environment

View File

@@ -243,8 +243,8 @@ class ModelUtilsTest(unittest.TestCase):
else: else:
_ = load_model(repo_id) _ = load_model(repo_id)
warning_message = str(warning.warnings[0].message) warning_messages = " ".join(str(w.message) for w in warning.warnings)
self.assertIn("This serialization format is now deprecated to standardize the serialization", warning_message) self.assertIn("This serialization format is now deprecated to standardize the serialization", warning_messages)
# Local tests are already covered down below. # Local tests are already covered down below.
@parameterized.expand( @parameterized.expand(
@@ -298,11 +298,13 @@ class ModelUtilsTest(unittest.TestCase):
raise_for_status=mock.Mock(side_effect=HfHubHTTPError("Server down", response=mock.Mock())), raise_for_status=mock.Mock(side_effect=HfHubHTTPError("Server down", response=mock.Mock())),
json=mock.Mock(return_value={}), json=mock.Mock(return_value={}),
) )
client_mock = mock.Mock()
client_mock.get.return_value = error_response
with tempfile.TemporaryDirectory() as tmpdir: with tempfile.TemporaryDirectory() as tmpdir:
model = FluxTransformer2DModel.from_pretrained(repo_id, subfolder="transformer", cache_dir=tmpdir) model = FluxTransformer2DModel.from_pretrained(repo_id, subfolder="transformer", cache_dir=tmpdir)
with mock.patch("requests.Session.get", return_value=error_response): with mock.patch("huggingface_hub.hf_api.get_session", return_value=client_mock):
# Should fail with local_files_only=False (network required) # Should fail with local_files_only=False (network required)
# We would make a network call with model_info # We would make a network call with model_info
with self.assertRaises(OSError): with self.assertRaises(OSError):