We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Test on Ray Nightly
It would be great if we could test on the Ray nightly wheels on each commit to the master branch. I think we can add it as a separate CI and add a badge to the README to track.

--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `modin/engines/ray/utils.py`
Content:
```
1 # Licensed to Modin Development Team under one or more contributor license agreements.
2 # See the NOTICE file distributed with this work for additional information regarding
3 # copyright ownership.  The Modin Development Team licenses this file to you under the
4 # Apache License, Version 2.0 (the "License"); you may not use this file except in
5 # compliance with the License.  You may obtain a copy of the License at
6 #
7 #     http://www.apache.org/licenses/LICENSE-2.0
8 #
9 # Unless required by applicable law or agreed to in writing, software distributed under
10 # the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF
11 # ANY KIND, either express or implied. See the License for the specific language
12 # governing permissions and limitations under the License.
13 
14 import builtins
15 import os
16 import sys
17 
18 from modin.config import (
19     IsRayCluster,
20     RayRedisAddress,
21     CpuCount,
22     Memory,
23     RayPlasmaDir,
24     IsOutOfCore,
25     NPartitions,
26 )
27 
28 
29 def handle_ray_task_error(e):
30     for s in e.traceback_str.split("\n")[::-1]:
31         if "Error" in s or "Exception" in s:
32             try:
33                 raise getattr(builtins, s.split(":")[0])("".join(s.split(":")[1:]))
34             except AttributeError as att_err:
35                 if "module" in str(att_err) and builtins.__name__ in str(att_err):
36                     pass
37                 else:
38                     raise att_err
39     raise e
40 
41 
42 # Register a fix import function to run on all_workers including the driver.
43 # This is a hack solution to fix #647, #746
44 def _move_stdlib_ahead_of_site_packages(*args):
45     site_packages_path = None
46     site_packages_path_index = -1
47     for i, path in enumerate(sys.path):
48         if sys.exec_prefix in path and path.endswith("site-packages"):
49             site_packages_path = path
50             site_packages_path_index = i
51             # break on first found
52             break
53 
54     if site_packages_path is not None:
55         # stdlib packages layout as follows:
56         # - python3.x
57         #   - typing.py
58         #   - site-packages/
59         #     - pandas
60         # So extracting the dirname of the site_packages can point us
61         # to the directory containing standard libraries.
62         sys.path.insert(site_packages_path_index, os.path.dirname(site_packages_path))
63 
64 
65 # Register a fix to import pandas on all workers before running tasks.
66 # This prevents a race condition between two threads deserializing functions
67 # and trying to import pandas at the same time.
68 def _import_pandas(*args):
69     import pandas  # noqa F401
70 
71 
72 def initialize_ray(
73     override_is_cluster=False,
74     override_redis_address: str = None,
75     override_redis_password: str = None,
76 ):
77     """
78     Initializes ray based on parameters, environment variables and internal defaults.
79 
80     Parameters
81     ----------
82     override_is_cluster: bool, optional
83         Whether to override the detection of Moding being run in a cluster
84         and always assume this runs on cluster head node.
85         This also overrides Ray worker detection and always runs the function,
86         not only from main thread.
87         If not specified, $MODIN_RAY_CLUSTER env variable is used.
88     override_redis_address: str, optional
89         What Redis address to connect to when running in Ray cluster.
90         If not specified, $MODIN_REDIS_ADDRESS is used.
91     override_redis_password: str, optional
92         What password to use when connecting to Redis.
93         If not specified, a new random one is generated.
94     """
95     import ray
96 
97     if not ray.is_initialized() or override_is_cluster:
98         import secrets
99 
100         cluster = override_is_cluster or IsRayCluster.get()
101         redis_address = override_redis_address or RayRedisAddress.get()
102         redis_password = override_redis_password or secrets.token_hex(32)
103 
104         if cluster:
105             # We only start ray in a cluster setting for the head node.
106             ray.init(
107                 address=redis_address or "auto",
108                 include_dashboard=False,
109                 ignore_reinit_error=True,
110                 _redis_password=redis_password,
111                 logging_level=100,
112             )
113         else:
114             from modin.error_message import ErrorMessage
115 
116             # This string is intentionally formatted this way. We want it indented in
117             # the warning message.
118             ErrorMessage.not_initialized(
119                 "Ray",
120                 """
121     import ray
122     ray.init()
123 """,
124             )
125             object_store_memory = Memory.get()
126             plasma_directory = RayPlasmaDir.get()
127             if IsOutOfCore.get():
128                 if plasma_directory is None:
129                     from tempfile import gettempdir
130 
131                     plasma_directory = gettempdir()
132                 # We may have already set the memory from the environment variable, we don't
133                 # want to overwrite that value if we have.
134                 if object_store_memory is None:
135                     # Round down to the nearest Gigabyte.
136                     try:
137                         system_memory = ray._private.utils.get_system_memory()
138                     except AttributeError:  # Compatibility with Ray <= 1.2
139                         system_memory = ray.utils.get_system_memory()
140                     mem_bytes = system_memory // 10 ** 9 * 10 ** 9
141                     # Default to 8x memory for out of core
142                     object_store_memory = 8 * mem_bytes
143             # In case anything failed above, we can still improve the memory for Modin.
144             if object_store_memory is None:
145                 # Round down to the nearest Gigabyte.
146                 try:
147                     system_memory = ray._private.utils.get_system_memory()
148                 except AttributeError:  # Compatibility with Ray <= 1.2
149                     system_memory = ray.utils.get_system_memory()
150                 object_store_memory = int(0.6 * system_memory // 10 ** 9 * 10 ** 9)
151                 # If the memory pool is smaller than 2GB, just use the default in ray.
152                 if object_store_memory == 0:
153                     object_store_memory = None
154             else:
155                 object_store_memory = int(object_store_memory)
156             ray.init(
157                 num_cpus=CpuCount.get(),
158                 include_dashboard=False,
159                 ignore_reinit_error=True,
160                 _plasma_directory=plasma_directory,
161                 object_store_memory=object_store_memory,
162                 address=redis_address,
163                 _redis_password=redis_password,
164                 logging_level=100,
165                 _memory=object_store_memory,
166                 _lru_evict=True,
167             )
168         _move_stdlib_ahead_of_site_packages()
169         ray.worker.global_worker.run_function_on_all_workers(
170             _move_stdlib_ahead_of_site_packages
171         )
172 
173         ray.worker.global_worker.run_function_on_all_workers(_import_pandas)
174 
175     num_cpus = int(ray.cluster_resources()["CPU"])
176     NPartitions.put_if_default(num_cpus)
177
```
--- END FILES ---

Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.

Here is an example:

```diff
diff --git a/examples/server_async.py b/examples/server_async.py
--- a/examples/server_async.py
+++ b/examples/server_async.py
@@ -313,4 +313,4 @@
 
 
 if __name__ == "__main__":
-    asyncio.run(run_async_server("."), debug=True)
+    asyncio.run(run_async_server(), debug=True)
diff --git a/examples/server_sync.py b/examples/server_sync.py
--- a/examples/server_sync.py
+++ b/examples/server_sync.py
@@ -313,5 +313,5 @@
 
 
 if __name__ == "__main__":
-    server = run_sync_server(".")
+    server = run_sync_server()
     server.shutdown()

```

diff --git a/modin/engines/ray/utils.py b/modin/engines/ray/utils.py
--- a/modin/engines/ray/utils.py
+++ b/modin/engines/ray/utils.py
@@ -153,18 +153,26 @@
                     object_store_memory = None
             else:
                 object_store_memory = int(object_store_memory)
-            ray.init(
-                num_cpus=CpuCount.get(),
-                include_dashboard=False,
-                ignore_reinit_error=True,
-                _plasma_directory=plasma_directory,
-                object_store_memory=object_store_memory,
-                address=redis_address,
-                _redis_password=redis_password,
-                logging_level=100,
-                _memory=object_store_memory,
-                _lru_evict=True,
-            )
+
+            ray_init_kwargs = {
+                "num_cpus": CpuCount.get(),
+                "include_dashboard": False,
+                "ignore_reinit_error": True,
+                "_plasma_directory": plasma_directory,
+                "object_store_memory": object_store_memory,
+                "address": redis_address,
+                "_redis_password": redis_password,
+                "logging_level": 100,
+                "_memory": object_store_memory,
+                "_lru_evict": True,
+            }
+            from packaging import version
+
+            # setting of `_lru_evict` parameter raises DeprecationWarning since ray 2.0.0.dev0
+            if version.parse(ray.__version__) >= version.parse("2.0.0.dev0"):
+                ray_init_kwargs.pop("_lru_evict")
+            ray.init(**ray_init_kwargs)
+
         _move_stdlib_ahead_of_site_packages()
         ray.worker.global_worker.run_function_on_all_workers(
             _move_stdlib_ahead_of_site_packages

{"golden_diff": "diff --git a/modin/engines/ray/utils.py b/modin/engines/ray/utils.py\n--- a/modin/engines/ray/utils.py\n+++ b/modin/engines/ray/utils.py\n@@ -153,18 +153,26 @@\n                     object_store_memory = None\n             else:\n                 object_store_memory = int(object_store_memory)\n-            ray.init(\n-                num_cpus=CpuCount.get(),\n-                include_dashboard=False,\n-                ignore_reinit_error=True,\n-                _plasma_directory=plasma_directory,\n-                object_store_memory=object_store_memory,\n-                address=redis_address,\n-                _redis_password=redis_password,\n-                logging_level=100,\n-                _memory=object_store_memory,\n-                _lru_evict=True,\n-            )\n+\n+            ray_init_kwargs = {\n+                \"num_cpus\": CpuCount.get(),\n+                \"include_dashboard\": False,\n+                \"ignore_reinit_error\": True,\n+                \"_plasma_directory\": plasma_directory,\n+                \"object_store_memory\": object_store_memory,\n+                \"address\": redis_address,\n+                \"_redis_password\": redis_password,\n+                \"logging_level\": 100,\n+                \"_memory\": object_store_memory,\n+                \"_lru_evict\": True,\n+            }\n+            from packaging import version\n+\n+            # setting of `_lru_evict` parameter raises DeprecationWarning since ray 2.0.0.dev0\n+            if version.parse(ray.__version__) >= version.parse(\"2.0.0.dev0\"):\n+                ray_init_kwargs.pop(\"_lru_evict\")\n+            ray.init(**ray_init_kwargs)\n+\n         _move_stdlib_ahead_of_site_packages()\n         ray.worker.global_worker.run_function_on_all_workers(\n             _move_stdlib_ahead_of_site_packages\n", "issue": "Test on Ray Nightly\nIt would be great if we could test on the Ray nightly wheels on each commit to the master branch. I think we can add it as a separate CI and add a badge to the README to track.\n", "before_files": [{"content": "# Licensed to Modin Development Team under one or more contributor license agreements.\n# See the NOTICE file distributed with this work for additional information regarding\n# copyright ownership.  The Modin Development Team licenses this file to you under the\n# Apache License, Version 2.0 (the \"License\"); you may not use this file except in\n# compliance with the License.  You may obtain a copy of the License at\n#\n#     http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software distributed under\n# the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF\n# ANY KIND, either express or implied. See the License for the specific language\n# governing permissions and limitations under the License.\n\nimport builtins\nimport os\nimport sys\n\nfrom modin.config import (\n    IsRayCluster,\n    RayRedisAddress,\n    CpuCount,\n    Memory,\n    RayPlasmaDir,\n    IsOutOfCore,\n    NPartitions,\n)\n\n\ndef handle_ray_task_error(e):\n    for s in e.traceback_str.split(\"\\n\")[::-1]:\n        if \"Error\" in s or \"Exception\" in s:\n            try:\n                raise getattr(builtins, s.split(\":\")[0])(\"\".join(s.split(\":\")[1:]))\n            except AttributeError as att_err:\n                if \"module\" in str(att_err) and builtins.__name__ in str(att_err):\n                    pass\n                else:\n                    raise att_err\n    raise e\n\n\n# Register a fix import function to run on all_workers including the driver.\n# This is a hack solution to fix #647, #746\ndef _move_stdlib_ahead_of_site_packages(*args):\n    site_packages_path = None\n    site_packages_path_index = -1\n    for i, path in enumerate(sys.path):\n        if sys.exec_prefix in path and path.endswith(\"site-packages\"):\n            site_packages_path = path\n            site_packages_path_index = i\n            # break on first found\n            break\n\n    if site_packages_path is not None:\n        # stdlib packages layout as follows:\n        # - python3.x\n        #   - typing.py\n        #   - site-packages/\n        #     - pandas\n        # So extracting the dirname of the site_packages can point us\n        # to the directory containing standard libraries.\n        sys.path.insert(site_packages_path_index, os.path.dirname(site_packages_path))\n\n\n# Register a fix to import pandas on all workers before running tasks.\n# This prevents a race condition between two threads deserializing functions\n# and trying to import pandas at the same time.\ndef _import_pandas(*args):\n    import pandas  # noqa F401\n\n\ndef initialize_ray(\n    override_is_cluster=False,\n    override_redis_address: str = None,\n    override_redis_password: str = None,\n):\n    \"\"\"\n    Initializes ray based on parameters, environment variables and internal defaults.\n\n    Parameters\n    ----------\n    override_is_cluster: bool, optional\n        Whether to override the detection of Moding being run in a cluster\n        and always assume this runs on cluster head node.\n        This also overrides Ray worker detection and always runs the function,\n        not only from main thread.\n        If not specified, $MODIN_RAY_CLUSTER env variable is used.\n    override_redis_address: str, optional\n        What Redis address to connect to when running in Ray cluster.\n        If not specified, $MODIN_REDIS_ADDRESS is used.\n    override_redis_password: str, optional\n        What password to use when connecting to Redis.\n        If not specified, a new random one is generated.\n    \"\"\"\n    import ray\n\n    if not ray.is_initialized() or override_is_cluster:\n        import secrets\n\n        cluster = override_is_cluster or IsRayCluster.get()\n        redis_address = override_redis_address or RayRedisAddress.get()\n        redis_password = override_redis_password or secrets.token_hex(32)\n\n        if cluster:\n            # We only start ray in a cluster setting for the head node.\n            ray.init(\n                address=redis_address or \"auto\",\n                include_dashboard=False,\n                ignore_reinit_error=True,\n                _redis_password=redis_password,\n                logging_level=100,\n            )\n        else:\n            from modin.error_message import ErrorMessage\n\n            # This string is intentionally formatted this way. We want it indented in\n            # the warning message.\n            ErrorMessage.not_initialized(\n                \"Ray\",\n                \"\"\"\n    import ray\n    ray.init()\n\"\"\",\n            )\n            object_store_memory = Memory.get()\n            plasma_directory = RayPlasmaDir.get()\n            if IsOutOfCore.get():\n                if plasma_directory is None:\n                    from tempfile import gettempdir\n\n                    plasma_directory = gettempdir()\n                # We may have already set the memory from the environment variable, we don't\n                # want to overwrite that value if we have.\n                if object_store_memory is None:\n                    # Round down to the nearest Gigabyte.\n                    try:\n                        system_memory = ray._private.utils.get_system_memory()\n                    except AttributeError:  # Compatibility with Ray <= 1.2\n                        system_memory = ray.utils.get_system_memory()\n                    mem_bytes = system_memory // 10 ** 9 * 10 ** 9\n                    # Default to 8x memory for out of core\n                    object_store_memory = 8 * mem_bytes\n            # In case anything failed above, we can still improve the memory for Modin.\n            if object_store_memory is None:\n                # Round down to the nearest Gigabyte.\n                try:\n                    system_memory = ray._private.utils.get_system_memory()\n                except AttributeError:  # Compatibility with Ray <= 1.2\n                    system_memory = ray.utils.get_system_memory()\n                object_store_memory = int(0.6 * system_memory // 10 ** 9 * 10 ** 9)\n                # If the memory pool is smaller than 2GB, just use the default in ray.\n                if object_store_memory == 0:\n                    object_store_memory = None\n            else:\n                object_store_memory = int(object_store_memory)\n            ray.init(\n                num_cpus=CpuCount.get(),\n                include_dashboard=False,\n                ignore_reinit_error=True,\n                _plasma_directory=plasma_directory,\n                object_store_memory=object_store_memory,\n                address=redis_address,\n                _redis_password=redis_password,\n                logging_level=100,\n                _memory=object_store_memory,\n                _lru_evict=True,\n            )\n        _move_stdlib_ahead_of_site_packages()\n        ray.worker.global_worker.run_function_on_all_workers(\n            _move_stdlib_ahead_of_site_packages\n        )\n\n        ray.worker.global_worker.run_function_on_all_workers(_import_pandas)\n\n    num_cpus = int(ray.cluster_resources()[\"CPU\"])\n    NPartitions.put_if_default(num_cpus)\n", "path": "modin/engines/ray/utils.py"}], "after_files": [{"content": "# Licensed to Modin Development Team under one or more contributor license agreements.\n# See the NOTICE file distributed with this work for additional information regarding\n# copyright ownership.  The Modin Development Team licenses this file to you under the\n# Apache License, Version 2.0 (the \"License\"); you may not use this file except in\n# compliance with the License.  You may obtain a copy of the License at\n#\n#     http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software distributed under\n# the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF\n# ANY KIND, either express or implied. See the License for the specific language\n# governing permissions and limitations under the License.\n\nimport builtins\nimport os\nimport sys\n\nfrom modin.config import (\n    IsRayCluster,\n    RayRedisAddress,\n    CpuCount,\n    Memory,\n    RayPlasmaDir,\n    IsOutOfCore,\n    NPartitions,\n)\n\n\ndef handle_ray_task_error(e):\n    for s in e.traceback_str.split(\"\\n\")[::-1]:\n        if \"Error\" in s or \"Exception\" in s:\n            try:\n                raise getattr(builtins, s.split(\":\")[0])(\"\".join(s.split(\":\")[1:]))\n            except AttributeError as att_err:\n                if \"module\" in str(att_err) and builtins.__name__ in str(att_err):\n                    pass\n                else:\n                    raise att_err\n    raise e\n\n\n# Register a fix import function to run on all_workers including the driver.\n# This is a hack solution to fix #647, #746\ndef _move_stdlib_ahead_of_site_packages(*args):\n    site_packages_path = None\n    site_packages_path_index = -1\n    for i, path in enumerate(sys.path):\n        if sys.exec_prefix in path and path.endswith(\"site-packages\"):\n            site_packages_path = path\n            site_packages_path_index = i\n            # break on first found\n            break\n\n    if site_packages_path is not None:\n        # stdlib packages layout as follows:\n        # - python3.x\n        #   - typing.py\n        #   - site-packages/\n        #     - pandas\n        # So extracting the dirname of the site_packages can point us\n        # to the directory containing standard libraries.\n        sys.path.insert(site_packages_path_index, os.path.dirname(site_packages_path))\n\n\n# Register a fix to import pandas on all workers before running tasks.\n# This prevents a race condition between two threads deserializing functions\n# and trying to import pandas at the same time.\ndef _import_pandas(*args):\n    import pandas  # noqa F401\n\n\ndef initialize_ray(\n    override_is_cluster=False,\n    override_redis_address: str = None,\n    override_redis_password: str = None,\n):\n    \"\"\"\n    Initializes ray based on parameters, environment variables and internal defaults.\n\n    Parameters\n    ----------\n    override_is_cluster: bool, optional\n        Whether to override the detection of Moding being run in a cluster\n        and always assume this runs on cluster head node.\n        This also overrides Ray worker detection and always runs the function,\n        not only from main thread.\n        If not specified, $MODIN_RAY_CLUSTER env variable is used.\n    override_redis_address: str, optional\n        What Redis address to connect to when running in Ray cluster.\n        If not specified, $MODIN_REDIS_ADDRESS is used.\n    override_redis_password: str, optional\n        What password to use when connecting to Redis.\n        If not specified, a new random one is generated.\n    \"\"\"\n    import ray\n\n    if not ray.is_initialized() or override_is_cluster:\n        import secrets\n\n        cluster = override_is_cluster or IsRayCluster.get()\n        redis_address = override_redis_address or RayRedisAddress.get()\n        redis_password = override_redis_password or secrets.token_hex(32)\n\n        if cluster:\n            # We only start ray in a cluster setting for the head node.\n            ray.init(\n                address=redis_address or \"auto\",\n                include_dashboard=False,\n                ignore_reinit_error=True,\n                _redis_password=redis_password,\n                logging_level=100,\n            )\n        else:\n            from modin.error_message import ErrorMessage\n\n            # This string is intentionally formatted this way. We want it indented in\n            # the warning message.\n            ErrorMessage.not_initialized(\n                \"Ray\",\n                \"\"\"\n    import ray\n    ray.init()\n\"\"\",\n            )\n            object_store_memory = Memory.get()\n            plasma_directory = RayPlasmaDir.get()\n            if IsOutOfCore.get():\n                if plasma_directory is None:\n                    from tempfile import gettempdir\n\n                    plasma_directory = gettempdir()\n                # We may have already set the memory from the environment variable, we don't\n                # want to overwrite that value if we have.\n                if object_store_memory is None:\n                    # Round down to the nearest Gigabyte.\n                    try:\n                        system_memory = ray._private.utils.get_system_memory()\n                    except AttributeError:  # Compatibility with Ray <= 1.2\n                        system_memory = ray.utils.get_system_memory()\n                    mem_bytes = system_memory // 10 ** 9 * 10 ** 9\n                    # Default to 8x memory for out of core\n                    object_store_memory = 8 * mem_bytes\n            # In case anything failed above, we can still improve the memory for Modin.\n            if object_store_memory is None:\n                # Round down to the nearest Gigabyte.\n                try:\n                    system_memory = ray._private.utils.get_system_memory()\n                except AttributeError:  # Compatibility with Ray <= 1.2\n                    system_memory = ray.utils.get_system_memory()\n                object_store_memory = int(0.6 * system_memory // 10 ** 9 * 10 ** 9)\n                # If the memory pool is smaller than 2GB, just use the default in ray.\n                if object_store_memory == 0:\n                    object_store_memory = None\n            else:\n                object_store_memory = int(object_store_memory)\n\n            ray_init_kwargs = {\n                \"num_cpus\": CpuCount.get(),\n                \"include_dashboard\": False,\n                \"ignore_reinit_error\": True,\n                \"_plasma_directory\": plasma_directory,\n                \"object_store_memory\": object_store_memory,\n                \"address\": redis_address,\n                \"_redis_password\": redis_password,\n                \"logging_level\": 100,\n                \"_memory\": object_store_memory,\n                \"_lru_evict\": True,\n            }\n            from packaging import version\n\n            # setting of `_lru_evict` parameter raises DeprecationWarning since ray 2.0.0.dev0\n            if version.parse(ray.__version__) >= version.parse(\"2.0.0.dev0\"):\n                ray_init_kwargs.pop(\"_lru_evict\")\n            ray.init(**ray_init_kwargs)\n\n        _move_stdlib_ahead_of_site_packages()\n        ray.worker.global_worker.run_function_on_all_workers(\n            _move_stdlib_ahead_of_site_packages\n        )\n\n        ray.worker.global_worker.run_function_on_all_workers(_import_pandas)\n\n    num_cpus = int(ray.cluster_resources()[\"CPU\"])\n    NPartitions.put_if_default(num_cpus)\n", "path": "modin/engines/ray/utils.py"}]}