Search code examples
pythoncluster-computingray

ray.services.get_node_ip_address() doesn't work. ray cluster python


I am learning to use ray on a cluster from the official documentation I just wanted to test a single functionality which is ray.services.get_node_ip_address(), but I have the following error:

>>> import ray
>>> ray.services.get_node_ip_address()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
AttributeError: module 'ray' has no attribute 'services'

Solution

  • It is in ray._private.services.get_node_ip_address()

    It seems that the location of get_node_ip_address() is changed from ray.services.get_node_ip_address() to ray._private.services.get_node_ip_address()