Skip to content

Commit bb13ea0

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 9b7dc29 commit bb13ea0

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
@@ -2007,14 +2007,16 @@ async def create_from_pandas(
20072007
credentials = self._api_client._credentials
20082008

20092009
if target_table_id:
2010-
target_table_id = _datasets_utils._normalize_and_validate_table_id(
2011-
table_id=target_table_id,
2012-
project=project,
2013-
location=location,
2014-
credentials=credentials,
2010+
target_table_id = (
2011+
await _datasets_utils._normalize_and_validate_table_id_async(
2012+
table_id=target_table_id,
2013+
project=project,
2014+
location=location,
2015+
credentials=credentials,
2016+
)
20152017
)
20162018
else:
2017-
dataset_id = _datasets_utils._create_default_bigquery_dataset_if_not_exists(
2019+
dataset_id = await _datasets_utils._create_default_bigquery_dataset_if_not_exists_async(
20182020
project=project, location=location, credentials=credentials
20192021
)
20202022
target_table_id = _datasets_utils._generate_target_table_id(dataset_id)

0 commit comments

Comments
 (0)