File tree 1 file changed +25
-21
lines changed
1 file changed +25
-21
lines changed Original file line number Diff line number Diff line change 1
1
import os
2
+ import sys
2
3
import warnings
3
4
4
5
@@ -19,39 +20,42 @@ def get_execution_engine():
19
20
# execution engine + backing (Pandas + Ray).
20
21
if "MODIN_ENGINE" in os .environ :
21
22
# .title allows variants like ray, RAY, Ray
22
- engine = os .environ ["MODIN_ENGINE" ].title ()
23
+ return os .environ ["MODIN_ENGINE" ].title ()
23
24
else :
24
25
if "MODIN_DEBUG" in os .environ :
25
- engine = "Python"
26
+ return "Python"
26
27
else :
27
- try :
28
- import ray
29
-
30
- engine = "Ray"
31
- except ImportError :
28
+ if sys .platform != "win32" :
32
29
try :
33
- import dask
34
- import distributed
30
+ import ray
35
31
36
- engine = "Dask"
37
32
except ImportError :
38
- raise ImportError (
39
- "Please `pip install modin[ray] or modin[dask] to install an engine"
40
- )
33
+ pass
41
34
else :
42
- if (
43
- str (dask .__version__ ) < "2.1.0"
44
- or str (distributed .__version__ ) < "2.3.2"
45
- ):
35
+ if ray .__version__ != "0.8.0" :
46
36
raise ImportError (
47
- "Please `pip install modin[dask] to install compatible Dask version."
37
+ "Please `pip install modin[ray]` to install compatible Ray version."
48
38
)
39
+ return "Ray"
40
+ try :
41
+ import dask
42
+ import distributed
43
+
44
+ except ImportError :
45
+ raise ImportError (
46
+ "Please `pip install {}modin[dask]` to install an engine" .format (
47
+ "modin[ray]` or `" if sys .platform != "win32" else ""
48
+ )
49
+ )
49
50
else :
50
- if ray .__version__ != "0.8.0" :
51
+ if (
52
+ str (dask .__version__ ) < "2.1.0"
53
+ or str (distributed .__version__ ) < "2.3.2"
54
+ ):
51
55
raise ImportError (
52
- "Please `pip install modin[ray] to install compatible Ray version."
56
+ "Please `pip install modin[dask]` to install compatible Dask version."
53
57
)
54
- return engine
58
+ return "Dask"
55
59
56
60
57
61
def get_partition_format ():
You can’t perform that action at this time.
0 commit comments