New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
tf.keras.utils.get_file inconsistent behavior with keras.utils.get_file #38831
Comments
Was able to reproduce the issue with TF v2.1, TF v2.2.0-rc3 and TF-nightly. Please find the attached gist. Thanks! |
This is still an issue with the latest Tensorflow. By running the Colab notebook mentioned above (https://colab.research.google.com/drive/1pfS-BgACkgkCQ9nXT_iz123lvdlTk9Hg), it's shown that Tensorflow v2.5.0-0-ga4dfb8d1a71 2.5.0 still ignores the environment variable from tensorflow.keras.datasets import cifar10
cifar10.load_data() Always downloads the CIFAR-10 dataset to one of the two locations mentioned above. |
While running the above mentioned colab, I'm getting error |
Yeah, the latest version of Keras is synced with Tensorflow, and To reproduce the expected behavior, I need to run
Somehow placing |
Hi There, This is a stale issue. As you are using an older version of tensorflow, we are checking to see if you still need help on this issue. Please test the issue with the latest TensorFlow (TF2.7 and tf-nightly). If the issue still persists with the newer versions of TF, please feel free to open it in keras-team/keras repository by providing details about the issue and a standalone code to reproduce the issue. Thanks! Please note that Keras development has moved to a separate Keras-team/keras repository to focus entirely on only Keras. Thanks! |
System information
Describe the current behavior
tensorflow.keras.utils.get_file
by default saves any file to a subdirectory of~/.keras
. This behavior is specified here.Describe the expected behavior
The function should behave the same as
keras.utils.get_file
, which uses the path specified in theKERAS_HOME
environment variable instead of~/.keras
if it is set. This behavior is specified hereStandalone code to reproduce the issue
https://colab.research.google.com/drive/1pfS-BgACkgkCQ9nXT_iz123lvdlTk9Hg
Other info / logs
This is relevant especially for cases where the user is not able to specify the
fname
parameter manually to set an absolute path. One example for this mentioned in #33501 are the weights downloaded bytensorflow.keras.applications
models. In my case, the user home directory is write-protected on the compute nodes of our HPC cluster and the fallback/tmp
also should not be used.The issue keras-team/keras#11923 set the behavior in keras.
The text was updated successfully, but these errors were encountered: