Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade Ipywidgets to 8.1.5 #1440

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 22 additions & 21 deletions Dockerfile.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -167,28 +167,12 @@ RUN pip install jax[cpu] && \
RUN export PATH=/usr/local/cuda/bin:$PATH && \
export CUDA_ROOT=/usr/local/cuda && \
pip install pycuda \
pynvrtc \
# TODO(379932879): pip resolver fails when not specified.
pynvrtc==9.2 \
pynvml && \
/tmp/clean-layer.sh
{{ end }}

# b/308525631: Pin Matplotlib until seaborn can be upgraded
# to >0.13.0 (now it's stuck by a package conflict with ydata-profiling 4.5.1).
RUN JAXVER=$(pip freeze | grep -e "^jax==") && \
pip install --upgrade \
"matplotlib<3.8.0" \
# ipympl adds interactive widget support for matplotlib
ipympl==0.7.0 \
"seaborn==0.12.2" \
pyupset \
python-dateutil dask dask-expr igraph \
pyyaml joblib geopy mne pyshp \
pandas \
polars \
flax \
"${JAXVER}" && \
/tmp/clean-layer.sh

RUN apt-get update && \
apt-get install -y default-jre && \
/tmp/clean-layer.sh
Expand Down Expand Up @@ -390,8 +374,7 @@ RUN pip install bleach \
ipykernel \
ipython \
ipython-genutils \
# Fix qgrid by pinning ipywidgets https://github.com/quantopian/qgrid/issues/376
ipywidgets==7.7.1 \
ipywidgets==8.1.5 \
isoweek \
jedi \
jsonschema \
Expand Down Expand Up @@ -480,7 +463,6 @@ RUN pip install wandb \
rm -rf /opt/conda/lib/python3.10/site-packages/numpy* && \
pip install "numpy==1.26.4" && \
pip install pytorch-ignite \
qgrid \
bqplot \
earthengine-api \
transformers \
Expand Down Expand Up @@ -543,11 +525,30 @@ ENV TESSERACT_PATH=/usr/bin/tesseract \
# For Theano with MKL
MKL_THREADING_LAYER=GNU

# b/308525631: Pin Matplotlib until seaborn can be upgraded
# to >0.13.0 (now it's stuck by a package conflict with ydata-profiling 4.5.1).
RUN JAXVER=$(pip freeze | grep -e "^jax==") && \
pip install --upgrade \
"matplotlib==3.7.5" \
# ipympl adds interactive widget support for matplotlib
ipympl==0.7.0 \
"seaborn==0.12.2" \
pyupset \
python-dateutil dask dask-expr igraph \
pyyaml joblib geopy mne pyshp \
pandas \
polars \
flax \
"${JAXVER}" && \
/tmp/clean-layer.sh

# Temporary fixes and patches
# Temporary patch for Dask getting downgraded, which breaks Keras
RUN pip install --upgrade dask && \
# Stop jupyter nbconvert trying to rewrite its folder hierarchy
mkdir -p /root/.jupyter && touch /root/.jupyter/jupyter_nbconvert_config.py && touch /root/.jupyter/migrated && \
# TODO(b/380921973): Ensure only matplotlib 3.7.5 files are present.
rm -r /opt/conda/lib/python3.10/site-packages/matplotlib-3.9.2.dist-info/ && \
mkdir -p /.jupyter && touch /.jupyter/jupyter_nbconvert_config.py && touch /.jupyter/migrated && \
# Stop Matplotlib printing junk to the console on first load
sed -i "s/^.*Matplotlib is building the font cache using fc-list.*$/# Warning removed by Kaggle/g" /opt/conda/lib/python3.10/site-packages/matplotlib/font_manager.py && \
Expand Down
10 changes: 6 additions & 4 deletions tests/test_kagglehub.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,10 @@ class TestKagglehub(unittest.TestCase):
def test_login(self):
with self.assertLogs('kagglehub', level='INFO') as l:
with mock.patch("builtins.input") as mock_input:
mock_input.side_effect = ["lastplacelarry", "some-key"]
# Disabling credentials validation since network access is disabled in unittest.
kagglehub.login(validate_credentials=False)
with mock.patch("getpass.getpass") as mock_getpass:
mock_input.side_effect = ["lastplacelarry"]
mock_getpass.return_value = "some-key"

self.assertIn("credentials set", l.output[0])
kagglehub.login(validate_credentials=False)

self.assertIn("credentials set", l.output[0])
16 changes: 0 additions & 16 deletions tests/test_qgrid.py

This file was deleted.

Loading