question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

refactor _copy_files_to_new_dir to always delete tmp directories

See original GitHub issue

We 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:closed
  • Created 4 years ago
  • Comments:16 (9 by maintainers)

github_iconTop GitHub Comments

1reaction
wochingecommented, Jul 8, 2019

I am probably tackling this here https://github.com/orgs/RasaHQ/projects/25. So please wait with this issue @federicotdn

0reactions
wochingecommented, Jul 26, 2021

Fine to close this with the model architecture revamp in my opinion.

Read more comments on GitHub >

github_iconTop Results From Across the Web

When "/tmp" and $TMPDIR directory are cleaned up in macOS?
When "/tmp" and $TMPDIR directory are cleaned up in macOS? I know about removing files and directories in /tmp directory in boot time....
Read more >
How can I automatically create (and remove) a temp directory ...
All commands in the Makefile would be able to refer to the automatically created directory as $TMPDIR , and the directory would be...
Read more >
How to Clear Out Temporary Directories
Change to other directories containing unnecessary temporary or obsolete subdirectories and files, and delete them by repeating Step 3 above.
Read more >
Manage the Linux /tmp directory like a boss | Enable Sysadmin
The /tmp directory is a temporary landing place for files. ... deleting user temp files after a reboot is to enable tmp.mount ,...
Read more >
Automaticaly deleted temporary files in Java (based on ...
Standard java API to delete temporary files. ... we have changed the notification policy and start to watch the temp folder capacity.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found