Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion patches/kaggle_secrets.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
import json
import os
import socket
import tensorflow_gcs_config
import urllib.request
from datetime import datetime, timedelta
from enum import Enum, unique
Expand Down Expand Up @@ -140,6 +139,9 @@ def set_tensorflow_credential(self, credential):
"""Sets the credential for use by Tensorflow both in the local notebook
and to pass to the TPU.
"""
# b/159906185: Import tensorflow_gcs_config only when this method is called to prevent preloading TensorFlow.
import tensorflow_gcs_config

# Write to a local JSON credentials file and set
# GOOGLE_APPLICATION_CREDENTIALS for tensorflow running in the notebook.
adc_path = os.path.join(
Expand Down