![]() That's bad for reproducibility, which is why I'm in favor of the "put input and output files in different directories" approach. However in this kind of library, if you allow the input file to be overwritten, if you run the same process twice you get different results. That's bad for reproducibility, which is why I'm in favor of the "put input and output files in different directories" approach.īecause of ^^rant, I prefer to throw an error, rather than use the tempfile approach. In this case, you can still "reproduce" the results because the original information is preserved. ![]() Other types of libraries might do something like "run process, create a new text file" and allow you to overwrite said text file. In a library like this the main paradigm is creating outputs by modifying inputs. shutil, librosa) that happily overwrite files and it's a fairly common use case. An alternative solution is what you propose (raise an error), which would be better than the current behavior, though I don't see why you wouldn't want to support overwriting the input file - there are plenty of tools out there (e.g. However, my preferred solution would be for pysox to use tempfiles (as per my example) to basically yes support using the same path for input/output.
0 Comments
Leave a Reply. |