Compare commits
8 Commits
main
...
maybe-fix-ci
| Author | SHA1 | Date | |
|---|---|---|---|
| ae1c1d88ed | |||
| c50715bbc6 | |||
| f14dbc011a | |||
| 4767547e91 | |||
| 9522d34bea | |||
| 50befc6312 | |||
| 8c07129182 | |||
| fb6aae6476 |
@@ -110,9 +110,8 @@ jobs:
|
||||
run: |
|
||||
python -m venv /opt/venv && export PATH="/opt/venv/bin:$PATH"
|
||||
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 && 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 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
|
||||
run: |
|
||||
|
||||
@@ -116,9 +116,8 @@ jobs:
|
||||
run: |
|
||||
python -m venv /opt/venv && export PATH="/opt/venv/bin:$PATH"
|
||||
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 && 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 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
|
||||
run: |
|
||||
@@ -254,10 +253,9 @@ jobs:
|
||||
python -m uv pip install -e [quality,test]
|
||||
# TODO (sayakpaul, DN6): revisit `--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 transformers@git+https://github.com/huggingface/transformers.git --no-deps
|
||||
# python -m uv pip install -U tokenizers
|
||||
# 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 accelerate -y && python -m uv pip install -U accelerate@git+https://github.com/huggingface/accelerate.git --no-deps
|
||||
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
|
||||
|
||||
- name: Environment
|
||||
run: |
|
||||
|
||||
@@ -132,9 +132,8 @@ jobs:
|
||||
run: |
|
||||
python -m venv /opt/venv && export PATH="/opt/venv/bin:$PATH"
|
||||
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 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
|
||||
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
|
||||
|
||||
- name: Environment
|
||||
run: |
|
||||
@@ -204,9 +203,8 @@ jobs:
|
||||
python -m venv /opt/venv && export PATH="/opt/venv/bin:$PATH"
|
||||
python -m uv pip install -e [quality,test]
|
||||
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 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
|
||||
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
|
||||
|
||||
- name: Environment
|
||||
run: |
|
||||
@@ -268,8 +266,7 @@ jobs:
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
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 && python -m uv pip install -U transformers@git+https://github.com/huggingface/transformers.git --no-deps
|
||||
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
|
||||
python -m uv pip install -e [quality,test,training]
|
||||
|
||||
- name: Environment
|
||||
|
||||
@@ -243,8 +243,8 @@ class ModelUtilsTest(unittest.TestCase):
|
||||
else:
|
||||
_ = load_model(repo_id)
|
||||
|
||||
warning_message = str(warning.warnings[0].message)
|
||||
self.assertIn("This serialization format is now deprecated to standardize the serialization", warning_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_messages)
|
||||
|
||||
# Local tests are already covered down below.
|
||||
@parameterized.expand(
|
||||
@@ -298,11 +298,13 @@ class ModelUtilsTest(unittest.TestCase):
|
||||
raise_for_status=mock.Mock(side_effect=HfHubHTTPError("Server down", response=mock.Mock())),
|
||||
json=mock.Mock(return_value={}),
|
||||
)
|
||||
client_mock = mock.Mock()
|
||||
client_mock.get.return_value = error_response
|
||||
|
||||
with tempfile.TemporaryDirectory() as 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)
|
||||
# We would make a network call with model_info
|
||||
with self.assertRaises(OSError):
|
||||
|
||||
Reference in New Issue
Block a user