Currently, saving a Data object takes a filepath and doesn't check for or add a .h5 extension.
Similarly for config saving: does not check for yaml (or yml) extension:
Whatever file type name you pass, it'll use it (with an extension, with the wrong extension).
I think it could be worth handling the following cases:
- No extension: We could automatically add the correct extension.
- Wrong extension: Raising a warning? (Or an error?)
Accordingly, we could also do something similar when loading Data or configs:
- No extension: Add the extension before checking? (Or do we want to first check whether a file with no extension exists to be loaded?)
- Wrong extension: Raise a warning before trying to open? (Or an error?)
This is not necessarily a major problem, since extensions don't matter within the scope of torch_brain. But, this would increase the likelihood of users generating files with recognizable, correct extensions. And certainly, for Windows users, file extensions do matter more.
Currently, saving a
Dataobject takes a filepath and doesn't check for or add a.h5extension.torch_brain/data/data.py:L485Similarly for config saving: does not check for
yaml(oryml) extension:torch_brain/pipeline/config.py:L30Whatever file type name you pass, it'll use it (with an extension, with the wrong extension).
I think it could be worth handling the following cases:
Accordingly, we could also do something similar when loading
Dataor configs:This is not necessarily a major problem, since extensions don't matter within the scope of
torch_brain. But, this would increase the likelihood of users generating files with recognizable, correct extensions. And certainly, for Windows users, file extensions do matter more.