The interactive_eager_few_shot_od_training_colab.ipynb won't run due to package version issues

In Week 2, the interactive_eager_few_shot_od_training_colab.ipynb notebook won’t run. It fails in the second cell due to package version issues:

ERROR: pip’s dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
jax 0.5.2 requires ml_dtypes>=0.4.0, but you have ml-dtypes 0.3.2 which is incompatible.
grpcio-status 1.71.2 requires grpcio>=1.71.2, but you have grpcio 1.65.5 which is incompatible.
grpcio-status 1.71.2 requires protobuf<6.0dev,>=5.26.1, but you have protobuf 4.25.8 which is incompatible.
multiprocess 0.70.15 requires dill>=0.3.7, but you have dill 0.3.1.1 which is incompatible.
ydf 0.13.0 requires protobuf<7.0.0,>=5.29.1, but you have protobuf 4.25.8 which is incompatible.
thinc 8.3.6 requires numpy<3.0.0,>=2.0.0, but you have numpy 1.26.4 which is incompatible.
tensorflow-decision-forests 1.11.0 requires tensorflow==2.18.0, but you have tensorflow 2.15.1 which is incompatible.
tensorflow-decision-forests 1.11.0 requires tf-keras~=2.17, but you have tf-keras 2.15.1 which is incompatible.
dopamine-rl 4.1.2 requires tf-keras>=2.18.0, but you have tf-keras 2.15.1 which is incompatible.
opencv-contrib-python 4.12.0.88 requires numpy<2.3.0,>=2; python_version >= “3.9”, but you have numpy 1.26.4 which is incompatible.

How to remedy this?

hi @Jean_Hausser

Are you encountering this issue in course provided Google colab?

Yes. I followed the Google colab link on this page:

Running this notebook inside the Google Colab causes the above issue.

ok @Jean_Hausser

you were suppose to add pip install tensorflow and keras version in which the codes were created and run the codes. it should work then

Refer this post comment on how to add pip install statement

1 Like

Thanks Deepti. But instead of me fixing this just for me, I’d like it if you or someone who has access to this colab notebook fixed the issue in the notebook. Two reasons for this:

  • instead of each student fixing this bug for themselves and you having to do individual support, it’d serve everyone to solve this bug just once upstream
  • this course charges 50 USD / month: I think it’s be fair to expect the provided notebooks worked as intended

@Jean_Hausser

this bug must have developed after some module has deprecated, as an when it occurs it is addressed. But changing the whole lab codes would probably require sometime.

Infact I myself have asked about the same to the l.t. of the course long back. Perhaps they might be working on it.

@chris.favila

can you provide a reason why labs are not being updated as learner has the same concern of resolving bugs.

1 Like

Hi Jean. Please try running the next cells first (unless you are prompted by Colab to restart the session). Colab has some default packages that are inconsequential to the exercise. There were some issues with this lab before but it was fixed since then. Nonetheless, I’ll bookmark this to check if anything is broken in the exercise code and another update is required.

Hi again. I can confirm that the lab can run as is. You will just have to restart the session after the installation cells as said in the instructions.

Thanks for looking into this. The code indeed runs.

I was confused because the first cells triggers a large error, and only the second cell says one can ignore dependencies errors. To fix this, add a quick line in the first cell saying one can ignore errors.

1 Like

Glad it works! Will note your suggestion for the next round of revisions. Thanks!