Skip to content

FunctionGemma: Conversion to .litertlm for on-device deployment - unable to install dependencies #274

@markuman

Description

@markuman

Description of the bug:

https://github.com/google-gemini/gemma-cookbook/blob/main/FunctionGemma/%5BFunctionGemma%5DFinetune_FunctionGemma_270M_for_Mobile_Actions_with_Hugging_Face.ipynb?short_path=1a3c7ea#L1736-L1739

Results in

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.
tensorflow-decision-forests 1.12.0 requires tensorflow==2.19.0, which is not installed.
ipython 7.34.0 requires jedi>=0.16, which is not installed.
dopamine-rl 4.1.2 requires tensorflow>=2.2.0, which is not installed.
google-colab 1.0.0 requires requests==2.32.4, but you have requests 2.32.5 which is incompatible.
datasets 4.0.0 requires fsspec[http]<=2025.3.0,>=2023.1.0, but you have fsspec 2025.12.0 which is incompatible.
bigframes 2.31.0 requires rich<14,>=12.4.4, but you have rich 14.2.0 which is incompatible.
opencv-python-headless 4.12.0.88 requires numpy<2.3.0,>=2; python_version >= "3.9", but you have numpy 2.4.0 which is incompatible.
grpcio-status 1.71.2 requires protobuf<6.0dev,>=5.26.1, but you have protobuf 6.33.2 which is incompatible.
google-ai-generativelanguage 0.6.15 requires protobuf!=4.21.0,!=4.21.1,!=4.21.2,!=4.21.3,!=4.21.4,!=4.21.5,<6.0.0dev,>=3.20.2, but you have protobuf 6.33.2 which is incompatible.
gradio 5.50.0 requires pillow<12.0,>=8.0, but you have pillow 12.0.0 which is incompatible.
opencv-python 4.12.0.88 requires numpy<2.3.0,>=2; python_version >= "3.9", but you have numpy 2.4.0 which is incompatible.
torchaudio 2.9.0+cu126 requires torch==2.9.0, but you have torch 2.9.1 which is incompatible.
torchvision 0.24.0+cu126 requires torch==2.9.0, but you have torch 2.9.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 2.4.0 which is incompatible.
numba 0.60.0 requires numpy<2.1,>=1.22, but you have numpy 2.4.0 which is incompatible.
gcsfs 2025.3.0 requires fsspec==2025.3.0, but you have fsspec 2025.12.0 which is incompatible.
Successfully installed MarkupSafe-3.0.3 absl-py-2.3.1 ai-edge-litert-nightly-2.2.0.dev20251225 ai-edge-quantizer-nightly-0.5.0.dev20251226 ai-edge-torch-nightly-0.8.0.dev20251226 astunparse-1.6.3 backports.strenum-1.2.8 certifi-2025.11.12 charset_normalizer-3.4.4 filelock-3.20.1 flatbuffers-25.12.19 fsspec-2025.12.0 gast-0.7.0 google_pasta-0.2.0 grpcio-1.76.0 h5py-3.14.0 hf-xet-1.2.0 huggingface-hub-0.36.0 idna-3.11 immutabledict-4.2.2 iniconfig-2.3.0 jax-0.8.2 jaxlib-0.8.2 jinja2-3.1.6 kagglehub-0.3.13 keras-nightly-3.14.0.dev2025122604 libclang-18.1.1 markdown-3.10 markdown-it-py-4.0.0 mdurl-0.1.2 ml_dtypes-0.5.4 mpmath-1.3.0 multipledispatch-1.0.0 namex-0.1.0 networkx-3.6.1 numpy-2.4.0 nvidia-cublas-cu12-12.8.4.1 nvidia-cuda-cupti-cu12-12.8.90 nvidia-cuda-nvrtc-cu12-12.8.93 nvidia-cuda-runtime-cu12-12.8.90 nvidia-cudnn-cu12-9.10.2.21 nvidia-cufft-cu12-11.3.3.83 nvidia-cufile-cu12-1.13.1.3 nvidia-curand-cu12-10.3.9.90 nvidia-cusolver-cu12-11.7.3.90 nvidia-cusparse-cu12-12.5.8.93 nvidia-cusparselt-cu12-0.7.1 nvidia-nccl-cu12-2.27.5 nvidia-nvjitlink-cu12-12.8.93 nvidia-nvshmem-cu12-3.3.20 nvidia-nvtx-cu12-12.8.90 opt_einsum-3.4.0 optree-0.18.0 packaging-25.0 pillow-12.0.0 pluggy-1.6.0 protobuf-6.33.2 pygments-2.19.2 pytest-9.0.2 pyyaml-6.0.3 regex-2025.11.3 requests-2.32.5 rich-14.2.0 safetensors-0.7.0 scipy-1.16.3 setuptools-80.9.0 six-1.17.0 sympy-1.14.0 tabulate-0.9.0 tb-nightly-2.20.0a20250717 tensorboard-data-server-0.7.2 termcolor-3.2.0 tf-nightly-2.21.0.dev20251225 tokenizers-0.22.1 torch-2.9.1 torch-xla2-0.0.1.dev202412041639 tqdm-4.67.1 transformers-4.57.3 triton-3.5.1 typing_extensions-4.15.0 urllib3-2.6.2 werkzeug-3.1.4 wheel-0.45.1 wrapt-2.0.1

WARNING: The following packages were previously imported in this runtime:
  [PIL,_distutils_hack,certifi,google,numpy,packaging,six]
You must restart the runtime in order to use newly installed versions.

Actual vs expected behavior:

No response

Any other information you'd like to share?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions