File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -62,6 +62,9 @@ py_library(
6262 ":generic_utils" ,
6363 ":io_utils" ,
6464 ":tf_inspect" ,
65+ "@pypi//numpy" ,
66+ "//:tf_nightly_with_deps" , # "//third_party/py/tensorflow:tensorflow_core"
67+ # "//third_party/tensorflow/python/util:core",
6568 ],
6669)
6770
Original file line number Diff line number Diff line change 2525import random
2626import shutil
2727import tarfile
28+ import tempfile
2829import threading
2930import time
3031import typing
@@ -275,6 +276,10 @@ def get_file(
275276 datadir_base = os .path .expanduser (cache_dir )
276277 if not os .access (datadir_base , os .W_OK ):
277278 datadir_base = os .path .join ("/tmp" , ".keras" )
279+ if os .path .exists (datadir_base ):
280+ stat = os .stat (datadir_base )
281+ if stat .st_uid != os .getuid ():
282+ datadir_base = tempfile .mkdtemp (prefix = "keras_" )
278283 datadir = os .path .join (datadir_base , cache_subdir )
279284 _makedirs_exist_ok (datadir )
280285
You can’t perform that action at this time.
0 commit comments