diff --git a/components/resnet-cmle/resnet/resnet_model/trainer/resnet_main.py b/components/resnet-cmle/resnet/resnet_model/trainer/resnet_main.py index 1a0039470e1..8cf3bc565a4 100644 --- a/components/resnet-cmle/resnet/resnet_model/trainer/resnet_main.py +++ b/components/resnet-cmle/resnet/resnet_model/trainer/resnet_main.py @@ -405,6 +405,7 @@ def main(unused_argv): per_host_input_for_training=tpu_config.InputPipelineConfig.PER_HOST_V2)) # pylint: disable=line-too-long resnet_classifier = tpu_estimator.TPUEstimator( + export_to_tpu=False, use_tpu=FLAGS.use_tpu, model_fn=resnet_model_fn, config=config, diff --git a/sdk/python/kfp/gcp.py b/sdk/python/kfp/gcp.py index 9b346d4b56b..6b11fb745ae 100644 --- a/sdk/python/kfp/gcp.py +++ b/sdk/python/kfp/gcp.py @@ -53,6 +53,13 @@ def _use_gcp_secret(task): value=secret_volume_mount_path + secret_file_path_in_volume, ) ) + .add_env_variable( + k8s_client.V1EnvVar( + name='CLOUDSDK_AUTH_CREDENTIAL_FILE_OVERRIDE', + value=secret_volume_mount_path + secret_file_path_in_volume, + ) + ) # Set GCloud Credentials by using the env var override. + # TODO: Is there a better way for GCloud to pick up the credential? ) return _use_gcp_secret