Skip to content

Commit

Permalink
fix: Add os.makedirs for the interpreter cache directory (#35)
Browse files Browse the repository at this point in the history
Closes #34
  • Loading branch information
YuukanOO committed Sep 19, 2019
1 parent 240c394 commit 5d6baa2
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pytlas/understanding/snips.py
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,9 @@ def fit(self, data):
self._logger.info(
'Persisting trained engine to "%s"', self.cache_directory)

# Make sure the cache directory has been cleaned out
rmtree(self.cache_directory, ignore_errors=True)
os.makedirs(self.cache_directory, exist_ok=True)

self._engine.persist(self.cache_directory)

Expand Down

0 comments on commit 5d6baa2

Please sign in to comment.