Giter Site home page Giter Site logo

adlfs support about etils HOT 6 CLOSED

google avatar google commented on July 30, 2024
adlfs support

from etils.

Comments (6)

Conchylicultor avatar Conchylicultor commented on July 30, 2024 2

Good for me if that works for you!

from etils.

Conchylicultor avatar Conchylicultor commented on July 30, 2024

Thank you for the suggestion. With the fsspec backend, it should be quite straightforward (using Azure extension for fsspec: https://github.com/fsspec/adlfs)

There's only 3 places to change:

  • Add a condition here to load the adlfs fsspec backend:

    elif path.startswith('s3://'):

  • Add GCS as an accepted URI scheme:

    _URI_PREFIXES = ('gs://', 's3://')

  • Currently, for backward compatibility, if TF is installed, the tf.io.gfile backend will be used instead of fsspec. You need to exclude az:// from this condition that force the TF backend:

    if _is_tf_installed() and self._uri_scheme is not None:

Don't hesitate to send a PR. Happy to review it.

from etils.

daniel-character avatar daniel-character commented on July 30, 2024

Thanks @Conchylicultor. I'm ready to send you a PR. I think I need you to give me the right permissions for that.

from etils.

Conchylicultor avatar Conchylicultor commented on July 30, 2024

Thanks @Conchylicultor. I'm ready to send you a PR. I think I need you to give me the right permissions for that.

Thanks for the contribution. I'm not sure I understand which permission you need. Everyone is able to send a PR on any repository: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-a-pull-request

from etils.

daniel-character avatar daniel-character commented on July 30, 2024

You're right, I just needed a fork. In any case, I just realized something:

So my actual end goal is to make tfds work on az:// paths, and because I'm using tfds via tf.data (instead of using say datasource), tfds actually will read files from the given dataset path via two different paths: etils and tensorflow_io. Unfortunately tensorflow_io expects the az:// path to start with the azure account name, while fsspec does not (it gets the account name from e.g., an env var).

That probably means that if we want tfds to work with az://, I can do all the pieces you suggested excepted this part:

"Currently, for backward compatibility, if TF is installed, the tf.io.gfile backend will be used instead of fsspec. You need to exclude az:// from this condition that force the TF backend".

That way tfds should theoretically be able to work with az whether you use it with tensorflow or not.

What do you think?

from etils.

Conchylicultor avatar Conchylicultor commented on July 30, 2024

#470 was merged. Closing this! Thanks again for the contribution

from etils.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.