Skip to content

Commit 188dffe

Browse files
Ark-kuncopybara-github
authored andcommitted
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
1 parent 6ddecf9 commit 188dffe

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

google/cloud/aiplatform/utils/gcs_utils.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -375,7 +375,8 @@ def _upload_pandas_df_to_gcs(
375375
raise ValueError(f"Unsupported file format: {file_format}")
376376

377377
storage_client = storage.Client(
378-
credentials=initializer.global_config.credentials
378+
project=initializer.global_config.project,
379+
credentials=initializer.global_config.credentials,
379380
)
380381
storage.Blob.from_string(
381382
uri=upload_gcs_path, client=storage_client

0 commit comments

Comments
 (0)