Skip to content

Extensions not checked or added to saved file names #346

Description

@colleenjg

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions