Skip to content

Commit f0079aa

Browse files
committed
fix
1 parent e5685f8 commit f0079aa

File tree

2 files changed

+10
-5
lines changed

2 files changed

+10
-5
lines changed

tests/system/conftest.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,8 @@ def bq_connection_name() -> str:
195195

196196
@pytest.fixture(scope="session")
197197
def 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)

tests/system/small/bigquery/test_ai.py

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff 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"])

0 commit comments

Comments
 (0)