From 7424cb7bfeebfd5724ec5c1b033baa231ad7d907 Mon Sep 17 00:00:00 2001 From: Martin Matyasek Date: Thu, 14 Apr 2022 15:13:03 +0200 Subject: [PATCH] Store keras data in XDG_CACHE_HOME Updates https://github.com/matyama/configs/issues/17 - Changes the location of keras data from `XDG_CONFIG_HOME` to `XDG_CACHE_HOME` - This is done by modifying `KERAS_HOME` in `.zshenv` - The reasoning behind this change is that despite the fact that one can specify the download path for keras datasets, it's always relative to `$KERAS_HOME/datasets`. So storing such a large cache in `XDG_CONFIG_HOME` would not be optimal. To apply this change one can simply move the directory. --- .config/zsh/.zshenv | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.config/zsh/.zshenv b/.config/zsh/.zshenv index 6268423..57886ed 100644 --- a/.config/zsh/.zshenv +++ b/.config/zsh/.zshenv @@ -164,8 +164,9 @@ export TFDS_DATA_DIR=${XDG_CACHE_HOME}/tensorflow_datasets # Keras # - https://github.com/tensorflow/tensorflow/issues/38831 -# - Since the only file is `keras.json` config, `XDG_CONFIG_HOME` is used here -export KERAS_HOME=${XDG_CONFIG_HOME}/keras +# - Since `KERAS_HOME` contains config `keras.json` which is re-created when +# missing and cached datasets, `XDG_CACHE_HOME` is probably the best option +export KERAS_HOME=${XDG_CACHE_HOME}/keras # Dungeon Crawl Stone Soup # - Note: the trailing slash is required