Skip to content
This repository was archived by the owner on Feb 2, 2024. It is now read-only.

Commit 6401f3d

Browse files
Merge pull request #340 from PokhodenkoSA/skip-tests-numba-jit
Skip tests for CI with SDC_CONFIG_PIPELINE_SDC=False
2 parents 2e26f6f + e7851df commit 6401f3d

18 files changed

Lines changed: 488 additions & 317 deletions

.travis.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,9 @@ env:
1010
- NUMPY_VER=1.16
1111
- CONDA_PREFIX_PATH=$HOME/miniconda3
1212
matrix:
13-
- BUILD_MODE=package TEST_MODE=conda RUN_COVERAGE=False SDC_NP_MPI=1
14-
- BUILD_MODE=develop TEST_MODE=develop RUN_COVERAGE=True
13+
- BUILD_MODE=package TEST_MODE=conda RUN_COVERAGE=False SDC_CONFIG_PIPELINE_SDC=True
14+
- BUILD_MODE=package TEST_MODE=conda RUN_COVERAGE=False SDC_CONFIG_PIPELINE_SDC=True SDC_NP_MPI=1
15+
- BUILD_MODE=develop TEST_MODE=develop RUN_COVERAGE=True SDC_CONFIG_PIPELINE_SDC=True
1516

1617
before_install:
1718
- chmod 777 buildscripts/install_conda.sh

azure-pipelines.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ jobs:
99
PYTHON_VER: '3.7'
1010
NUMPY_VER: '1.16'
1111
USE_NUMBA_MASTER: 'False'
12+
SDC_CONFIG_PIPELINE_SDC: 'False'
1213

1314
- template: buildscripts/azure/template-linux-macos.yml
1415
parameters:
@@ -20,6 +21,7 @@ jobs:
2021
PYTHON_VER: '3.7'
2122
NUMPY_VER: '1.16'
2223
USE_NUMBA_MASTER: 'False'
24+
SDC_CONFIG_PIPELINE_SDC: 'False'
2325

2426
- template: buildscripts/azure/template-linux-macos.yml
2527
parameters:
@@ -31,6 +33,7 @@ jobs:
3133
PYTHON_VER: '3.7'
3234
NUMPY_VER: '1.16'
3335
USE_NUMBA_MASTER: 'False'
36+
SDC_CONFIG_PIPELINE_SDC: 'False'
3437

3538
- template: buildscripts/azure/template-windows.yml
3639
parameters:
@@ -42,6 +45,7 @@ jobs:
4245
PYTHON_VER: '3.7'
4346
NUMPY_VER: '1.16'
4447
USE_NUMBA_MASTER: 'True'
48+
SDC_CONFIG_PIPELINE_SDC: 'False'
4549

4650
- template: buildscripts/azure/template-linux-macos.yml
4751
parameters:
@@ -53,6 +57,7 @@ jobs:
5357
PYTHON_VER: '3.7'
5458
NUMPY_VER: '1.16'
5559
USE_NUMBA_MASTER: 'True'
60+
SDC_CONFIG_PIPELINE_SDC: 'False'
5661

5762
- template: buildscripts/azure/template-linux-macos.yml
5863
parameters:
@@ -63,4 +68,5 @@ jobs:
6368
py3.7_numpy1.16:
6469
PYTHON_VER: '3.7'
6570
NUMPY_VER: '1.16'
66-
USE_NUMBA_MASTER: 'True'
71+
USE_NUMBA_MASTER: 'True'
72+
SDC_CONFIG_PIPELINE_SDC: 'False'

buildscripts/azure/template-linux-macos.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
2323
- script: |
2424
if [ "$USE_NUMBA_MASTER" == "False" ]; then
25-
$HOME/miniconda3/bin/python buildscripts/build.py --build-mode=package --python=$PYTHON_VER --numpy=$NUMPY_VER --conda-prefix=$HOME/miniconda3;
25+
$HOME/miniconda3/bin/python buildscripts/build.py --build-mode=package --python=$PYTHON_VER --numpy=$NUMPY_VER --skip-smoke-tests --conda-prefix=$HOME/miniconda3;
2626
else
2727
$HOME/miniconda3/bin/python buildscripts/build.py --build-mode=package --python=$PYTHON_VER --numpy=$NUMPY_VER --use-numba-master --conda-prefix=$HOME/miniconda3;
2828
fi

buildscripts/azure/template-windows.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121

2222
- script: |
2323
IF "%USE_NUMBA_MASTER%" == "False" (
24-
"C:\\Miniconda\\python.exe" buildscripts\\build.py --build-mode=package --python=%PYTHON_VER% --numpy=%NUMPY_VER% --conda-prefix="C:\\Miniconda"
24+
"C:\\Miniconda\\python.exe" buildscripts\\build.py --build-mode=package --python=%PYTHON_VER% --numpy=%NUMPY_VER% --skip-smoke-tests --conda-prefix="C:\\Miniconda"
2525
) ELSE (
2626
"C:\\Miniconda\\python.exe" buildscripts\\build.py --build-mode=package --python=%PYTHON_VER% --numpy=%NUMPY_VER% --use-numba-master --conda-prefix="C:\\Miniconda")
2727
displayName: 'Build conda and wheel packages'

sdc/tests/test_basic.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,8 @@
3737
import sdc
3838
from sdc.tests.test_utils import (count_array_REPs, count_parfor_REPs,
3939
count_parfor_OneDs, count_array_OneDs, count_array_OneD_Vars,
40-
dist_IR_contains, get_rank, get_start_end, check_numba_version)
40+
dist_IR_contains, get_rank, get_start_end, check_numba_version,
41+
skip_numba_jit, TestCase)
4142

4243

4344
def get_np_state_ptr():
@@ -54,7 +55,7 @@ def _copy_py_state(r, ptr):
5455
return ints, index
5556

5657

57-
class BaseTest(unittest.TestCase):
58+
class BaseTest(TestCase):
5859

5960
def __init__(self, *args, **kwargs):
6061
super().__init__(*args, **kwargs)
@@ -214,6 +215,7 @@ def f():
214215
hpat_f = sdc.jit(f)
215216
hpat_f()
216217

218+
@skip_numba_jit
217219
def test_inline_locals(self):
218220
# make sure locals in inlined function works
219221
@sdc.jit(locals={'B': types.float64[:]})
@@ -250,6 +252,7 @@ def test_reduce(self):
250252
self.assertEqual(count_array_REPs(), 0)
251253
self.assertEqual(count_parfor_REPs(), 0)
252254

255+
@skip_numba_jit
253256
def test_reduce2(self):
254257
import sys
255258
dtypes = ['float32', 'float64', 'int32', 'int64']
@@ -277,6 +280,7 @@ def test_reduce2(self):
277280
self.assertEqual(count_array_REPs(), 0)
278281
self.assertEqual(count_parfor_REPs(), 0)
279282

283+
@skip_numba_jit
280284
def test_reduce_filter1(self):
281285
import sys
282286
dtypes = ['float32', 'float64', 'int32', 'int64']
@@ -306,6 +310,7 @@ def test_reduce_filter1(self):
306310
self.assertEqual(count_array_REPs(), 0)
307311
self.assertEqual(count_parfor_REPs(), 0)
308312

313+
@skip_numba_jit
309314
def test_array_reduce(self):
310315
binops = ['+=', '*=', '+=', '*=', '|=', '|=']
311316
dtypes = ['np.float32', 'np.float32', 'np.float64', 'np.float64', 'np.int32', 'np.int64']
@@ -365,6 +370,7 @@ def test_impl(N):
365370
self.assertEqual(count_array_OneDs(), 2)
366371
self.assertEqual(count_parfor_OneDs(), 2)
367372

373+
@skip_numba_jit
368374
def test_dist_input(self):
369375
def test_impl(A):
370376
return len(A)

sdc/tests/test_d4p.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,10 @@
3939
from sdc.tests.test_utils import (count_array_REPs, count_parfor_REPs,
4040
count_parfor_OneDs, count_array_OneDs,
4141
count_parfor_OneD_Vars, count_array_OneD_Vars,
42-
dist_IR_contains)
42+
dist_IR_contains,
43+
TestCase)
4344

44-
class TestD4P(unittest.TestCase):
45+
class TestD4P(TestCase):
4546
def test_logistic_regression(self):
4647
'''
4748
Testing logistic regression including

sdc/tests/test_dataframe.py

Lines changed: 31 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,8 @@
3636
import numba
3737
import sdc
3838
from sdc.tests.test_utils import (count_array_REPs, count_parfor_REPs, count_parfor_OneDs,
39-
count_array_OneDs, dist_IR_contains, get_start_end, check_numba_version)
39+
count_array_OneDs, dist_IR_contains, get_start_end, check_numba_version,
40+
skip_numba_jit, TestCase)
4041

4142
from sdc.tests.gen_test_data import ParquetGenerator
4243
from numba.config import IS_32BITS
@@ -52,7 +53,7 @@ def inner_get_column(df):
5253
COL_IND = 0
5354

5455

55-
class TestDataFrame(unittest.TestCase):
56+
class TestDataFrame(TestCase):
5657

5758
def test_create1(self):
5859
def test_impl(n):
@@ -149,6 +150,7 @@ def test_impl(df):
149150
df = pd.DataFrame({'A': ['aa', 'bb', 'cc']})
150151
pd.testing.assert_frame_equal(hpat_func(df), test_impl(df))
151152

153+
@skip_numba_jit
152154
def test_box_categorical(self):
153155
def test_impl(df):
154156
df['A'] = df['A'] + 1
@@ -201,6 +203,7 @@ def test_impl(n):
201203
self.assertEqual(count_array_REPs(), 0)
202204
self.assertEqual(count_parfor_REPs(), 0)
203205

206+
@skip_numba_jit
204207
def test_column_getitem1(self):
205208
def test_impl(n):
206209
df = pd.DataFrame({'A': np.ones(n), 'B': np.random.ranf(n)})
@@ -224,6 +227,7 @@ def test_impl(df):
224227
{'A': np.arange(n), 'B': np.ones(n), 'C': np.random.ranf(n)})
225228
pd.testing.assert_frame_equal(hpat_func(df), test_impl(df))
226229

230+
@skip_numba_jit
227231
def test_filter1(self):
228232
def test_impl(n):
229233
df = pd.DataFrame({'A': np.arange(n) + n, 'B': np.arange(n)**2})
@@ -236,6 +240,7 @@ def test_impl(n):
236240
self.assertEqual(count_array_REPs(), 0)
237241
self.assertEqual(count_parfor_REPs(), 0)
238242

243+
@skip_numba_jit
239244
def test_filter2(self):
240245
def test_impl(n):
241246
df = pd.DataFrame({'A': np.arange(n) + n, 'B': np.arange(n)**2})
@@ -248,6 +253,7 @@ def test_impl(n):
248253
self.assertEqual(count_array_REPs(), 0)
249254
self.assertEqual(count_parfor_REPs(), 0)
250255

256+
@skip_numba_jit
251257
def test_filter3(self):
252258
def test_impl(n):
253259
df = pd.DataFrame({'A': np.arange(n) + n, 'B': np.arange(n)**2})
@@ -260,6 +266,7 @@ def test_impl(n):
260266
self.assertEqual(count_array_REPs(), 0)
261267
self.assertEqual(count_parfor_REPs(), 0)
262268

269+
@skip_numba_jit
263270
def test_iloc1(self):
264271
def test_impl(df, n):
265272
return df.iloc[1:n].B.values
@@ -269,6 +276,7 @@ def test_impl(df, n):
269276
df = pd.DataFrame({'A': np.arange(n), 'B': np.arange(n)**2})
270277
np.testing.assert_array_equal(hpat_func(df, n), test_impl(df, n))
271278

279+
@skip_numba_jit
272280
def test_iloc2(self):
273281
def test_impl(df, n):
274282
return df.iloc[np.array([1, 4, 9])].B.values
@@ -424,6 +432,7 @@ def test_impl(df, n):
424432
do_check = False if platform.system() == 'Windows' and not IS_32BITS else True
425433
pd.testing.assert_frame_equal(df1, df2, check_dtype=do_check)
426434

435+
@skip_numba_jit
427436
def test_set_column_bool1(self):
428437
def test_impl(df):
429438
df['C'] = df['A'][df['B']]
@@ -489,6 +498,7 @@ def test_impl(n):
489498
self.assertEqual(count_array_REPs(), 0)
490499
self.assertEqual(count_parfor_REPs(), 0)
491500

501+
@skip_numba_jit
492502
def test_df_apply(self):
493503
def test_impl(n):
494504
df = pd.DataFrame({'A': np.arange(n), 'B': np.arange(n)})
@@ -499,6 +509,7 @@ def test_impl(n):
499509
hpat_func = sdc.jit(test_impl)
500510
np.testing.assert_almost_equal(hpat_func(n), test_impl(n))
501511

512+
@skip_numba_jit
502513
def test_df_apply_branch(self):
503514
def test_impl(n):
504515
df = pd.DataFrame({'A': np.arange(n), 'B': np.arange(n)})
@@ -523,6 +534,7 @@ def test_impl(n):
523534
self.assertEqual(count_array_REPs(), 0)
524535
self.assertEqual(count_parfor_REPs(), 0)
525536

537+
@skip_numba_jit
526538
def test_sort_values(self):
527539
def test_impl(df):
528540
df.sort_values('A', inplace=True)
@@ -534,6 +546,7 @@ def test_impl(df):
534546
hpat_func = sdc.jit(test_impl)
535547
np.testing.assert_almost_equal(hpat_func(df.copy()), test_impl(df))
536548

549+
@skip_numba_jit
537550
def test_sort_values_copy(self):
538551
def test_impl(df):
539552
df2 = df.sort_values('A')
@@ -545,6 +558,7 @@ def test_impl(df):
545558
hpat_func = sdc.jit(test_impl)
546559
np.testing.assert_almost_equal(hpat_func(df.copy()), test_impl(df))
547560

561+
@skip_numba_jit
548562
def test_sort_values_single_col(self):
549563
def test_impl(df):
550564
df.sort_values('A', inplace=True)
@@ -556,6 +570,7 @@ def test_impl(df):
556570
hpat_func = sdc.jit(test_impl)
557571
np.testing.assert_almost_equal(hpat_func(df.copy()), test_impl(df))
558572

573+
@skip_numba_jit
559574
def test_sort_values_single_col_str(self):
560575
def test_impl(df):
561576
df.sort_values('A', inplace=True)
@@ -573,6 +588,7 @@ def test_impl(df):
573588
hpat_func = sdc.jit(test_impl)
574589
self.assertTrue((hpat_func(df.copy()) == test_impl(df)).all())
575590

591+
@skip_numba_jit
576592
def test_sort_values_str(self):
577593
def test_impl(df):
578594
df.sort_values('A', inplace=True)
@@ -596,6 +612,7 @@ def test_impl(df):
596612
hpat_func = sdc.jit(test_impl)
597613
self.assertTrue((hpat_func(df) == sorted_df.B.values).all())
598614

615+
@skip_numba_jit
599616
def test_sort_parallel_single_col(self):
600617
# create `kde.parquet` file
601618
ParquetGenerator.gen_kde_pq()
@@ -671,6 +688,7 @@ def test_impl(df):
671688
})
672689
pd.testing.assert_frame_equal(hpat_func(df), test_impl(df))
673690

691+
@skip_numba_jit
674692
def test_sort_parallel(self):
675693
# create `kde.parquet` file
676694
ParquetGenerator.gen_kde_pq()
@@ -730,6 +748,7 @@ def test_impl(n):
730748
n = 11
731749
self.assertEqual(hpat_func(n), test_impl(n))
732750

751+
@skip_numba_jit
733752
def test_itertuples_analysis(self):
734753
"""tests array analysis handling of generated tuples, shapes going
735754
through blocks and getting used in an array dimension
@@ -757,6 +776,7 @@ def test_impl(n):
757776
n = 11
758777
pd.testing.assert_frame_equal(hpat_func(n), test_impl(n))
759778

779+
@skip_numba_jit
760780
def test_pct_change1(self):
761781
def test_impl(n):
762782
df = pd.DataFrame({'A': np.arange(n) + 1.0, 'B': np.arange(n) + 1})
@@ -909,6 +929,7 @@ def test_impl():
909929
hpat_func = sdc.jit(test_impl)
910930
pd.testing.assert_frame_equal(hpat_func(), test_impl())
911931

932+
@skip_numba_jit
912933
def test_df_dropna1(self):
913934
def test_impl(df):
914935
return df.dropna()
@@ -919,6 +940,7 @@ def test_impl(df):
919940
h_out = hpat_func(df)
920941
pd.testing.assert_frame_equal(out, h_out)
921942

943+
@skip_numba_jit
922944
def test_df_dropna2(self):
923945
def test_impl(df):
924946
return df.dropna()
@@ -929,6 +951,7 @@ def test_impl(df):
929951
h_out = hpat_func(df)
930952
pd.testing.assert_frame_equal(out, h_out)
931953

954+
@skip_numba_jit
932955
def test_df_dropna_inplace1(self):
933956
# TODO: fix error when no df is returned
934957
def test_impl(df):
@@ -942,6 +965,7 @@ def test_impl(df):
942965
h_out = hpat_func(df2)
943966
pd.testing.assert_frame_equal(out, h_out)
944967

968+
@skip_numba_jit
945969
def test_df_dropna_str1(self):
946970
def test_impl(df):
947971
return df.dropna()
@@ -952,6 +976,7 @@ def test_impl(df):
952976
h_out = hpat_func(df)
953977
pd.testing.assert_frame_equal(out, h_out)
954978

979+
@skip_numba_jit
955980
def test_df_drop1(self):
956981
def test_impl(df):
957982
return df.drop(columns=['A'])
@@ -960,6 +985,7 @@ def test_impl(df):
960985
hpat_func = sdc.jit(test_impl)
961986
pd.testing.assert_frame_equal(hpat_func(df), test_impl(df))
962987

988+
@skip_numba_jit
963989
def test_df_drop_inplace2(self):
964990
# test droping after setting the column
965991
def test_impl(df):
@@ -1014,6 +1040,7 @@ def test_impl(df):
10141040
df = pd.DataFrame({'A': np.arange(n), 'B': np.arange(n)**2})
10151041
pd.testing.assert_frame_equal(hpat_func(df), test_impl(df))
10161042

1043+
@skip_numba_jit
10171044
def test_append1(self):
10181045
def test_impl(df, df2):
10191046
return df.append(df2, ignore_index=True)
@@ -1025,6 +1052,7 @@ def test_impl(df, df2):
10251052
df2.A[n // 2:] = n
10261053
pd.testing.assert_frame_equal(hpat_func(df, df2), test_impl(df, df2))
10271054

1055+
@skip_numba_jit
10281056
def test_append2(self):
10291057
def test_impl(df, df2, df3):
10301058
return df.append([df2, df3], ignore_index=True)
@@ -1038,6 +1066,7 @@ def test_impl(df, df2, df3):
10381066
pd.testing.assert_frame_equal(
10391067
hpat_func(df, df2, df3), test_impl(df, df2, df3))
10401068

1069+
@skip_numba_jit
10411070
def test_concat_columns1(self):
10421071
def test_impl(S1, S2):
10431072
return pd.concat([S1, S2], axis=1)

0 commit comments

Comments
 (0)