Use Ray Tune with Ray Client Server?

i’m trying to use Ray Client with ray tune.

following Code works without errors:

ray.util.connect(“SERVERIP:PORT”)
@ray.remote
def f(x): return x ** x
f.remote(2)

But when I try to to use the client server with ray.tune it fails:

ray.util.connect(“SERVERIP:PORT”)
def f(config): return x ** x
tune.run(f,config=conf)

Errorlog:

2021-03-10 16:48:39,672 - ray.tune.trial_runner - ERROR - Trial f_14625_00000: Error processing event.
Traceback (most recent call last):
File “…/python3.8/site-packages/ray/tune/trial_runner.py”, line 586, in _process_trial
results = self.trial_executor.fetch_result(trial)
File “…/python3.8/site-packages/ray/tune/ray_trial_executor.py”, line 609, in fetch_result
result = ray.get(trial_future[0], timeout=DEFAULT_GET_TIMEOUT)
File “…/python3.8/site-packages/ray/_private/client_mode_hook.py”, line 46, in wrapper
return getattr(ray, func._name_)(*args, **kwargs)
File “…/python3.8/site-packages/ray/util/client/api.py”, line 33, in get
return self.worker.get(vals, timeout=timeout)
File “…/python3.8/site-packages/ray/util/client/worker.py”, line 156, in get
out = [self._get(x, timeout) for x in to_get]
File “…/python3.8/site-packages/ray/util/client/worker.py”, line 156, in
out = [self._get(x, timeout) for x in to_get]
File “…/python3.8/site-packages/ray/util/client/worker.py”, line 168, in _get
err = cloudpickle.loads(data.error)
TypeError: _init_() missing 6 required positional arguments: ‘function_name’, ‘traceback_str’, ‘cause_cls’, ‘proctitle’, ‘pid’, and ‘ip’
Result for f_14625_00000:

Any ideas?

Just to be sure, can you try importing tune (from ray import tune) after the ray connect?