Reconnecting to Ray

In my notebook I have the following code:

from ray.util.client import ray as rayclient
if rayclient.is_connected():
ray.util.disconnect()
ray.util.connect(‘127.0.0.1:10001’)

but if I am calling it more then once, I am getting:

Exception: ray.connect() called, but ray client is already connected

Is it a bug or I am missing something?

This seems like a bug to me. Would you mind filing a github issue with a reproduction script with this?

@Ameer_Haj_Ali could you please confirm?

@tchordia, can you check this one?

@Ameer_Haj_Ali, @eoakes do you guys need a Github issue? or you still want to look at it internally?

@blublinsky , please feel free to file an issue on this.

I tried this locally:

import ray
import ray.util
from ray.util.client import ray as rayclient
ray.util.connect("127.0.0.1:10001")
if rayclient.is_connected():
    print("disconnecting...")
    ray.util.disconnect()
ray.util.connect('127.0.0.1:10001')
@ray.remote
def f(x):
    return x ** x

print(ray.get(f.remote(2)))

It works for me, so I am not sure what is going on. Can you call ray install-nightly and rerun this?

What do you mean here? Ray Python nightly build or ???

Reinstalling client fixed it. thx