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

[Datasets] Can't import read_tfrecords #29201

Closed
AmirBFar opened this issue Oct 8, 2022 · 9 comments
Closed

[Datasets] Can't import read_tfrecords #29201

AmirBFar opened this issue Oct 8, 2022 · 9 comments
Labels
bug Something that is supposed to be working; but isn't data Ray Data-related issues

Comments

@AmirBFar
Copy link

AmirBFar commented Oct 8, 2022

Hi, I have been getting ImportError: cannot import name 'read_tfrecords' from 'ray.data' (.../venv/lib/python3.9/site-packages/ray/data/__init__.py) when importing read_tfrecords. Any idea why is this happening?

@bveeramani
Copy link
Member

Hey @AmirBFar, thanks for opening an issue! Could you tell us what version of Ray you're using? Also, could you share the full traceback?

@bveeramani bveeramani changed the title read_tfrecords import [Datasets] Can't import read_tfrecords Oct 9, 2022
@AmirBFar
Copy link
Author

AmirBFar commented Oct 9, 2022

Hey @bveeramani . I am using 3.0.0.dev0. The full traceback is
`---------------------------------------------------------------------------
ImportError Traceback (most recent call last)
Input In [38], in <cell line: 1>()
----> 1 from ray.data import read_tfrecords

ImportError: cannot import name 'read_tfrecords' from 'ray.data' (/usr/local/share/sciencebox/venv/lib/python3.9/site-packages/ray/data/init.py)`

I can definitely see read_tfrecords in __init__.py inside __all__.

@bveeramani
Copy link
Member

Hmm...weird. Could you run this code snippet and let me know what you get?

import ray
print(ray.__commit__)

@AmirBFar
Copy link
Author

AmirBFar commented Oct 9, 2022

cba26cc83f6b5b8a2ff166594a65cb74c0ec8740

@bveeramani
Copy link
Member

Looks like you’re using a version of Ray from August 18 (#27994), but read_tfrecords was added in September (#28430). Could you try upgrading your Ray nightly and see if the error persists?

@AmirBFar
Copy link
Author

I am trying to install the September commit with

pip install https://s3-us-west-2.amazonaws.com/ray-wheels/master/e84f9a451b190d5e244cc73c15c662160727a4b7/ray-3.0.0.dev0-cp39-cp39-manylinux2014_x86_64.whl

and I get

ERROR: HTTP error 404 while getting https://s3-us-west-2.amazonaws.com/ray-wheels/master/e84f9a451b190d5e244cc73c15c662160727a4b7/ray-3.0.0.dev0-cp39-cp39-manylinux2014_x86_64.whl ERROR: Could not install requirement ray==3.0.0.dev0 from https://s3-us-west-2.amazonaws.com/ray-wheels/master/e84f9a451b190d5e244cc73c15c662160727a4b7/ray-3.0.0.dev0-cp39-cp39-manylinux2014_x86_64.whl because of HTTP error 404 Client Error: Not Found for url: https://s3-us-west-2.amazonaws.com/ray-wheels/master/e84f9a451b190d5e244cc73c15c662160727a4b7/ray-3.0.0.dev0-cp39-cp39-manylinux2014_x86_64.whl for URL https://s3-us-west-2.amazonaws.com/ray-wheels/master/e84f9a451b190d5e244cc73c15c662160727a4b7/ray-3.0.0.dev0-cp39-cp39-manylinux2014_x86_64.whl

Any idea why is this happening?

@bveeramani
Copy link
Member

Hmm...not sure. Maybe our documentation is out of date? Your install command looks okay to me.

I'm out of the office right now, but I can look into it when I get back next week.

In the mean time, is there any reason why you can't install the latest nightly?

pip uninstall -y ray
pip install "ray[data]" @ https://s3-us-west-2.amazonaws.com/ray-wheels/latest/ray-3.0.0.dev0-cp39-cp39-manylinux2014_x86_64.whl

@clarkzinzow clarkzinzow added data Ray Data-related issues bug Something that is supposed to be working; but isn't labels Oct 17, 2022
@bveeramani
Copy link
Member

@AmirBFar figured it out. e84f9a4 is a commit to bveeramani:bveeramani/tfrecords, not master. We only upload wheels for commits to master.

What you probably want is ad15947:

pip install https://s3-us-west-2.amazonaws.com/ray-wheels/master/ad1594767c07b6351e70da473f318a2e93ae9ec9/ray-3.0.0.dev0-cp39-cp39-manylinux2014_x86_64.whl

@bveeramani
Copy link
Member

I think this is resolved? Feel free to re-open if there's more.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something that is supposed to be working; but isn't data Ray Data-related issues
Projects
None yet
Development

No branches or pull requests

3 participants