refactor _copy_files_to_new_dir to always delete tmp directories
See original GitHub issueWe currently avoid temp directories in rasa train
commands by making sure that each of the different functions in training delete all temporary files upon exiting. However this isn’t super scalable, as we would also have to do the same for rasa data
, rasa interactive
, rata test
, etc. commands. Instead we should refactor the method that actually creates these directories.
From @federicotdn:
The problem comes from the usage of function _copy_files_to_new_dir in rasa/data.py. The function you mentioned, get_core_nlu_directories, uses this function, and other do as well.
A call to these functions in data.py implies creating a temp directory and returning some path relative to it. The definitive solution to the problem would be making _copy_files_to_new_dir return a context manager and then change all uses of the functions in data.py to enter/exit the context manager appropriately.
Issue Analytics
- State:
- Created 4 years ago
- Comments:16 (9 by maintainers)
Top GitHub Comments
I am probably tackling this here https://github.com/orgs/RasaHQ/projects/25. So please wait with this issue @federicotdn
Fine to close this with the model architecture revamp in my opinion.