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

Revert "[data] Fix pandas import failures by moving it to a top-level data import" #32533

Merged
merged 1 commit into from
Feb 14, 2023

Conversation

cadedaniel
Copy link
Member

@cadedaniel cadedaniel commented Feb 14, 2023

Reverts #32447

Looks like #32447 breaks bk://:mac: :apple: Wheels and Jars and linux://python/ray/tests:test_basic

Failed BK: https://buildkite.com/ray-project/oss-ci-build-branch/builds/2327#01864d8e-0ebd-4ef3-bfda-1259dfcfcbbc

+ /Library/Frameworks/Python.framework/Versions/3.6/bin/python3.6 /Users/ec2-user/.buildkite-agent/builds/bk-mac1-branch-queue-i-0b5fcfa84a3210bb0-1/ray-project/oss-ci-build-branch/ci/build/../../python/ray/tests/test_microbenchmarks.py

Traceback (most recent call last):
  File "/Users/ec2-user/.buildkite-agent/builds/bk-mac1-branch-queue-i-0b5fcfa84a3210bb0-1/ray-project/oss-ci-build-branch/ci/build/../../python/ray/tests/test_microbenchmarks.py", line 5, in <module>
    import ray
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/ray/__init__.py", line 257, in <module>
    from ray import data  # noqa: F401
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/ray/data/__init__.py", line 3, in <module>
    import pandas  # noqa
ModuleNotFoundError: No module named 'pandas'

@clarkzinzow
Copy link
Contributor

@ericl I would have mentioned this, didn't get a chance to review the PR, but the ray.data import is still eager for all ray imports for Python 3.6:

ray/python/ray/__init__.py

Lines 255 to 258 in d87d86f

if sys.version_info < (3, 7):
# TODO(Clark): Remove this one we drop Python 3.6 support.
from ray import data # noqa: F401
from ray import workflow # noqa: F401

@clarkzinzow
Copy link
Contributor

clarkzinzow commented Feb 14, 2023

We can backport a module-level __getattr__ for Python 3.6 with something like this: #27658 (comment), or we can try to search for a different solution, like fixing the underlying Core-level issue.

Also, are we ever going to drop Python 3.6? We're now over a year past the EOL, with 4 months until the Python 3.7 EOL. cc @zhe-thoughts @pcmoritz

@cadedaniel
Copy link
Member Author

merge please? cc @clarkzinzow @jianoaix @ericl

@clarkzinzow clarkzinzow merged commit b12c0d1 into master Feb 14, 2023
@clarkzinzow clarkzinzow deleted the revert-32447-pandas-toplevel branch February 14, 2023 20:27
edoakes pushed a commit to edoakes/ray that referenced this pull request Mar 22, 2023
elliottower pushed a commit to elliottower/ray that referenced this pull request Apr 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants