Git Product home page Git Product logo

iopath's Introduction

iopath

iopath is a lightweight I/O abstraction library that provides a common interface across storage backends.

Install:

iopath requires python >= 3.6.

Use one of the following ways to install:

1. Install from PyPI (updated nightly)

pip install -U iopath

2. Install from Anaconda Cloud (updated nightly)

conda install -c conda-forge yacs
conda install -c iopath iopath

3. Install latest from GitHub

pip install -U 'git+https://github.com/facebookresearch/iopath'

4. Install from a local clone

git clone https://github.com/facebookresearch/iopath
pip install -e iopath

License

This library is released under the MIT License (https://github.com/facebookresearch/iopath/blob/master/LICENSE).

iopath's People

Contributors

amyreese avatar bottler avatar calebho avatar davides avatar dgrnbrg-meta avatar ericzlou avatar facebook-github-bot avatar hazirbas avatar hudeven avatar mackorone avatar nikhilweee avatar onedirection9 avatar ppwwyyxx avatar rajsarkapally avatar robert-verkuil avatar salilsdesai avatar sujitoc avatar wat3rbro avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

iopath's Issues

Is async file reading supported?

The docs of PathManager.opena() suggest that async reading is supported:

Usage (read):
async def my_function():
return await path_manager.opena(uri, "r").read()

But running the suggested code leads to the following error:

# Restrict mode until `NonBlockingIO` has async read feature.
valid_modes = {"w", "a", "b"}
if not all(m in valid_modes for m in mode):
raise ValueError(f"`opena` mode must be write or append for path {path}")

Are there plans to support async file reading? Thanks!

can not find tmetry,in 0.1.9

when i debug the code event_logger.py, it just goto the line “except ImportError:”

try:
from tmetry.simpleevent import SimpleEventRecord
from tmetry.writer import TmetryWriter

b_tmetry_available = True

except ImportError:
b_tmetry_available = False

iopath fails to build on Windows 3.8

We are using iopath in MMF library. Our CI tests are failing with this error from iopath library on Windows, Python 3.8 :

c:\miniconda\envs\mmf\lib\site-packages\iopath\common\file_io.py:14: in <module>
    import portalocker  # type: ignore
c:\miniconda\envs\mmf\lib\site-packages\portalocker\__init__.py:4: in <module>
    from . import portalocker
c:\miniconda\envs\mmf\lib\site-packages\portalocker\portalocker.py:11: in <module>
    import win32file
E   ImportError: DLL load failed while importing win32file: The specified module could not be found.

[bug] PathManager.exists("") evaluates to True

Hi, very recently, we are noticing in VISSL project that PathManager.exists("") evaluates to true which clearly seems like a bug. Can you please advice on this and if you think this is a bug or an intentional change?

iopath does not support Python<3.8 anymore

This commit f4e103f introduces
from typing import Protocol which is only available after python 3.8. https://docs.python.org/3/library/typing.html#typing.Protocol

Please fix this as it has broken downstream projects that rely on iopath, e.g. https://github.com/facebookresearch/detectron2/runs/5100428039?check_suite_focus=true

In general, please revamp the open source CI and enable it so such issues can be caught: https://github.com/facebookresearch/iopath/blob/main/.circleci/config.yml

cc @sujitoc

An exception occurred in telemetry logging.Disabling telemetry to prevent further exceptions.

When using Detectron, I noticed this exception from the facebookresearch iopath package:

An exception occurred in telemetry logging.Disabling telemetry to prevent further exceptions.
Traceback (most recent call last):
  File "/opt/conda/envs/osml_models/lib/python3.11/site-packages/iopath/common/file_io.py", line 946, in __log_tmetry_keys
    handler.log_event()
  File "/opt/conda/envs/osml_models/lib/python3.11/site-packages/iopath/common/event_logger.py", line 97, in log_event
    del self._evt
        ^^^^^^^^^

I've fixed this exception locally by simply removing the call: handler.log_event().

This code isn't affecting execution, but it would be nice to clean up the output until a more permanent fix can be implemented.

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.