| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent d6a167a commit 1c8da17
3 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -28,8 +28,8 @@ RUN uv pip install --no-build-isolation --no-cache --system "git+https://github. | |||
| 28 | 28 | # b/468367647: Unpin protobuf, version greater than v5.29.5 causes issues with numerous packages | |
| 29 | 29 | RUN uv pip install --system --force-reinstall --no-cache --no-deps torchtune | |
| 30 | 30 | RUN uv pip install --system --force-reinstall --no-cache "protobuf==5.29.5" | |
| 31 | - # b/493600019: Colab base image ships numba/numba-cuda that do not support NumPy 2.4; upgrade both. | ||
| 32 | - RUN uv pip install --system --force-reinstall --no-cache numba numba-cuda | ||
| 31 | + # b/493600019: Colab base image ships numba that does not support NumPy 2.4; upgrade to latest. | ||
| 32 | + RUN uv pip install --system --force-reinstall --no-cache numba | ||
| 33 | 33 | ||
| 34 | 34 | # Adding non-package dependencies: | |
| 35 | 35 | ADD clean-layer.sh /tmp/clean-layer.sh | |
@@ -40,7 +40,14 @@ ARG PACKAGE_PATH=/usr/local/lib/python3.12/dist-packages | |||
| 40 | 40 | ||
| 41 | 41 | # Install GPU-specific non-pip packages. | |
| 42 | 42 | {{ if eq .Accelerator "gpu" }} | |
| 43 | + # b/493600019: numba-cuda v0.30.0 fixes np.trapz removal in NumPy 2.4 but requires libcudart.so (GPU only). | ||
| 44 | + RUN uv pip install --system --force-reinstall --no-cache numba-cuda | ||
| 43 | 45 | RUN uv pip install --system --no-cache "pycuda" | |
| 46 | + {{ else }} | ||
| 47 | + # b/493600019: On CPU, remove numba-cuda shipped by the Colab base image. Newer numba-cuda | ||
| 48 | + # depends on cuda-bindings which crashes at import without libcudart.so. Packages like | ||
| 49 | + # tsfresh/stumpy that import numba.cuda will fall back gracefully without it. | ||
| 50 | + RUN uv pip uninstall --system numba-cuda 2>/dev/null || true | ||
| 44 | 51 | {{ end }} | |
| 45 | 52 | ||
| 46 | 53 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,7 +1,7 @@ | |||
| 1 | 1 | import unittest | |
| 2 | 2 | ||
| 3 | 3 | import numpy as np | |
| 4 | - from numba import jit, cuda | ||
| 4 | + from numba import jit | ||
| 5 | 5 | ||
| 6 | 6 | from common import gpu_test | |
| 7 | 7 | ||
@@ -20,6 +20,8 @@ def go_fast(a): # Function is compiled to machine code when called the first tim | |||
| 20 | 20 | ||
| 21 | 21 | @gpu_test | |
| 22 | 22 | def test_cuda_jit(self): | |
| 23 | + from numba import cuda | ||
| 24 | + | ||
| 23 | 25 | x = np.arange(10) | |
| 24 | 26 | ||
| 25 | 27 | @cuda.jit | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -14,5 +14,3 @@ def test_extract_feature(self): | |||
| 14 | 14 | }) | |
| 15 | 15 | extracted_features = extract_features(ts, column_id='id', column_sort='time', n_jobs=1) | |
| 16 | 16 | self.assertEqual(2, len(extracted_features)) | |
| 17 | - | ||
| 18 | - | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments