Skip to content

Commit 620d7e7

Browse files
cleop-googlecopybara-github
authored andcommitted
fix: GenAI SDK client(multimodal) - Replace blocking calls in create_from_pandas with async versions.
PiperOrigin-RevId: 888142006
1 parent 6f7b12c commit 620d7e7

1 file changed

Lines changed: 8 additions & 6 deletions

File tree

vertexai/_genai/datasets.py

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2002,14 +2002,16 @@ async def create_from_pandas(
20022002
credentials = self._api_client._credentials
20032003

20042004
if target_table_id:
2005-
target_table_id = _datasets_utils._normalize_and_validate_table_id(
2006-
table_id=target_table_id,
2007-
project=project,
2008-
location=location,
2009-
credentials=credentials,
2005+
target_table_id = (
2006+
await _datasets_utils._normalize_and_validate_table_id_async(
2007+
table_id=target_table_id,
2008+
project=project,
2009+
location=location,
2010+
credentials=credentials,
2011+
)
20102012
)
20112013
else:
2012-
dataset_id = _datasets_utils._create_default_bigquery_dataset_if_not_exists(
2014+
dataset_id = await _datasets_utils._create_default_bigquery_dataset_if_not_exists_async(
20132015
project=project, location=location, credentials=credentials
20142016
)
20152017
target_table_id = _datasets_utils._generate_target_table_id(dataset_id)

0 commit comments

Comments
 (0)