Commit 8e52bd2
feat: GenAI SDK client(multimodal) - Return the assembled table as a DataFrame from
BREAKING CHANGE: `datasets.assemble` now returns `tuple[str, Optional[bigframes.pandas.DataFrame]]` (the BigQuery table id without the `bq://` prefix, and the assembled table as a BigFrames DataFrame) instead of the BigQuery URI `str`. By default no DataFrame is loaded (`load_dataframe=False`): the second element is `None`, no BigQuery read is performed, and `bigframes` is not required. Pass `load_dataframe=True` to load the assembled table.
Before:
```
uri = client.datasets.assemble(name=..., gemini_request_read_config=...)
```
After:
```
# Returns a (table_id, dataframe) tuple; no DataFrame is loaded by default.
table_id, _ = client.datasets.assemble(name=..., gemini_request_read_config=...)
# Pass load_dataframe=True to also get the assembled table as a BigFrames DataFrame.
table_id, df = client.datasets.assemble(
name=..., gemini_request_read_config=..., load_dataframe=True
)
```
PiperOrigin-RevId: 938035395datasets.assemble.1 parent 35edd83 commit 8e52bd2
3 files changed
Lines changed: 140 additions & 12 deletions
File tree
- agentplatform/_genai
- tests/unit/agentplatform/genai/replays
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
280 | 280 | | |
281 | 281 | | |
282 | 282 | | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
283 | 340 | | |
284 | 341 | | |
285 | 342 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1324 | 1324 | | |
1325 | 1325 | | |
1326 | 1326 | | |
| 1327 | + | |
1327 | 1328 | | |
1328 | | - | |
| 1329 | + | |
1329 | 1330 | | |
1330 | 1331 | | |
1331 | 1332 | | |
| |||
1338 | 1339 | | |
1339 | 1340 | | |
1340 | 1341 | | |
| 1342 | + | |
| 1343 | + | |
| 1344 | + | |
| 1345 | + | |
| 1346 | + | |
1341 | 1347 | | |
1342 | 1348 | | |
1343 | 1349 | | |
1344 | 1350 | | |
1345 | 1351 | | |
1346 | | - | |
| 1352 | + | |
| 1353 | + | |
| 1354 | + | |
| 1355 | + | |
1347 | 1356 | | |
1348 | 1357 | | |
1349 | 1358 | | |
| |||
1363 | 1372 | | |
1364 | 1373 | | |
1365 | 1374 | | |
1366 | | - | |
| 1375 | + | |
| 1376 | + | |
| 1377 | + | |
| 1378 | + | |
| 1379 | + | |
| 1380 | + | |
| 1381 | + | |
| 1382 | + | |
| 1383 | + | |
| 1384 | + | |
| 1385 | + | |
1367 | 1386 | | |
1368 | 1387 | | |
1369 | 1388 | | |
| |||
2713 | 2732 | | |
2714 | 2733 | | |
2715 | 2734 | | |
| 2735 | + | |
2716 | 2736 | | |
2717 | | - | |
| 2737 | + | |
2718 | 2738 | | |
2719 | 2739 | | |
2720 | 2740 | | |
| |||
2727 | 2747 | | |
2728 | 2748 | | |
2729 | 2749 | | |
| 2750 | + | |
| 2751 | + | |
| 2752 | + | |
| 2753 | + | |
| 2754 | + | |
2730 | 2755 | | |
2731 | 2756 | | |
2732 | 2757 | | |
2733 | 2758 | | |
2734 | 2759 | | |
2735 | | - | |
| 2760 | + | |
| 2761 | + | |
| 2762 | + | |
| 2763 | + | |
2736 | 2764 | | |
2737 | 2765 | | |
2738 | 2766 | | |
| |||
2752 | 2780 | | |
2753 | 2781 | | |
2754 | 2782 | | |
2755 | | - | |
| 2783 | + | |
| 2784 | + | |
| 2785 | + | |
| 2786 | + | |
| 2787 | + | |
| 2788 | + | |
| 2789 | + | |
| 2790 | + | |
| 2791 | + | |
| 2792 | + | |
| 2793 | + | |
2756 | 2794 | | |
2757 | 2795 | | |
2758 | 2796 | | |
| |||
Lines changed: 39 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| 17 | + | |
| 18 | + | |
17 | 19 | | |
| 20 | + | |
18 | 21 | | |
19 | 22 | | |
| 23 | + | |
20 | 24 | | |
21 | 25 | | |
22 | 26 | | |
| |||
26 | 30 | | |
27 | 31 | | |
28 | 32 | | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
29 | 52 | | |
30 | 53 | | |
31 | 54 | | |
| |||
38 | 61 | | |
39 | 62 | | |
40 | 63 | | |
41 | | - | |
42 | | - | |
| 64 | + | |
| 65 | + | |
43 | 66 | | |
44 | 67 | | |
45 | 68 | | |
| |||
54 | 77 | | |
55 | 78 | | |
56 | 79 | | |
| 80 | + | |
57 | 81 | | |
58 | | - | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
59 | 87 | | |
60 | 88 | | |
61 | 89 | | |
| |||
80 | 108 | | |
81 | 109 | | |
82 | 110 | | |
83 | | - | |
84 | | - | |
| 111 | + | |
| 112 | + | |
85 | 113 | | |
86 | 114 | | |
87 | 115 | | |
| |||
96 | 124 | | |
97 | 125 | | |
98 | 126 | | |
| 127 | + | |
99 | 128 | | |
100 | | - | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
0 commit comments