|
111 | 111 | # For file locking |
112 | 112 | "filelock", |
113 | 113 | # We use numpy>=1.17 to have np.random.Generator (Dataset shuffling) |
114 | | - "numpy>=1.17,<2.0.0", # Temporary upper version |
| 114 | + "numpy>=1.17", |
115 | 115 | # Backend and serialization. |
116 | 116 | # Minimum 15.0.0 to be able to cast dictionary types to their underlying types |
117 | 117 | "pyarrow>=15.0.0", |
|
166 | 166 | "pytest-xdist", |
167 | 167 | # optional dependencies |
168 | 168 | "elasticsearch<8.0.0", # 8.0 asks users to provide hosts or cloud_id when instantiating ElasticSearch() |
169 | | - "faiss-cpu>=1.6.4", |
| 169 | + "faiss-cpu>=1.8.0.post1", # Pins numpy < 2 |
170 | 170 | "jax>=0.3.14; sys_platform != 'win32'", |
171 | 171 | "jaxlib>=0.3.14; sys_platform != 'win32'", |
172 | 172 | "lz4", |
|
176 | 176 | "sqlalchemy", |
177 | 177 | "s3fs>=2021.11.1", # aligned with fsspec[http]>=2021.11.1; test only on python 3.7 for now |
178 | 178 | "protobuf<4.0.0", # 4.0.0 breaks compatibility with tensorflow<2.12 |
179 | | - "tensorflow>=2.6.0", |
| 179 | + "tensorflow>=2.6.0", # Issue installing 2.16.0 with Python 3.8; we rely on other dependencies pinning numpy < 2 |
180 | 180 | "tiktoken", |
181 | 181 | "torch>=2.0.0", |
182 | 182 | "soundfile>=0.12.1", |
183 | | - "transformers", |
| 183 | + "transformers>=4.42.0", # Pins numpy < 2 |
184 | 184 | "typing-extensions>=4.6.1", # due to conflict between apache-beam and pydantic |
185 | 185 | "zstandard", |
186 | 186 | "polars[timezone]>=0.20.0", |
|
217 | 217 | TESTS_REQUIRE.extend(VISION_REQUIRE) |
218 | 218 | TESTS_REQUIRE.extend(AUDIO_REQUIRE) |
219 | 219 |
|
| 220 | +NUMPY2_INCOMPATIBLE_LIBRARIES = [ |
| 221 | + "faiss-cpu", |
| 222 | + "librosa", |
| 223 | + "tensorflow", |
| 224 | + "transformers", |
| 225 | +] |
| 226 | +TESTS_NUMPY2_REQUIRE = [ |
| 227 | + library for library in TESTS_REQUIRE if library.partition(">")[0] not in NUMPY2_INCOMPATIBLE_LIBRARIES |
| 228 | +] |
| 229 | + |
220 | 230 | QUALITY_REQUIRE = ["ruff>=0.3.0"] |
221 | 231 |
|
222 | 232 | DOCS_REQUIRE = [ |
|
242 | 252 | "streaming": [], # for backward compatibility |
243 | 253 | "dev": TESTS_REQUIRE + QUALITY_REQUIRE + DOCS_REQUIRE, |
244 | 254 | "tests": TESTS_REQUIRE, |
| 255 | + "tests_numpy2": TESTS_NUMPY2_REQUIRE, |
245 | 256 | "metrics-tests": METRICS_TESTS_REQUIRE, |
246 | 257 | "quality": QUALITY_REQUIRE, |
247 | 258 | "benchmarks": BENCHMARKS_REQUIRE, |
|
0 commit comments