File tree Expand file tree Collapse file tree 2 files changed +10
-5
lines changed
Expand file tree Collapse file tree 2 files changed +10
-5
lines changed Original file line number Diff line number Diff line change @@ -195,7 +195,8 @@ def bq_connection_name() -> str:
195195
196196@pytest .fixture (scope = "session" )
197197def bq_connection (bigquery_client : bigquery .Client , bq_connection_name : str ) -> str :
198- return f"{ bigquery_client .project } .{ bigquery_client .location } .{ bq_connection_name } "
198+ # TODO(b/458169181): LOCATION casefold is needed for the mutimodal backend bug. Remove after the bug is fixed.
199+ return f"{ bigquery_client .project } .{ bigquery_client .location .casefold ()} .{ bq_connection_name } "
199200
200201
201202@pytest .fixture (scope = "session" , autouse = True )
Original file line number Diff line number Diff line change @@ -273,9 +273,11 @@ def test_ai_if(session):
273273 assert result .dtype == dtypes .BOOL_DTYPE
274274
275275
276- def test_ai_if_multi_model (session ):
276+ def test_ai_if_multi_model (session , bq_connection ):
277277 df = session .from_glob_path (
278- "gs://bigframes-dev-testing/a_multimodel/images/*" , name = "image"
278+ "gs://bigframes-dev-testing/a_multimodel/images/*" ,
279+ name = "image" ,
280+ connection = bq_connection ,
279281 )
280282
281283 result = bbq .ai .if_ ((df ["image" ], " contains an animal" ))
@@ -293,9 +295,11 @@ def test_ai_classify(session):
293295 assert result .dtype == dtypes .STRING_DTYPE
294296
295297
296- def test_ai_classify_multi_model (session ):
298+ def test_ai_classify_multi_model (session , bq_connection ):
297299 df = session .from_glob_path (
298- "gs://bigframes-dev-testing/a_multimodel/images/*" , name = "image"
300+ "gs://bigframes-dev-testing/a_multimodel/images/*" ,
301+ name = "image" ,
302+ connection = bq_connection ,
299303 )
300304
301305 result = bbq .ai .classify (df ["image" ], ["photo" , "cartoon" ])
You can’t perform that action at this time.
0 commit comments