Running ray tests on M1 macs

  • High: It blocks me to complete my task.

I’m preparing a PR and would like to run the unit tests. Unfortunately I’m doing this on an M1 mac and tests fail because the environment being created is broken. I can get things to work partially by editing _private/runtime_env/conda.py to test if it’s on m1 mac and to remove the pip installs of grpc and replace them with a conda install. This is clearly a hack. It also breaks other tests which are hardwired to expect a fixed set of dependencies. I doubt I’m the first person to run into this, so I’m curious as to how others have worked around it, or if there’s a plan to address this?

Or is the answer ‘don’t use an m1 mac’?

Thanks!

Cheers, Cos,

I think the tests pass on M1 macs in bazel, have you tried that?

Also, you can open a PR and mark it a draft. The open source BuildKite will pick up the job and run tests for you.

I just tried that, but it hangs on test_actor_advanced. This is on the master branch, not my feature branch. This is similar to what I was seeing with the pytest runs where setting up the environment fails and gets retried over and over.

bazel test python/ray/tests:all
WARNING: Option ‘strict_java_deps’ is deprecated: Use --experimental_strict_java_deps instead
DEBUG: /Users/cnicolaou/Dropbox/dev/github.com/ray-project/ray/bazel/ray_deps_setup.bzl:67:14: No implicit mirrors used because urls were explicitly provided
INFO: Analyzed 244 targets (1 packages loaded, 2 targets configured).
INFO: Found 1 target and 243 test targets…
FAIL: //python/ray/tests:kuberay/test_autoscaling_e2e (see /private/var/tmp/_bazel_cnicolaou/d2ccd49c5cbb7a4af8337444d3751c70/execroot/com_github_ray_project_ray/bazel-out/darwin_arm64-opt/testlogs/python/ray/tests/kuberay/test_autoscaling_e2e/test.log)
[739 / 982] 9 / 243 tests, 1 failed; 1 action; last test: //python/ray/tests:test_actor
[739 / 982] 9 / 243 tests, 1 failed; 1 action; last test: //python/ray/tests:test_actor
[739 / 982] 9 / 243 tests, 1 failed; 1 action; last test: //python/ray/tests:test_actor
[739 / 982] 9 / 243 tests, 1 failed; 1 action; last test: //python/ray/tests:test_actor
Testing //python/ray/tests:test_actor_advanced; 693s local

it eventually timed out but the errors are different to the pytest case,

2023-03-28 18:03:08,233 WARNING worker.py:1956 – It looks like you’re creating a detached actor in an anonymous namespace. In order to access this actor in the future, you will need to explicitly connect to this namespace with ray.init(namespace=“86bb19b4-a5e0-454d-85e4-f9efb78bfc95”, …)
2023-03-28 18:03:08,839 WARNING worker.py:1956 – It looks like you’re creating a detached actor in an anonymous namespace. In order to access this actor in the future, you will need to explicitly connect to this namespace with ray.init(namespace=“86bb19b4-a5e0-454d-85e4-f9efb78bfc95”, …)
2023-03-28 18:03:09,395 WARNING worker.py:1956 – It looks like you’re creating a detached actor in an anonymous namespace. In order to access this actor in the future, you will need to explicitly connect to this namespace with ray.init(namespace=“86bb19b4-a5e0-454d-85e4-f9efb78bfc95”, …)
2023-03-28 18:03:10,065 WARNING worker.py:1956 – It looks like you’re creating a detached actor in an anonymous namespace. In order to access this actor in the future, you will need to explicitly connect to this namespace with ray.init(namespace=“86bb19b4-a5e0-454d-85e4-f9efb78bfc95”, …)
2023-03-28 18:03:10,575 WARNING worker.py:1956 – It looks like you’re creating a detached actor in an anonymous namespace. In order to access this actor in the future, you will need to explicitly connect to this namespace with ray.init(namespace=“86bb19b4-a5e0-454d-85e4-f9efb78bfc95”, …)
2023-03-28 18:03:11,108 WARNING worker.py:1956 – It looks like you’re creating a detached actor in an anonymous namespace. In order to access this actor in the future, you will need to explicitly connect to this namespace with ray.init(namespace=“86bb19b4-a5e0-454d-85e4-f9efb78bfc95”, …)
2023-03-28 18:03:11,655 WARNING worker.py:1956 – It looks like you’re creating a detached actor in an anonymous namespace. In order to access this actor in the future, you will need to explicitly connect to this namespace with ray.init(namespace=“86bb19b4-a5e0-454d-85e4-f9efb78bfc95”, …)
2023-03-28 18:03:12,215 WARNING worker.py:1956 – It looks like you’re creating a detached actor in an anonymous namespace. In order to access this actor in the future, you will need to explicitly connect to this namespace with ray.init(namespace=“86bb19b4-a5e0-454d-85e4-f9efb78bfc95”, …)
2023-03-28 18:03:12,829 WARNING worker.py:1956 – It looks like you’re creating a detached actor in an anonymous namespace. In order to access this actor in the future, you will need to explicitly connect to this namespace with ray.init(namespace=“86bb19b4-a5e0-454d-85e4-f9efb78bfc95”, …)
2023-03-28 18:03:13,378 WARNING worker.py:1956 – It looks like you’re creating a detached actor in an anonymous namespace. In order to access this actor in the future, you will need to explicitly connect to this namespace with ray.init(namespace=“86bb19b4-a5e0-454d-85e4-f9efb78bfc95”, …)
^[[2m^[[36m(getter pid=37187)^[[0m Get failed, trying to create actor_0
^[[2m^[[36m(getter pid=37187)^[[0m Someone else created it, trying to get
^[[2m^[[36m(getter pid=37192)^[[0m Get failed, trying to create actor_0
^[[2m^[[36m(getter pid=37185)^[[0m Get failed, trying to create actor_0
^[[2m^[[36m(getter pid=37185)^[[0m Someone else created it, trying to get
^[[2m^[[36m(getter pid=37191)^[[0m Get failed, trying to create actor_0
^[[2m^[[36m(getter pid=37191)^[[0m Someone else created it, trying to get
^[[2m^[[36m(getter pid=37190)^[[0m Get failed, trying to create actor_1
^[[2m^[[36m(getter pid=37190)^[[0m Someone else created it, trying to get