Skip to content

Commit 1295320

Browse files
committed
reviewer feedback
1 parent 2479f1f commit 1295320

File tree

4 files changed

+15
-58
lines changed

4 files changed

+15
-58
lines changed

Dockerfile.tmpl

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -31,27 +31,20 @@ RUN uv pip install --system -r /requirements.txt
3131
RUN uv pip uninstall --system google-cloud-bigquery-storage
3232

3333
# b/394382016: sigstore (dependency of kagglehub) requires a prerelease packages, installing separate.
34-
# b/408284143: google-cloud-automl 2.0.0 introduced incompatible API changes, need to pin to 1.0.1
34+
# b/408284143: google-cloud-automl 2.0.0 introduced incompatible API changes, need to pin to 1.0.1,
35+
# installed outside of kaggle_requirements.txt due to requiring an incompatibile version of protobuf.
3536
RUN uv pip install --system --force-reinstall --prerelease=allow kagglehub[pandas-datasets,hf-datasets,signing]>=0.3.12 \
3637
google-cloud-automl==1.0.1
3738

38-
# b/408284435: Keras 3.6 broke test_keras.py > test_train > keras.datasets.mnist.load_data()
39-
# See https://github.com/keras-team/keras/commit/dcefb139863505d166dd1325066f329b3033d45a
40-
# Colab base is on Keras 3.8, we have to install the package separately
41-
RUN uv pip install --system "keras<3.6"
42-
4339
# uv cannot install this in requirements.txt without --no-build-isolation
4440
# to avoid affecting the larger build, we'll post-install it.
4541
RUN uv pip install --no-build-isolation --system "git+https://github.com/Kaggle/learntools"
4642

43+
# b/302136621: Fix eli5 import for learntools
4744
# b/408281617: Torch is adamant that it can not install cudnn 9.3.x, only 9.1.x, but Tensorflow can only support 9.3.x.
4845
# This conflict causes a number of package downgrades, which are handled in this command
49-
# b/302136621: Fix eli5 import for learntools
50-
# b/416137032: cuda 12.9.0 breaks datashader 1.18.0
5146
RUN uv pip install --system --force-reinstall --extra-index-url https://pypi.nvidia.com "cuml-cu12==25.2.1" \
52-
"nvidia-cudnn-cu12==9.3.0.75" cuda-bindings==12.8.0 cuda-python==12.8.0 \
53-
scipy tsfresh scikit-learn==1.2.2 category-encoders eli5
54-
47+
"nvidia-cudnn-cu12==9.3.0.75"
5548
RUN uv pip install --system --force-reinstall "pynvjitlink-cu12==0.5.2"
5649

5750
# b/385145217 Latest Colab lacks mkl numpy, install it.

kaggle_requirements.txt

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,18 +20,20 @@ arrow
2020
bayesian-optimization
2121
boto3
2222
catboost
23+
category-encoders
2324
cesium
2425
comm
2526
cytoolz
2627
dask-expr
2728
# Older versions of datasets fail with "Loading a dataset cached in a LocalFileSystem is not supported"
2829
# https://stackoverflow.com/questions/77433096/notimplementederror-loading-a-dataset-cached-in-a-localfilesystem-is-not-suppor
2930
datasets>=2.14.6
30-
datashader
3131
deap
3232
dipy
3333
docker
3434
easyocr
35+
# b/302136621: Fix eli5 import for learntools
36+
eli5
3537
emoji
3638
fastcore>=1.7.20
3739
fasttext
@@ -119,12 +121,15 @@ qtconsole
119121
ray
120122
rgf-python
121123
s3fs
124+
scikit-learn==1.2.2
122125
# Scikit-learn accelerated library for x86
123126
scikit-learn-intelex>=2023.0.1
124127
scikit-multilearn
125128
scikit-optimize
126129
scikit-plot
127130
scikit-surprise
131+
# b/415358158: Gensim removed from Colab image to upgrade scipy to 1.14.1
132+
scipy==1.15.1
128133
# Also pinning seaborn for learntools
129134
seaborn==0.12.2
130135
git+https://github.com/facebookresearch/segment-anything.git

tests/test_datashader.py

Lines changed: 0 additions & 42 deletions
This file was deleted.

tests/test_keras.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,11 @@
99

1010
class TestKeras(unittest.TestCase):
1111
def test_train(self):
12-
# Load the data and split it between train and test sets
13-
(x_train, y_train), (x_test, y_test) = keras.datasets.mnist.load_data(
14-
path='/input/tests/data/mnist.npz'
15-
)
12+
path = '/input/tests/data/mnist.npz'
13+
with np.load(path) as f:
14+
x_train, y_train = f['x_train'], f['y_train']
15+
x_test, y_test = f['x_test'], f['y_test']
16+
1617

1718
# Scale images to the [0, 1] range
1819
x_train = x_train.astype("float32") / 255

0 commit comments

Comments
 (0)