Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check if we can integrate fsspec #230

Open
hagenw opened this issue Jun 21, 2024 · 1 comment · May be fixed by #233
Open

Check if we can integrate fsspec #230

hagenw opened this issue Jun 21, 2024 · 1 comment · May be fixed by #233
Labels
question Further information is requested

Comments

@hagenw
Copy link
Member

hagenw commented Jun 21, 2024

There exists a similar package to audbackend, which provides abstractions for backends: https://filesystem-spec.readthedocs.io/

It comes already with a bunch of implementations:

>>> import fsspec
>>> fsspec.available_protocols()
['abfs',
 'adl',
 'arrow_hdfs',
 'asynclocal',
 'az',    
 'blockcache',
 'box',
 'cached',
 'dask',
 'data',
 'dbfs',
 'dir',
 'dropbox',
 'dvc',
 'file',
 'filecache',
 'ftp',
 'gcs',
 'gdrive',
 'generic',
 'git',
 'github',
 'gs',
 'hdfs',
 'hf',
 'http',
 'https',
 'jlab',
 'jupyter',
 'lakefs',
 'libarchive',
 'local',
 'memory',
 'oci',
 'ocilake',
 'oss',
 'reference',
 'root',
 's3',
 's3a',
 'sftp',
 'simplecache',
 'smb',
 'ssh',
 'tar',
 'wandb',
 'webdav',
 'webhdfs',
 'zip']

One way to make audbackend compatible, so we could use all those already existing backends, would be to make audbackend.backend.Base compatible with the fsspec specifications.

@hagenw hagenw linked a pull request Sep 13, 2024 that will close this issue
@hagenw hagenw added the question Further information is requested label Oct 21, 2024
@hagenw
Copy link
Member Author

hagenw commented Oct 21, 2024

In #223 I did an example implementation using fsspec. It removed all backends from audbackend, and stayed only with the interfaces, which allows us to simplify again the API to

  • audbackend.AbstractBackend
  • audbackend.BackendError
  • audbackend.Mave
  • audbackend.Unversioned
  • audbackend.Versioned

The following challenges appear with fsspec, which we would need to solve:

  • owner() is not supported, and there I doubt there is an easy way to implement a workaround that is backend independent
  • Artifactory is not supported by fsspec. I looked into implementing an fsspec Artifactory package, but this would require too much effort. I would propose to wait, until we no longer need support for Artifactory
  • Some fsspec backends distinguish between local and absolute pathes, which means we need to update audbackend accordingly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant