Skip to content

Commit

Permalink
fix: LLM - Fixed tuning and evaluation when explicit credentials are …
Browse files Browse the repository at this point in the history
…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
  • Loading branch information
Ark-kun authored and Copybara-Service committed Oct 5, 2023
1 parent 6ddecf9 commit 188dffe
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion google/cloud/aiplatform/utils/gcs_utils.py
Expand Up @@ -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
Expand Down

0 comments on commit 188dffe

Please sign in to comment.