22
22
import bigframes
23
23
from bigframes import dataframe , dtypes , exceptions , series
24
24
25
- pytest .skip (
26
- "Semantics namespace is deprecated. " ,
27
- allow_module_level = True ,
28
- )
25
+ # pytest.skip(
26
+ # "Semantics namespace is deprecated. ",
27
+ # allow_module_level=True,
28
+ # )
29
29
30
30
SEM_OP_EXP_OPTION = "experiments.semantic_operators"
31
31
BLOB_EXP_OPTION = "experiments.blob"
@@ -86,7 +86,7 @@ def test_agg(session, gemini_flash_model, max_agg_rows, cluster_column):
86
86
cluster_column = cluster_column ,
87
87
).to_pandas ()
88
88
89
- expected_s = pd .Series (["Leonardo \n " ], dtype = dtypes .STRING_DTYPE )
89
+ expected_s = pd .Series (["Leonardo\n " ], dtype = dtypes .STRING_DTYPE )
90
90
expected_s .name = "Movies"
91
91
pandas .testing .assert_series_equal (actual_s , expected_s , check_index_type = False )
92
92
@@ -137,12 +137,13 @@ def test_agg_w_int_column(session, gemini_flash_model):
137
137
"Movies" : [
138
138
"Killers of the Flower Moon" ,
139
139
"The Great Gatsby" ,
140
+ "The Wolf of Wall Street" ,
140
141
],
141
- "Years" : [2023 , 2013 ],
142
+ "Years" : [2023 , 2013 , 2013 ],
142
143
},
143
144
session = session ,
144
145
)
145
- instruction = "Find the {Years} Leonardo DiCaprio acted in the most movies. Answer with the year only ."
146
+ instruction = "Find the {Years} Leonardo DiCaprio acted in the most movies. Your answer should be the four-digit year, returned as a string ."
146
147
147
148
with bigframes .option_context (
148
149
SEM_OP_EXP_OPTION ,
@@ -155,7 +156,7 @@ def test_agg_w_int_column(session, gemini_flash_model):
155
156
model = gemini_flash_model ,
156
157
).to_pandas ()
157
158
158
- expected_s = pd .Series (["2013 \n " ], dtype = dtypes .STRING_DTYPE )
159
+ expected_s = pd .Series (["2013\n " ], dtype = dtypes .STRING_DTYPE )
159
160
expected_s .name = "Years"
160
161
pandas .testing .assert_series_equal (actual_s , expected_s , check_index_type = False )
161
162
@@ -764,7 +765,7 @@ def test_join_with_confirmation(session, gemini_flash_model, reply, monkeypatch)
764
765
def test_self_join (session , gemini_flash_model ):
765
766
animals = dataframe .DataFrame (
766
767
data = {
767
- "animal" : ["spider " , "capybara " ],
768
+ "animal" : ["ant " , "elephant " ],
768
769
},
769
770
session = session ,
770
771
)
@@ -783,8 +784,8 @@ def test_self_join(session, gemini_flash_model):
783
784
784
785
expected_df = pd .DataFrame (
785
786
{
786
- "animal_left" : ["capybara " ],
787
- "animal_right" : ["spider " ],
787
+ "animal_left" : ["elephant " ],
788
+ "animal_right" : ["ant " ],
788
789
}
789
790
)
790
791
pandas .testing .assert_frame_equal (
0 commit comments