Skip to content

Constrain directory in FileStorage for safety? #23

Description

@jas-ho

For discussion: FileStorage currently allows arbitrary paths as directory. This could end up with surprising effects if users mistype.

It might be safer to constrain the storage location to lie within a specified part of the file system. Similarly to how all things the transformers library writes to disk end up inside .cache/huggingface/hub.

One option for handling this functionality is to use https://github.com/cthoyt/pystow (which is used e.g. by the excellent PyKeen library)

Metadata

Metadata

Assignees

No one assigned

    Labels

    design-and-referenceDesign doc part or technical reference (for later reference)enhancementNew feature or request

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions