Skip to content

Commit

Permalink
Store keras data in XDG_CACHE_HOME
Browse files Browse the repository at this point in the history
Updates #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.
  • Loading branch information
matyama committed Apr 14, 2022
1 parent fde8e8b commit 7424cb7
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions .config/zsh/.zshenv
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 7424cb7

Please sign in to comment.