Skip to content

Commit 3a4038f

Browse files
authored
Modify scipy compatibility script (#1202)
1 parent 3c05eeb commit 3a4038f

File tree

1 file changed

+12
-5
lines changed

1 file changed

+12
-5
lines changed

.ci/scripts/get_compatible_scipy_version.py

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,22 @@
1515
# limitations under the License.
1616
#===============================================================================
1717
from daal4py.sklearn._utils import sklearn_check_version
18+
from sys import version_info as python_version
19+
from sys import exit, stderr
1820

1921

20-
if sklearn_check_version('1.2'):
21-
print('scipy==1.9')
22+
if sklearn_check_version('1.3') or python_version[1] > 11:
23+
print('Scipy version is not specified for this sklearn/python version.', file=stderr)
24+
exit(1)
25+
elif sklearn_check_version('1.2') or python_version[1] > 10:
26+
print('scipy==1.9.*')
2227
elif sklearn_check_version('1.1'):
23-
print('scipy==1.8')
28+
print('scipy==1.8.*')
2429
elif sklearn_check_version('1.0'):
25-
print('scipy==1.7')
30+
print('scipy==1.7.*')
2631
elif sklearn_check_version('0.24'):
27-
print('scipy==1.6')
32+
print('scipy==1.6.*')
2833
else:
34+
print('Scipy version defaults to not specified '
35+
'for this outdated sklearn/python version.', file=stderr)
2936
print('scipy')

0 commit comments

Comments
 (0)