Not sure if I should post it on Modin’s github, but do we have a way of getting Modin working with ray client on k8s.
Right now modin requires you to run ray.init() on head node, and then initialising modin as described in this link - Using Modin — Modin 0.8.3 documentation
However, it is unable to detect the ray runtime when running it with ray-client on a different node and it tries to start a fresh instance of ray. Is there any workaround for this?
---------------------------------------------------------------------------
Exception Traceback (most recent call last)
<ipython-input-3-7e7b44bd7fd7> in <module>()
----> 1 import modin.pandas as pd
/home/bhavya.agarwal/.local/lib/python3.7/site-packages/modin/pandas/__init__.py in <module>()
178
179
--> 180 Engine.subscribe(_update_engine)
181
182 from .. import __version__
/home/bhavya.agarwal/.local/lib/python3.7/site-packages/modin/config/pubsub.py in subscribe(cls, callback)
105 def subscribe(cls, callback):
106 cls._subs.append(callback)
--> 107 callback(cls)
108
109 @classmethod
/home/bhavya.agarwal/.local/lib/python3.7/site-packages/modin/pandas/__init__.py in _update_engine(publisher)
117 os.environ["OMP_NUM_THREADS"] = str(multiprocessing.cpu_count())
118 if _is_first_update.get("Ray", True):
--> 119 initialize_ray()
120 num_cpus = ray.cluster_resources()["CPU"]
121 elif publisher.get() == "Dask": # pragma: no cover
/home/bhavya.agarwal/.local/lib/python3.7/site-packages/modin/engines/ray/utils.py in initialize_ray(override_is_cluster, override_redis_address, override_redis_password)
147 logging_level=100,
148 _memory=object_store_memory,
--> 149 _lru_evict=True,
150 )
151
/home/bhavya.agarwal/.local/lib/python3.7/site-packages/ray/_private/client_mode_hook.py in wrapper(*args, **kwargs)
44 global _client_hook_enabled
45 if client_mode_enabled and _client_hook_enabled:
---> 46 return getattr(ray, func.__name__)(*args, **kwargs)
47 return func(*args, **kwargs)
48
/home/bhavya.agarwal/.local/lib/python3.7/site-packages/ray/util/client/__init__.py in init(self, *args, **kwargs)
98 self._server, address_info = ray_client_server.init_and_serve(
99 "localhost:50051", *args, **kwargs)
--> 100 self.connect("localhost:50051")
101 self._connected_with_init = True
102 return address_info
/home/bhavya.agarwal/.local/lib/python3.7/site-packages/ray/util/client/__init__.py in connect(self, conn_str, secure, metadata, connection_retries)
44 return
45 raise Exception(
---> 46 "ray.connect() called, but ray client is already connected")
47 if not self._inside_client_test:
48 # If we're calling a client connect specifically and we're not
Exception: ray.connect() called, but ray client is already connected