Skip to content

Commit a85fe20

Browse files
authored
Remove Gemma package due to incompatibility and pin google-adk to latest (#1520)
gemma requires "kauldron>=1.3.0" or else it fails when loading models. Unfortunately this version of kauldron is not support by google-adk causing issues with our "Five days of AI" notebooks. Somehow, our package installer resolves it to a very old version (0.0.1) let's remove Gemma for now.
1 parent e66d473 commit a85fe20

File tree

3 files changed

+43
-4
lines changed

3 files changed

+43
-4
lines changed

kaggle_requirements.txt

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,8 @@ fury
3333
fuzzywuzzy
3434
geojson
3535
gensim
36-
gemma
3736
# b/443054743,b/455550872
38-
google-adk[a2a,eval]
37+
google-adk[a2a,eval]>=1.21.0
3938
google-cloud-aiplatform
4039
google-cloud-videointelligence
4140
google-cloud-vision
@@ -49,6 +48,8 @@ ipympl
4948
ipywidgets==8.1.5
5049
isoweek
5150
jedi
51+
# jitler 0.11.1 breaks simulation image
52+
jiter==0.10.0
5253
# b/276358430: fix Jupyter lsp freezing up the jupyter server
5354
jupyter-lsp==1.5.1
5455
# b/333854354: pin jupyter-server to version 2.12.5; later versions break LSP (b/333854354)
@@ -60,8 +61,6 @@ jupyterlab-lsp
6061
# Colab base image is updated more frequently.
6162
kaggle>=1.7.4.2
6263
kaggle-environments
63-
# Lastest version to support Gemma
64-
kauldron>=1.3.0
6564
keras-cv
6665
keras-nlp
6766
keras-tuner

tests/test_google_import_adk.py

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
import json
2+
import unittest
3+
import threading
4+
from urllib.parse import urlparse
5+
6+
class TestGoogleADK(unittest.TestCase):
7+
8+
def define_agent(self):
9+
from google.adk.agents import Agent
10+
from google.adk.models.google_llm import Gemini
11+
from google.adk.runners import InMemoryRunner
12+
from google.adk.tools import google_search
13+
from google.genai import types
14+
15+
retry_config = types.HttpRetryOptions(
16+
attempts=5, # Maximum retry attempts
17+
exp_base=7, # Delay multiplier
18+
initial_delay=1, # Initial delay before first retry (in seconds)
19+
http_status_codes=[429, 500, 503, 504] # Retry on these HTTP errors
20+
)
21+
22+
root_agent = Agent(
23+
name="helpful_assistant",
24+
model=Gemini(
25+
model="gemini-2.0-flash-lite",
26+
retry_options=retry_config
27+
),
28+
description="A simple agent that can answer general questions.",
29+
instruction="You are a helpful assistant. Use Google Search for current info or if unsure.",
30+
tools=[google_search],
31+
)

tests/test_jiter.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
import unittest
2+
3+
from distutils.version import StrictVersion
4+
5+
import jiter
6+
7+
class TestJiter(unittest.TestCase):
8+
def test_version(self):
9+
self.assertEqual(StrictVersion(jiter.__version__), StrictVersion("0.10.0"))

0 commit comments

Comments
 (0)