Skip to content

Commit 4e2e8eb

Browse files
committed
a
1 parent 6789518 commit 4e2e8eb

File tree

3 files changed

+9
-19
lines changed

3 files changed

+9
-19
lines changed

Dockerfile.tmpl

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,12 @@ FROM ${BASE_IMAGE}:${BASE_IMAGE_TAG}
66
ADD kaggle_requirements.txt /kaggle_requirements.txt
77

88
# Freeze existing requirements from base image for critical packages:
9-
RUN pip freeze | grep -E 'tensorflow|keras|torch|jax|numpy' > /colab_requirements.txt
9+
RUN pip freeze | grep -E 'tensorflow|keras|torch|jax' > /colab_requirements.txt
1010

1111
# Merge requirements files:
1212
RUN cat /colab_requirements.txt >> /requirements.txt
1313
RUN cat /kaggle_requirements.txt >> /requirements.txt
1414

15-
# TODO: GPU requirements.txt
16-
# TODO: merge them better (override matching ones).
17-
1815
# Install Kaggle packages
1916
RUN uv pip install --system -r /requirements.txt
2017

@@ -36,8 +33,10 @@ RUN uv pip install --system "tbb>=2022" "libpysal==4.9.2"
3633
# b/415358158: Gensim removed from Colab image to upgrade scipy
3734
# b/456239669: remove huggingface-hub pin when pytorch-lighting and transformer are compatible
3835
# b/315753846: Unpin translate package, currently conflicts with adk 1.17.0
39-
RUN uv pip install --system --force-reinstall --no-deps torchtune gensim "scipy<=1.15.3" "huggingface-hub==0.36.0" "google-cloud-translate==3.12.1" "numpy==2.0.2"
40-
36+
# b/(xxxxx): Unpin Pandas once cuml/cudf are compatible, version 3.0 causes issues
37+
# b/(xxxxx): Unpin protobuf, v > 5.29.5 causes issues with numerous packages
38+
# b/(xxxxx): numpy will auto-upgrade to 2.4.x, which causes issues with numerous packages
39+
RUN uv pip install --system --force-reinstall --no-deps torchtune gensim "scipy<=1.15.3" "huggingface-hub==0.36.0" "google-cloud-translate==3.12.1" "numpy==2.0.2" "pandas==2.2.2"
4140
RUN uv pip install --system --force-reinstall "protobuf==5.29.5"
4241

4342
# Adding non-package dependencies:

kaggle_requirements.txt

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,7 @@ Pympler
99
Rtree
1010
shapely
1111
SimpleITK
12-
# b/302136621: Fix eli5 import for learntools, newer version require scikit-learn > 1.3
13-
TPOT==0.12.1
12+
TPOT
1413
Wand
1514
annoy
1615
arrow
@@ -30,9 +29,6 @@ docker
3029
easyocr
3130
emoji
3231
fastcore
33-
# b/445960030: Requires a newer version of fastai than the currently used base image.
34-
# Remove when relying on a newer base image.
35-
fastai>=2.8.4
3632
fasttext
3733
featuretools
3834
fiona
@@ -126,6 +122,8 @@ scikit-surprise
126122
seaborn
127123
git+https://github.com/facebookresearch/segment-anything.git
128124
shap
125+
# b/(xxxxx): unpin, currently needed as dependency for tsfresh
126+
statsmodels==0.14.6
129127
squarify
130128
tensorflow-cloud
131129
tensorflow-io
@@ -136,11 +134,5 @@ torchtune
136134
transformers>=4.51.0
137135
vtk
138136
wavio
139-
# b/350573866: xgboost v2.1.0 breaks learntools
140-
xgboost==2.0.3
141137
xvfbwrapper
142138
ydata-profiling
143-
ydf
144-
protobuf==5.29.5
145-
numpy==2.0.2
146-
statsmodels==0.14.6

tests/test_xgboost.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,9 @@ def test_classifier(self):
1717
X_test = np.random.random((100, 28))
1818
y_test = np.random.randint(10, size=(100, 1))
1919

20-
xgb1 = XGBClassifier(n_estimators=3, use_label_encoder=False)
20+
xgb1 = XGBClassifier(n_estimators=3, use_label_encoder=False, eval_metric='mlogloss')
2121
xgb1.fit(
2222
X_train, y_train,
2323
eval_set=[(X_train, y_train), (X_test, y_test)],
24-
eval_metric='mlogloss'
2524
)
2625
self.assertIn("validation_0", xgb1.evals_result())

0 commit comments

Comments
 (0)