Skip to content

Commit 92619e4

Browse files
[Internal] make hf-xet (again) a required dependency (#3103)
* make hf-xet a required dependency * bump min version
1 parent cadb7a9 commit 92619e4

File tree

3 files changed

+10
-6
lines changed

3 files changed

+10
-6
lines changed

.github/conda/meta.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ requirements:
2121
- typing-extensions
2222
- packaging
2323
- pyyaml
24+
- hf-xet
2425
run:
2526
- python
2627
- pip
@@ -30,7 +31,7 @@ requirements:
3031
- typing-extensions
3132
- packaging
3233
- pyyaml
33-
34+
- hf-xet
3435
test:
3536
imports:
3637
- huggingface_hub

.github/workflows/python-tests.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -94,13 +94,15 @@ jobs:
9494
sudo apt install -y graphviz
9595
uv pip install "huggingface_hub[tensorflow-testing] @ ."
9696
;;
97-
98-
"Xet only")
99-
uv pip install "huggingface_hub[hf_xet] @ ."
100-
;;
10197
10298
esac
10399
100+
# If not "Xet only", we want to test upload/download with regular LFS workflow
101+
# => uninstall hf_xet to make sure we are not using it.
102+
if [[ "${{ matrix.test_name }}" != "Xet only" ]]; then
103+
uv pip uninstall hf_xet
104+
fi
105+
104106
# Run tests
105107
- name: Run tests
106108
working-directory: ./src # For code coverage to work

setup.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ def get_version() -> str:
1414
install_requires = [
1515
"filelock",
1616
"fsspec>=2023.5.0",
17+
"hf-xet>=1.1.2,<2.0.0; platform_machine=='x86_64' or platform_machine=='amd64' or platform_machine=='arm64' or platform_machine=='aarch64'",
1718
"packaging>=20.9",
1819
"pyyaml>=5.1",
1920
"requests",
@@ -62,7 +63,7 @@ def get_version() -> str:
6263
"keras<3.0",
6364
]
6465

65-
extras["hf_xet"] = ["hf-xet>=1.1.1,<2.0.0"]
66+
extras["hf_xet"] = ["hf-xet>=1.1.2,<2.0.0"]
6667

6768
extras["mcp"] = [
6869
"mcp>=1.8.0",

0 commit comments

Comments
 (0)