Building Ray from Source - update AxSearch

How severe does this issue affect your experience of using Ray?

  • Low: It annoys or frustrates me for a moment.

I was trying to update ax_search.py to make it work with newer versions of ax and I wanted to run the test to make sure that what I did works.

While doing so I forked the ray repo and tried to build from the source using the instructions from this page but I keep getting the same error when I try to run:
python -m pytest -v -s python/ray/tune/tests/test_api.py

error:

python/ray/__init__.py:85: in <module>
    import ray._raylet  # noqa: E402
E   ModuleNotFoundError: No module named 'ray._raylet'

I looked around but could not find a solution. Any ideas?

Hi, what version of ax did you upgrade to and what version of Ray are you using?

Well, I took the last one from the master branch yesterday. And the latest version of Ax (0.5.0).
If I just pip install ray and overwrite the ax_search.py script following some of the suggestions steaming from this PR I actually can run ray with the last ax version just fine.
When I realized this and considering the fact that the PR was inactive for a while I thought I would try to make one myself to solve the issue but I failed miserably :sweat_smile:

I’m glad you figured it out!! :slight_smile: Thank you for sharing

BTW, for your original thing - you may want to try pytest TEST_FILE.py or pytest --import-mode=importlib TEST_FILE.py

I get the same thing…

ImportError while loading conftest '/home/user/Desktop/ray/python/ray/tune/tests/conftest.py'.
../../__init__.py:85: in <module>
    import ray._raylet  # noqa: E402
E   ModuleNotFoundError: No module named 'ray._raylet'