We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Turn off OMP_NUM_THREADS warnings? 
Can we just turn off the warnings on each ray.init? We can't force everyone to set the environment variable. 

https://github.com/ray-project/ray/blob/3f99be8dad5e0e1abfaede1f25753a0af74f1648/python/ray/__init__.py#L16-L21

--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `python/ray/__init__.py`
Content:
```
1 import os
2 import logging
3 from os.path import dirname
4 import sys
5 
6 logger = logging.getLogger(__name__)
7 
8 # MUST add pickle5 to the import path because it will be imported by some
9 # raylet modules.
10 
11 if "pickle5" in sys.modules:
12     raise ImportError("Ray must be imported before pickle5 because Ray "
13                       "requires a specific version of pickle5 (which is "
14                       "packaged along with Ray).")
15 
16 if "OMP_NUM_THREADS" not in os.environ:
17     logger.warning("[ray] Forcing OMP_NUM_THREADS=1 to avoid performance "
18                    "degradation with many workers (issue #6998). You can "
19                    "override this by explicitly setting OMP_NUM_THREADS.")
20     os.environ["OMP_NUM_THREADS"] = "1"
21 
22 # Add the directory containing pickle5 to the Python path so that we find the
23 # pickle5 version packaged with ray and not a pre-existing pickle5.
24 pickle5_path = os.path.join(
25     os.path.abspath(os.path.dirname(__file__)), "pickle5_files")
26 sys.path.insert(0, pickle5_path)
27 
28 # Importing psutil & setproctitle. Must be before ray._raylet is initialized.
29 thirdparty_files = os.path.join(
30     os.path.abspath(os.path.dirname(__file__)), "thirdparty_files")
31 sys.path.insert(0, thirdparty_files)
32 
33 # Expose ray ABI symbols which may be dependent by other shared
34 # libraries such as _streaming.so. See BUILD.bazel:_raylet
35 so_path = os.path.join(dirname(__file__), "_raylet.so")
36 if os.path.exists(so_path):
37     import ctypes
38     from ctypes import CDLL
39     CDLL(so_path, ctypes.RTLD_GLOBAL)
40 
41 # MUST import ray._raylet before pyarrow to initialize some global variables.
42 # It seems the library related to memory allocation in pyarrow will destroy the
43 # initialization of grpc if we import pyarrow at first.
44 # NOTE(JoeyJiang): See https://github.com/ray-project/ray/issues/5219 for more
45 # details.
46 import ray._raylet  # noqa: E402
47 
48 if "pyarrow" in sys.modules:
49     raise ImportError("Ray must be imported before pyarrow because Ray "
50                       "requires a specific version of pyarrow (which is "
51                       "packaged along with Ray).")
52 
53 # Add the directory containing pyarrow to the Python path so that we find the
54 # pyarrow version packaged with ray and not a pre-existing pyarrow.
55 pyarrow_path = os.path.join(
56     os.path.abspath(os.path.dirname(__file__)), "pyarrow_files")
57 sys.path.insert(0, pyarrow_path)
58 
59 # See https://github.com/ray-project/ray/issues/131.
60 helpful_message = """
61 
62 If you are using Anaconda, try fixing this problem by running:
63 
64     conda install libgcc
65 """
66 
67 try:
68     import pyarrow  # noqa: F401
69 
70     # pyarrow is not imported inside of _raylet because of the issue described
71     # above. In order for Cython to compile _raylet, pyarrow is set to None
72     # in _raylet instead, so we give _raylet a real reference to it here.
73     # We first do the attribute checks here so that building the documentation
74     # succeeds without fully installing ray..
75     # TODO(edoakes): Fix this.
76     if hasattr(ray, "_raylet") and hasattr(ray._raylet, "pyarrow"):
77         ray._raylet.pyarrow = pyarrow
78 except ImportError as e:
79     if ((hasattr(e, "msg") and isinstance(e.msg, str)
80          and ("libstdc++" in e.msg or "CXX" in e.msg))):
81         # This code path should be taken with Python 3.
82         e.msg += helpful_message
83     elif (hasattr(e, "message") and isinstance(e.message, str)
84           and ("libstdc++" in e.message or "CXX" in e.message)):
85         # This code path should be taken with Python 2.
86         condition = (hasattr(e, "args") and isinstance(e.args, tuple)
87                      and len(e.args) == 1 and isinstance(e.args[0], str))
88         if condition:
89             e.args = (e.args[0] + helpful_message, )
90         else:
91             if not hasattr(e, "args"):
92                 e.args = ()
93             elif not isinstance(e.args, tuple):
94                 e.args = (e.args, )
95             e.args += (helpful_message, )
96     raise
97 
98 from ray._raylet import (
99     ActorCheckpointID,
100     ActorClassID,
101     ActorID,
102     ClientID,
103     Config as _Config,
104     JobID,
105     WorkerID,
106     FunctionID,
107     ObjectID,
108     TaskID,
109     UniqueID,
110     Language,
111 )  # noqa: E402
112 
113 _config = _Config()
114 
115 from ray.profiling import profile  # noqa: E402
116 from ray.state import (jobs, nodes, actors, tasks, objects, timeline,
117                        object_transfer_timeline, cluster_resources,
118                        available_resources, errors)  # noqa: E402
119 from ray.worker import (
120     LOCAL_MODE,
121     SCRIPT_MODE,
122     WORKER_MODE,
123     connect,
124     disconnect,
125     get,
126     get_gpu_ids,
127     get_resource_ids,
128     get_webui_url,
129     init,
130     is_initialized,
131     put,
132     register_custom_serializer,
133     remote,
134     shutdown,
135     show_in_webui,
136     wait,
137 )  # noqa: E402
138 import ray.internal  # noqa: E402
139 import ray.projects  # noqa: E402
140 # We import ray.actor because some code is run in actor.py which initializes
141 # some functions in the worker.
142 import ray.actor  # noqa: F401
143 from ray.actor import method  # noqa: E402
144 from ray.runtime_context import _get_runtime_context  # noqa: E402
145 from ray.cross_language import java_function, java_actor_class  # noqa: E402
146 
147 # Ray version string.
148 __version__ = "0.9.0.dev0"
149 
150 __all__ = [
151     "jobs",
152     "nodes",
153     "actors",
154     "tasks",
155     "objects",
156     "timeline",
157     "object_transfer_timeline",
158     "cluster_resources",
159     "available_resources",
160     "errors",
161     "LOCAL_MODE",
162     "PYTHON_MODE",
163     "SCRIPT_MODE",
164     "WORKER_MODE",
165     "__version__",
166     "_config",
167     "_get_runtime_context",
168     "actor",
169     "connect",
170     "disconnect",
171     "get",
172     "get_gpu_ids",
173     "get_resource_ids",
174     "get_webui_url",
175     "init",
176     "internal",
177     "is_initialized",
178     "method",
179     "profile",
180     "projects",
181     "put",
182     "register_custom_serializer",
183     "remote",
184     "shutdown",
185     "show_in_webui",
186     "wait",
187     "Language",
188     "java_function",
189     "java_actor_class",
190 ]
191 
192 # ID types
193 __all__ += [
194     "ActorCheckpointID",
195     "ActorClassID",
196     "ActorID",
197     "ClientID",
198     "JobID",
199     "WorkerID",
200     "FunctionID",
201     "ObjectID",
202     "TaskID",
203     "UniqueID",
204 ]
205 
206 import ctypes  # noqa: E402
207 # Windows only
208 if hasattr(ctypes, "windll"):
209     # Makes sure that all child processes die when we die. Also makes sure that
210     # fatal crashes result in process termination rather than an error dialog
211     # (the latter is annoying since we have a lot of processes). This is done
212     # by associating all child processes with a "job" object that imposes this
213     # behavior.
214     (lambda kernel32: (lambda job: (lambda n: kernel32.SetInformationJobObject(job, 9, "\0" * 17 + chr(0x8 | 0x4 | 0x20) + "\0" * (n - 18), n))(0x90 if ctypes.sizeof(ctypes.c_void_p) > ctypes.sizeof(ctypes.c_int) else 0x70) and kernel32.AssignProcessToJobObject(job, ctypes.c_void_p(kernel32.GetCurrentProcess())))(ctypes.c_void_p(kernel32.CreateJobObjectW(None, None))) if kernel32 is not None else None)(ctypes.windll.kernel32)  # noqa: E501
215
```
--- 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/python/ray/__init__.py b/python/ray/__init__.py
--- a/python/ray/__init__.py
+++ b/python/ray/__init__.py
@@ -14,9 +14,9 @@
                       "packaged along with Ray).")
 
 if "OMP_NUM_THREADS" not in os.environ:
-    logger.warning("[ray] Forcing OMP_NUM_THREADS=1 to avoid performance "
-                   "degradation with many workers (issue #6998). You can "
-                   "override this by explicitly setting OMP_NUM_THREADS.")
+    logger.debug("[ray] Forcing OMP_NUM_THREADS=1 to avoid performance "
+                 "degradation with many workers (issue #6998). You can "
+                 "override this by explicitly setting OMP_NUM_THREADS.")
     os.environ["OMP_NUM_THREADS"] = "1"
 
 # Add the directory containing pickle5 to the Python path so that we find the

{"golden_diff": "diff --git a/python/ray/__init__.py b/python/ray/__init__.py\n--- a/python/ray/__init__.py\n+++ b/python/ray/__init__.py\n@@ -14,9 +14,9 @@\n                       \"packaged along with Ray).\")\n \n if \"OMP_NUM_THREADS\" not in os.environ:\n-    logger.warning(\"[ray] Forcing OMP_NUM_THREADS=1 to avoid performance \"\n-                   \"degradation with many workers (issue #6998). You can \"\n-                   \"override this by explicitly setting OMP_NUM_THREADS.\")\n+    logger.debug(\"[ray] Forcing OMP_NUM_THREADS=1 to avoid performance \"\n+                 \"degradation with many workers (issue #6998). You can \"\n+                 \"override this by explicitly setting OMP_NUM_THREADS.\")\n     os.environ[\"OMP_NUM_THREADS\"] = \"1\"\n \n # Add the directory containing pickle5 to the Python path so that we find the\n", "issue": "Turn off OMP_NUM_THREADS warnings? \nCan we just turn off the warnings on each ray.init? We can't force everyone to set the environment variable. \r\n\r\nhttps://github.com/ray-project/ray/blob/3f99be8dad5e0e1abfaede1f25753a0af74f1648/python/ray/__init__.py#L16-L21\n", "before_files": [{"content": "import os\nimport logging\nfrom os.path import dirname\nimport sys\n\nlogger = logging.getLogger(__name__)\n\n# MUST add pickle5 to the import path because it will be imported by some\n# raylet modules.\n\nif \"pickle5\" in sys.modules:\n    raise ImportError(\"Ray must be imported before pickle5 because Ray \"\n                      \"requires a specific version of pickle5 (which is \"\n                      \"packaged along with Ray).\")\n\nif \"OMP_NUM_THREADS\" not in os.environ:\n    logger.warning(\"[ray] Forcing OMP_NUM_THREADS=1 to avoid performance \"\n                   \"degradation with many workers (issue #6998). You can \"\n                   \"override this by explicitly setting OMP_NUM_THREADS.\")\n    os.environ[\"OMP_NUM_THREADS\"] = \"1\"\n\n# Add the directory containing pickle5 to the Python path so that we find the\n# pickle5 version packaged with ray and not a pre-existing pickle5.\npickle5_path = os.path.join(\n    os.path.abspath(os.path.dirname(__file__)), \"pickle5_files\")\nsys.path.insert(0, pickle5_path)\n\n# Importing psutil & setproctitle. Must be before ray._raylet is initialized.\nthirdparty_files = os.path.join(\n    os.path.abspath(os.path.dirname(__file__)), \"thirdparty_files\")\nsys.path.insert(0, thirdparty_files)\n\n# Expose ray ABI symbols which may be dependent by other shared\n# libraries such as _streaming.so. See BUILD.bazel:_raylet\nso_path = os.path.join(dirname(__file__), \"_raylet.so\")\nif os.path.exists(so_path):\n    import ctypes\n    from ctypes import CDLL\n    CDLL(so_path, ctypes.RTLD_GLOBAL)\n\n# MUST import ray._raylet before pyarrow to initialize some global variables.\n# It seems the library related to memory allocation in pyarrow will destroy the\n# initialization of grpc if we import pyarrow at first.\n# NOTE(JoeyJiang): See https://github.com/ray-project/ray/issues/5219 for more\n# details.\nimport ray._raylet  # noqa: E402\n\nif \"pyarrow\" in sys.modules:\n    raise ImportError(\"Ray must be imported before pyarrow because Ray \"\n                      \"requires a specific version of pyarrow (which is \"\n                      \"packaged along with Ray).\")\n\n# Add the directory containing pyarrow to the Python path so that we find the\n# pyarrow version packaged with ray and not a pre-existing pyarrow.\npyarrow_path = os.path.join(\n    os.path.abspath(os.path.dirname(__file__)), \"pyarrow_files\")\nsys.path.insert(0, pyarrow_path)\n\n# See https://github.com/ray-project/ray/issues/131.\nhelpful_message = \"\"\"\n\nIf you are using Anaconda, try fixing this problem by running:\n\n    conda install libgcc\n\"\"\"\n\ntry:\n    import pyarrow  # noqa: F401\n\n    # pyarrow is not imported inside of _raylet because of the issue described\n    # above. In order for Cython to compile _raylet, pyarrow is set to None\n    # in _raylet instead, so we give _raylet a real reference to it here.\n    # We first do the attribute checks here so that building the documentation\n    # succeeds without fully installing ray..\n    # TODO(edoakes): Fix this.\n    if hasattr(ray, \"_raylet\") and hasattr(ray._raylet, \"pyarrow\"):\n        ray._raylet.pyarrow = pyarrow\nexcept ImportError as e:\n    if ((hasattr(e, \"msg\") and isinstance(e.msg, str)\n         and (\"libstdc++\" in e.msg or \"CXX\" in e.msg))):\n        # This code path should be taken with Python 3.\n        e.msg += helpful_message\n    elif (hasattr(e, \"message\") and isinstance(e.message, str)\n          and (\"libstdc++\" in e.message or \"CXX\" in e.message)):\n        # This code path should be taken with Python 2.\n        condition = (hasattr(e, \"args\") and isinstance(e.args, tuple)\n                     and len(e.args) == 1 and isinstance(e.args[0], str))\n        if condition:\n            e.args = (e.args[0] + helpful_message, )\n        else:\n            if not hasattr(e, \"args\"):\n                e.args = ()\n            elif not isinstance(e.args, tuple):\n                e.args = (e.args, )\n            e.args += (helpful_message, )\n    raise\n\nfrom ray._raylet import (\n    ActorCheckpointID,\n    ActorClassID,\n    ActorID,\n    ClientID,\n    Config as _Config,\n    JobID,\n    WorkerID,\n    FunctionID,\n    ObjectID,\n    TaskID,\n    UniqueID,\n    Language,\n)  # noqa: E402\n\n_config = _Config()\n\nfrom ray.profiling import profile  # noqa: E402\nfrom ray.state import (jobs, nodes, actors, tasks, objects, timeline,\n                       object_transfer_timeline, cluster_resources,\n                       available_resources, errors)  # noqa: E402\nfrom ray.worker import (\n    LOCAL_MODE,\n    SCRIPT_MODE,\n    WORKER_MODE,\n    connect,\n    disconnect,\n    get,\n    get_gpu_ids,\n    get_resource_ids,\n    get_webui_url,\n    init,\n    is_initialized,\n    put,\n    register_custom_serializer,\n    remote,\n    shutdown,\n    show_in_webui,\n    wait,\n)  # noqa: E402\nimport ray.internal  # noqa: E402\nimport ray.projects  # noqa: E402\n# We import ray.actor because some code is run in actor.py which initializes\n# some functions in the worker.\nimport ray.actor  # noqa: F401\nfrom ray.actor import method  # noqa: E402\nfrom ray.runtime_context import _get_runtime_context  # noqa: E402\nfrom ray.cross_language import java_function, java_actor_class  # noqa: E402\n\n# Ray version string.\n__version__ = \"0.9.0.dev0\"\n\n__all__ = [\n    \"jobs\",\n    \"nodes\",\n    \"actors\",\n    \"tasks\",\n    \"objects\",\n    \"timeline\",\n    \"object_transfer_timeline\",\n    \"cluster_resources\",\n    \"available_resources\",\n    \"errors\",\n    \"LOCAL_MODE\",\n    \"PYTHON_MODE\",\n    \"SCRIPT_MODE\",\n    \"WORKER_MODE\",\n    \"__version__\",\n    \"_config\",\n    \"_get_runtime_context\",\n    \"actor\",\n    \"connect\",\n    \"disconnect\",\n    \"get\",\n    \"get_gpu_ids\",\n    \"get_resource_ids\",\n    \"get_webui_url\",\n    \"init\",\n    \"internal\",\n    \"is_initialized\",\n    \"method\",\n    \"profile\",\n    \"projects\",\n    \"put\",\n    \"register_custom_serializer\",\n    \"remote\",\n    \"shutdown\",\n    \"show_in_webui\",\n    \"wait\",\n    \"Language\",\n    \"java_function\",\n    \"java_actor_class\",\n]\n\n# ID types\n__all__ += [\n    \"ActorCheckpointID\",\n    \"ActorClassID\",\n    \"ActorID\",\n    \"ClientID\",\n    \"JobID\",\n    \"WorkerID\",\n    \"FunctionID\",\n    \"ObjectID\",\n    \"TaskID\",\n    \"UniqueID\",\n]\n\nimport ctypes  # noqa: E402\n# Windows only\nif hasattr(ctypes, \"windll\"):\n    # Makes sure that all child processes die when we die. Also makes sure that\n    # fatal crashes result in process termination rather than an error dialog\n    # (the latter is annoying since we have a lot of processes). This is done\n    # by associating all child processes with a \"job\" object that imposes this\n    # behavior.\n    (lambda kernel32: (lambda job: (lambda n: kernel32.SetInformationJobObject(job, 9, \"\\0\" * 17 + chr(0x8 | 0x4 | 0x20) + \"\\0\" * (n - 18), n))(0x90 if ctypes.sizeof(ctypes.c_void_p) > ctypes.sizeof(ctypes.c_int) else 0x70) and kernel32.AssignProcessToJobObject(job, ctypes.c_void_p(kernel32.GetCurrentProcess())))(ctypes.c_void_p(kernel32.CreateJobObjectW(None, None))) if kernel32 is not None else None)(ctypes.windll.kernel32)  # noqa: E501\n", "path": "python/ray/__init__.py"}], "after_files": [{"content": "import os\nimport logging\nfrom os.path import dirname\nimport sys\n\nlogger = logging.getLogger(__name__)\n\n# MUST add pickle5 to the import path because it will be imported by some\n# raylet modules.\n\nif \"pickle5\" in sys.modules:\n    raise ImportError(\"Ray must be imported before pickle5 because Ray \"\n                      \"requires a specific version of pickle5 (which is \"\n                      \"packaged along with Ray).\")\n\nif \"OMP_NUM_THREADS\" not in os.environ:\n    logger.debug(\"[ray] Forcing OMP_NUM_THREADS=1 to avoid performance \"\n                 \"degradation with many workers (issue #6998). You can \"\n                 \"override this by explicitly setting OMP_NUM_THREADS.\")\n    os.environ[\"OMP_NUM_THREADS\"] = \"1\"\n\n# Add the directory containing pickle5 to the Python path so that we find the\n# pickle5 version packaged with ray and not a pre-existing pickle5.\npickle5_path = os.path.join(\n    os.path.abspath(os.path.dirname(__file__)), \"pickle5_files\")\nsys.path.insert(0, pickle5_path)\n\n# Importing psutil & setproctitle. Must be before ray._raylet is initialized.\nthirdparty_files = os.path.join(\n    os.path.abspath(os.path.dirname(__file__)), \"thirdparty_files\")\nsys.path.insert(0, thirdparty_files)\n\n# Expose ray ABI symbols which may be dependent by other shared\n# libraries such as _streaming.so. See BUILD.bazel:_raylet\nso_path = os.path.join(dirname(__file__), \"_raylet.so\")\nif os.path.exists(so_path):\n    import ctypes\n    from ctypes import CDLL\n    CDLL(so_path, ctypes.RTLD_GLOBAL)\n\n# MUST import ray._raylet before pyarrow to initialize some global variables.\n# It seems the library related to memory allocation in pyarrow will destroy the\n# initialization of grpc if we import pyarrow at first.\n# NOTE(JoeyJiang): See https://github.com/ray-project/ray/issues/5219 for more\n# details.\nimport ray._raylet  # noqa: E402\n\nif \"pyarrow\" in sys.modules:\n    raise ImportError(\"Ray must be imported before pyarrow because Ray \"\n                      \"requires a specific version of pyarrow (which is \"\n                      \"packaged along with Ray).\")\n\n# Add the directory containing pyarrow to the Python path so that we find the\n# pyarrow version packaged with ray and not a pre-existing pyarrow.\npyarrow_path = os.path.join(\n    os.path.abspath(os.path.dirname(__file__)), \"pyarrow_files\")\nsys.path.insert(0, pyarrow_path)\n\n# See https://github.com/ray-project/ray/issues/131.\nhelpful_message = \"\"\"\n\nIf you are using Anaconda, try fixing this problem by running:\n\n    conda install libgcc\n\"\"\"\n\ntry:\n    import pyarrow  # noqa: F401\n\n    # pyarrow is not imported inside of _raylet because of the issue described\n    # above. In order for Cython to compile _raylet, pyarrow is set to None\n    # in _raylet instead, so we give _raylet a real reference to it here.\n    # We first do the attribute checks here so that building the documentation\n    # succeeds without fully installing ray..\n    # TODO(edoakes): Fix this.\n    if hasattr(ray, \"_raylet\") and hasattr(ray._raylet, \"pyarrow\"):\n        ray._raylet.pyarrow = pyarrow\nexcept ImportError as e:\n    if ((hasattr(e, \"msg\") and isinstance(e.msg, str)\n         and (\"libstdc++\" in e.msg or \"CXX\" in e.msg))):\n        # This code path should be taken with Python 3.\n        e.msg += helpful_message\n    elif (hasattr(e, \"message\") and isinstance(e.message, str)\n          and (\"libstdc++\" in e.message or \"CXX\" in e.message)):\n        # This code path should be taken with Python 2.\n        condition = (hasattr(e, \"args\") and isinstance(e.args, tuple)\n                     and len(e.args) == 1 and isinstance(e.args[0], str))\n        if condition:\n            e.args = (e.args[0] + helpful_message, )\n        else:\n            if not hasattr(e, \"args\"):\n                e.args = ()\n            elif not isinstance(e.args, tuple):\n                e.args = (e.args, )\n            e.args += (helpful_message, )\n    raise\n\nfrom ray._raylet import (\n    ActorCheckpointID,\n    ActorClassID,\n    ActorID,\n    ClientID,\n    Config as _Config,\n    JobID,\n    WorkerID,\n    FunctionID,\n    ObjectID,\n    TaskID,\n    UniqueID,\n    Language,\n)  # noqa: E402\n\n_config = _Config()\n\nfrom ray.profiling import profile  # noqa: E402\nfrom ray.state import (jobs, nodes, actors, tasks, objects, timeline,\n                       object_transfer_timeline, cluster_resources,\n                       available_resources, errors)  # noqa: E402\nfrom ray.worker import (\n    LOCAL_MODE,\n    SCRIPT_MODE,\n    WORKER_MODE,\n    connect,\n    disconnect,\n    get,\n    get_gpu_ids,\n    get_resource_ids,\n    get_webui_url,\n    init,\n    is_initialized,\n    put,\n    register_custom_serializer,\n    remote,\n    shutdown,\n    show_in_webui,\n    wait,\n)  # noqa: E402\nimport ray.internal  # noqa: E402\nimport ray.projects  # noqa: E402\n# We import ray.actor because some code is run in actor.py which initializes\n# some functions in the worker.\nimport ray.actor  # noqa: F401\nfrom ray.actor import method  # noqa: E402\nfrom ray.runtime_context import _get_runtime_context  # noqa: E402\nfrom ray.cross_language import java_function, java_actor_class  # noqa: E402\n\n# Ray version string.\n__version__ = \"0.9.0.dev0\"\n\n__all__ = [\n    \"jobs\",\n    \"nodes\",\n    \"actors\",\n    \"tasks\",\n    \"objects\",\n    \"timeline\",\n    \"object_transfer_timeline\",\n    \"cluster_resources\",\n    \"available_resources\",\n    \"errors\",\n    \"LOCAL_MODE\",\n    \"PYTHON_MODE\",\n    \"SCRIPT_MODE\",\n    \"WORKER_MODE\",\n    \"__version__\",\n    \"_config\",\n    \"_get_runtime_context\",\n    \"actor\",\n    \"connect\",\n    \"disconnect\",\n    \"get\",\n    \"get_gpu_ids\",\n    \"get_resource_ids\",\n    \"get_webui_url\",\n    \"init\",\n    \"internal\",\n    \"is_initialized\",\n    \"method\",\n    \"profile\",\n    \"projects\",\n    \"put\",\n    \"register_custom_serializer\",\n    \"remote\",\n    \"shutdown\",\n    \"show_in_webui\",\n    \"wait\",\n    \"Language\",\n    \"java_function\",\n    \"java_actor_class\",\n]\n\n# ID types\n__all__ += [\n    \"ActorCheckpointID\",\n    \"ActorClassID\",\n    \"ActorID\",\n    \"ClientID\",\n    \"JobID\",\n    \"WorkerID\",\n    \"FunctionID\",\n    \"ObjectID\",\n    \"TaskID\",\n    \"UniqueID\",\n]\n\nimport ctypes  # noqa: E402\n# Windows only\nif hasattr(ctypes, \"windll\"):\n    # Makes sure that all child processes die when we die. Also makes sure that\n    # fatal crashes result in process termination rather than an error dialog\n    # (the latter is annoying since we have a lot of processes). This is done\n    # by associating all child processes with a \"job\" object that imposes this\n    # behavior.\n    (lambda kernel32: (lambda job: (lambda n: kernel32.SetInformationJobObject(job, 9, \"\\0\" * 17 + chr(0x8 | 0x4 | 0x20) + \"\\0\" * (n - 18), n))(0x90 if ctypes.sizeof(ctypes.c_void_p) > ctypes.sizeof(ctypes.c_int) else 0x70) and kernel32.AssignProcessToJobObject(job, ctypes.c_void_p(kernel32.GetCurrentProcess())))(ctypes.c_void_p(kernel32.CreateJobObjectW(None, None))) if kernel32 is not None else None)(ctypes.windll.kernel32)  # noqa: E501\n", "path": "python/ray/__init__.py"}]}