|
44 | 44 | },
|
45 | 45 | {
|
46 | 46 | "cell_type": "code",
|
47 |
| - "execution_count": 2, |
| 47 | + "execution_count": 3, |
48 | 48 | "metadata": {},
|
49 | 49 | "outputs": [],
|
50 | 50 | "source": [
|
|
56 | 56 | "cell_type": "markdown",
|
57 | 57 | "metadata": {},
|
58 | 58 | "source": [
|
59 |
| - "### Create Gemini 2.0 experimental Model with model_name as \"gemini-1.5-flash-002\"" |
| 59 | + "### Create Gemini 2.0 experimental Model with model_name as \"gemini-2.0-flash-exp\"" |
60 | 60 | ]
|
61 | 61 | },
|
62 | 62 | {
|
63 | 63 | "cell_type": "code",
|
64 |
| - "execution_count": 3, |
| 64 | + "execution_count": 4, |
65 | 65 | "metadata": {},
|
66 | 66 | "outputs": [
|
67 | 67 | {
|
68 | 68 | "name": "stderr",
|
69 | 69 | "output_type": "stream",
|
70 | 70 | "text": [
|
71 |
| - "/tmp/ipykernel_610113/1304092015.py:1: ApiDeprecationWarning: gemini-pro and gemini-1.5-X are going to be deprecated. Use gemini-2.0-X (https://cloud.google.com/python/docs/reference/bigframes/latest/bigframes.ml.llm.GeminiTextGenerator) instead. \n", |
72 |
| - " model = llm.GeminiTextGenerator(model_name=\"gemini-1.5-flash-002\")\n", |
73 |
| - "/usr/local/google/home/shuowei/src/python-bigquery-dataframes/bigframes/ml/llm.py:981: DefaultLocationWarning: No explicit location is set, so using location US for the session.\n", |
74 |
| - " self.session = session or global_session.get_global_session()\n" |
| 71 | + "/usr/local/google/home/garrettwu/src/bigframes/bigframes/ml/llm.py:803: PreviewWarning: Model gemini-2.0-flash-exp is subject to the \"Pre-GA Offerings Terms\" in the General Service Terms section of the\n", |
| 72 | + " Service Specific Terms(https://cloud.google.com/terms/service-terms#1). Pre-GA products and features are available \"as is\"\n", |
| 73 | + " and might have limited support. For more information, see the launch stage descriptions\n", |
| 74 | + " (https://cloud.google.com/products#product-launch-stages).\n", |
| 75 | + " warnings.warn(\n", |
| 76 | + "/usr/local/google/home/garrettwu/src/bigframes/bigframes/pandas/__init__.py:435: DefaultLocationWarning: No explicit location is set, so using location US for the session.\n", |
| 77 | + " return global_session.get_global_session()\n" |
75 | 78 | ]
|
76 | 79 | },
|
77 | 80 | {
|
78 | 81 | "data": {
|
79 | 82 | "text/html": [
|
80 |
| - "Query job f9b52257-1c5a-4bb9-a619-60d7cb5cee79 is DONE. 0 Bytes processed. <a target=\"_blank\" href=\"https://console.cloud.google.com/bigquery?project=bigframes-dev&j=bq:US:f9b52257-1c5a-4bb9-a619-60d7cb5cee79&page=queryresults\">Open Job</a>" |
81 |
| - ], |
82 |
| - "text/plain": [ |
83 |
| - "<IPython.core.display.HTML object>" |
84 |
| - ] |
85 |
| - }, |
86 |
| - "metadata": {}, |
87 |
| - "output_type": "display_data" |
88 |
| - }, |
89 |
| - { |
90 |
| - "data": { |
91 |
| - "text/html": [ |
92 |
| - "Query job 592a26f7-e355-4e67-947b-f5614c34690e is DONE. 0 Bytes processed. <a target=\"_blank\" href=\"https://console.cloud.google.com/bigquery?project=bigframes-dev&j=bq:US:592a26f7-e355-4e67-947b-f5614c34690e&page=queryresults\">Open Job</a>" |
| 83 | + "Query job f673a2ea-023e-4771-84a2-fb81f808fa1b is DONE. 0 Bytes processed. <a target=\"_blank\" href=\"https://console.cloud.google.com/bigquery?project=bigframes-dev&j=bq:US:f673a2ea-023e-4771-84a2-fb81f808fa1b&page=queryresults\">Open Job</a>" |
93 | 84 | ],
|
94 | 85 | "text/plain": [
|
95 | 86 | "<IPython.core.display.HTML object>"
|
|
100 | 91 | }
|
101 | 92 | ],
|
102 | 93 | "source": [
|
103 |
| - "model = llm.GeminiTextGenerator(model_name=\"gemini-1.5-flash-002\")" |
| 94 | + "model = llm.GeminiTextGenerator(model_name=\"gemini-2.0-flash-exp\")" |
104 | 95 | ]
|
105 | 96 | },
|
106 | 97 | {
|
|
112 | 103 | },
|
113 | 104 | {
|
114 | 105 | "cell_type": "code",
|
115 |
| - "execution_count": 4, |
| 106 | + "execution_count": 5, |
116 | 107 | "metadata": {},
|
117 | 108 | "outputs": [
|
118 | 109 | {
|
119 | 110 | "data": {
|
120 | 111 | "text/html": [
|
121 |
| - "Query job 6cdfea0f-1957-4cd0-a358-d3846b2ddee1 is DONE. 0 Bytes processed. <a target=\"_blank\" href=\"https://console.cloud.google.com/bigquery?project=bigframes-dev&j=bq:US:6cdfea0f-1957-4cd0-a358-d3846b2ddee1&page=queryresults\">Open Job</a>" |
| 112 | + "Query job 2276ea5b-2e08-4ed6-af34-49a7d165d145 is DONE. 0 Bytes processed. <a target=\"_blank\" href=\"https://console.cloud.google.com/bigquery?project=bigframes-dev&j=bq:US:2276ea5b-2e08-4ed6-af34-49a7d165d145&page=queryresults\">Open Job</a>" |
122 | 113 | ],
|
123 | 114 | "text/plain": [
|
124 | 115 | "<IPython.core.display.HTML object>"
|
|
168 | 159 | "[1 rows x 1 columns]"
|
169 | 160 | ]
|
170 | 161 | },
|
171 |
| - "execution_count": 4, |
| 162 | + "execution_count": 5, |
172 | 163 | "metadata": {},
|
173 | 164 | "output_type": "execute_result"
|
174 | 165 | }
|
|
187 | 178 | },
|
188 | 179 | {
|
189 | 180 | "cell_type": "code",
|
190 |
| - "execution_count": 5, |
| 181 | + "execution_count": 6, |
191 | 182 | "metadata": {},
|
192 | 183 | "outputs": [
|
193 | 184 | {
|
194 | 185 | "data": {
|
195 | 186 | "text/html": [
|
196 |
| - "Query job 06ce82fd-3041-42ec-848a-92757aece70f is DONE. 0 Bytes processed. <a target=\"_blank\" href=\"https://console.cloud.google.com/bigquery?project=bigframes-dev&j=bq:US:06ce82fd-3041-42ec-848a-92757aece70f&page=queryresults\">Open Job</a>" |
| 187 | + "Query job 9ba21e96-6023-491e-8e83-f2e6fa7df0e7 is DONE. 0 Bytes processed. <a target=\"_blank\" href=\"https://console.cloud.google.com/bigquery?project=bigframes-dev&j=bq:US:9ba21e96-6023-491e-8e83-f2e6fa7df0e7&page=queryresults\">Open Job</a>" |
197 | 188 | ],
|
198 | 189 | "text/plain": [
|
199 | 190 | "<IPython.core.display.HTML object>"
|
|
206 | 197 | "name": "stderr",
|
207 | 198 | "output_type": "stream",
|
208 | 199 | "text": [
|
209 |
| - "/usr/local/google/home/shuowei/src/python-bigquery-dataframes/bigframes/core/array_value.py:114: PreviewWarning: JSON column interpretation as a custom PyArrow extention in\n", |
210 |
| - "`db_dtypes` is a preview feature and subject to change.\n", |
211 |
| - " warnings.warn(msg, bfe.PreviewWarning)\n" |
| 200 | + "/usr/local/google/home/garrettwu/src/bigframes/bigframes/core/__init__.py:109: PreviewWarning: Interpreting JSON column(s) as StringDtype. This behavior may change in future versions.\n", |
| 201 | + " warnings.warn(\n" |
212 | 202 | ]
|
213 | 203 | },
|
214 | 204 | {
|
215 | 205 | "data": {
|
216 | 206 | "text/html": [
|
217 |
| - "Query job 0b7f4fad-4793-4187-866a-ad45d1b8b49c is DONE. 606 Bytes processed. <a target=\"_blank\" href=\"https://console.cloud.google.com/bigquery?project=bigframes-dev&j=bq:US:0b7f4fad-4793-4187-866a-ad45d1b8b49c&page=queryresults\">Open Job</a>" |
| 207 | + "Query job 933d45cc-4bc0-4bdf-b4b8-573da2d58be3 is DONE. 2 Bytes processed. <a target=\"_blank\" href=\"https://console.cloud.google.com/bigquery?project=bigframes-dev&j=bq:US:933d45cc-4bc0-4bdf-b4b8-573da2d58be3&page=queryresults\">Open Job</a>" |
218 | 208 | ],
|
219 | 209 | "text/plain": [
|
220 | 210 | "<IPython.core.display.HTML object>"
|
|
226 | 216 | {
|
227 | 217 | "data": {
|
228 | 218 | "text/html": [
|
229 |
| - "Query job 5774da7a-23cb-45e8-bf6a-87d7ee2ebacd is DONE. 614 Bytes processed. <a target=\"_blank\" href=\"https://console.cloud.google.com/bigquery?project=bigframes-dev&j=bq:US:5774da7a-23cb-45e8-bf6a-87d7ee2ebacd&page=queryresults\">Open Job</a>" |
| 219 | + "Query job 3dda9bc6-84b1-4f4a-8891-85d25d8848ce is DONE. 4.3 kB processed. <a target=\"_blank\" href=\"https://console.cloud.google.com/bigquery?project=bigframes-dev&j=bq:US:3dda9bc6-84b1-4f4a-8891-85d25d8848ce&page=queryresults\">Open Job</a>" |
230 | 220 | ],
|
231 | 221 | "text/plain": [
|
232 | 222 | "<IPython.core.display.HTML object>"
|
|
265 | 255 | " <tbody>\n",
|
266 | 256 | " <tr>\n",
|
267 | 257 | " <th>0</th>\n",
|
268 |
| - " <td>There's no officially recognized technology or...</td>\n", |
| 258 | + " <td>Alright, let's talk about Gemini 2.0! It's a b...</td>\n", |
269 | 259 | " <td><NA></td>\n",
|
270 | 260 | " <td></td>\n",
|
271 | 261 | " <td>Tell me something about Gemini 2.0.</td>\n",
|
|
277 | 267 | ],
|
278 | 268 | "text/plain": [
|
279 | 269 | " ml_generate_text_llm_result \\\n",
|
280 |
| - "0 There's no officially recognized technology or... \n", |
| 270 | + "0 Alright, let's talk about Gemini 2.0! It's a b... \n", |
281 | 271 | "\n",
|
282 | 272 | " ml_generate_text_rai_result ml_generate_text_status \\\n",
|
283 | 273 | "0 <NA> \n",
|
|
288 | 278 | "[1 rows x 4 columns]"
|
289 | 279 | ]
|
290 | 280 | },
|
291 |
| - "execution_count": 5, |
| 281 | + "execution_count": 6, |
292 | 282 | "metadata": {},
|
293 | 283 | "output_type": "execute_result"
|
294 | 284 | }
|
|
307 | 297 | },
|
308 | 298 | {
|
309 | 299 | "cell_type": "code",
|
310 |
| - "execution_count": 6, |
| 300 | + "execution_count": 7, |
311 | 301 | "metadata": {},
|
312 | 302 | "outputs": [
|
313 | 303 | {
|
314 | 304 | "data": {
|
315 | 305 | "text/html": [
|
316 |
| - "Copy job 8fe43863-54be-4c8a-b2b3-5fdba16a1bc0 is DONE. <a target=\"_blank\" href=\"https://console.cloud.google.com/bigquery?project=bigframes-dev&j=bq:US:8fe43863-54be-4c8a-b2b3-5fdba16a1bc0&page=queryresults\">Open Job</a>" |
| 306 | + "Copy job 8e68af62-e7ab-475b-99c9-b79e8ba3c40b is DONE. <a target=\"_blank\" href=\"https://console.cloud.google.com/bigquery?project=bigframes-dev&j=bq:US:8e68af62-e7ab-475b-99c9-b79e8ba3c40b&page=queryresults\">Open Job</a>" |
317 | 307 | ],
|
318 | 308 | "text/plain": [
|
319 | 309 | "<IPython.core.display.HTML object>"
|
|
326 | 316 | "name": "stderr",
|
327 | 317 | "output_type": "stream",
|
328 | 318 | "text": [
|
329 |
| - "/usr/local/google/home/shuowei/src/python-bigquery-dataframes/bigframes/ml/llm.py:1023: ApiDeprecationWarning: gemini-pro and gemini-1.5-X are going to be deprecated. Use gemini-2.0-X (https://cloud.google.com/python/docs/reference/bigframes/latest/bigframes.ml.llm.GeminiTextGenerator) instead. \n", |
330 |
| - " model = cls(\n" |
| 319 | + "/usr/local/google/home/garrettwu/src/bigframes/bigframes/ml/llm.py:803: PreviewWarning: Model gemini-2.0-flash-exp is subject to the \"Pre-GA Offerings Terms\" in the General Service Terms section of the\n", |
| 320 | + " Service Specific Terms(https://cloud.google.com/terms/service-terms#1). Pre-GA products and features are available \"as is\"\n", |
| 321 | + " and might have limited support. For more information, see the launch stage descriptions\n", |
| 322 | + " (https://cloud.google.com/products#product-launch-stages).\n", |
| 323 | + " warnings.warn(\n" |
331 | 324 | ]
|
332 | 325 | },
|
333 | 326 | {
|
334 | 327 | "data": {
|
335 | 328 | "text/html": [
|
336 |
| - "Query job eed27608-273f-45b2-bb2e-12e1b42c5c04 is DONE. 0 Bytes processed. <a target=\"_blank\" href=\"https://console.cloud.google.com/bigquery?project=bigframes-dev&j=bq:US:eed27608-273f-45b2-bb2e-12e1b42c5c04&page=queryresults\">Open Job</a>" |
| 329 | + "Query job cae7f929-d8cb-4819-a644-ac832cdc0912 is DONE. 0 Bytes processed. <a target=\"_blank\" href=\"https://console.cloud.google.com/bigquery?project=bigframes-dev&j=bq:US:cae7f929-d8cb-4819-a644-ac832cdc0912&page=queryresults\">Open Job</a>" |
337 | 330 | ],
|
338 | 331 | "text/plain": [
|
339 | 332 | "<IPython.core.display.HTML object>"
|
|
345 | 338 | {
|
346 | 339 | "data": {
|
347 | 340 | "text/plain": [
|
348 |
| - "GeminiTextGenerator(connection_name='bigframes-dev.US.bigframes-default-connection',\n", |
349 |
| - " model_name='gemini-1.5-flash-002',\n", |
350 |
| - " session=<bigframes.session.Session object at 0x7f38e5eab7c0>)" |
| 341 | + "GeminiTextGenerator(connection_name='bigframes-dev.us.bigframes-rf-connection',\n", |
| 342 | + " model_name='gemini-2.0-flash-exp',\n", |
| 343 | + " session=<bigframes.session.Session object at 0x7f8210630370>)" |
351 | 344 | ]
|
352 | 345 | },
|
353 |
| - "execution_count": 6, |
| 346 | + "execution_count": 7, |
354 | 347 | "metadata": {},
|
355 | 348 | "output_type": "execute_result"
|
356 | 349 | }
|
|
376 | 369 | "name": "python",
|
377 | 370 | "nbconvert_exporter": "python",
|
378 | 371 | "pygments_lexer": "ipython3",
|
379 |
| - "version": "3.10.15" |
| 372 | + "version": "3.10.14" |
380 | 373 | }
|
381 | 374 | },
|
382 | 375 | "nbformat": 4,
|
|
0 commit comments