Ensure dir exists
This is a fairly minor improvement. Should be a quick review task.
I have added the argument create_dir
to the save_model
method in the NNInterface
class as well as the following methods/classes in the database_interface
module:
- open_file
- AudioWriter
- create_database
By default create_dir=True
. This ensures that if the output directory does not already exist, it will be automatically created.
This avoids frustrating situations where a database creation or model training scripts fails after running for a long time when it attempts to save the outputs to a non-existing directory at the end.
Resolves this issue: #158 (closed)