From 188dffeb2fc83b4c7c123624eb544b403f042c87 Mon Sep 17 00:00:00 2001 From: Alexey Volkov Date: Thu, 5 Oct 2023 14:26:51 -0700 Subject: [PATCH] fix: LLM - Fixed tuning and evaluation when explicit credentials are specified Fixed the `_upload_pandas_df_to_gcs` to pass the project to the `storage.Client` Otherwise the `google.cloud.Client` class tries to determine the project from the `google.auth.default()` call which fails if there are no default credentials stored in the environment. PiperOrigin-RevId: 571130525 --- google/cloud/aiplatform/utils/gcs_utils.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/google/cloud/aiplatform/utils/gcs_utils.py b/google/cloud/aiplatform/utils/gcs_utils.py index 13e4eb3cfc..9d1b9e31be 100644 --- a/google/cloud/aiplatform/utils/gcs_utils.py +++ b/google/cloud/aiplatform/utils/gcs_utils.py @@ -375,7 +375,8 @@ def _upload_pandas_df_to_gcs( raise ValueError(f"Unsupported file format: {file_format}") storage_client = storage.Client( - credentials=initializer.global_config.credentials + project=initializer.global_config.project, + credentials=initializer.global_config.credentials, ) storage.Blob.from_string( uri=upload_gcs_path, client=storage_client