We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 49ccb05 commit ba3dd32Copy full SHA for ba3dd32
modin/pandas/__init__.py
@@ -22,6 +22,9 @@
22
from .datetimes import to_datetime # noqa: 402
23
from .reshape import get_dummies # noqa: 402
24
25
+# Set this so that Pandas doesn't try to multithread by itself
26
+os.environ['OMP_NUM_THREADS'] = "1"
27
+
28
try:
29
if threading.current_thread().name == "MainThread":
30
ray.init(
@@ -31,9 +34,6 @@
31
34
except AssertionError:
32
35
pass
33
36
-# Set this so that Pandas doesn't try to multithread by itself
-os.environ['OMP_NUM_THREADS'] = "1"
-
37
num_cpus = ray.global_state.cluster_resources()['CPU']
38
DEFAULT_NPARTITIONS = int(num_cpus)
39
0 commit comments