Skip to content
This repository was archived by the owner on Feb 2, 2024. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
1ecae07
Merge pull request #17 from IntelPython/master
Vyacheslav-Smirnov Oct 23, 2019
f298633
Merge pull request #18 from IntelPython/master
Vyacheslav-Smirnov Oct 28, 2019
0ad2636
Merge pull request #20 from IntelPython/master
Vyacheslav-Smirnov Nov 2, 2019
6a3b69d
Merge pull request #22 from IntelPython/master
Vyacheslav-Smirnov Nov 7, 2019
71f2656
Merge pull request #23 from IntelPython/master
Vyacheslav-Smirnov Nov 12, 2019
b3c7719
Merge pull request #26 from IntelPython/master
Vyacheslav-Smirnov Nov 14, 2019
fcd587b
Merge pull request #27 from IntelPython/master
Vyacheslav-Smirnov Nov 15, 2019
966b2bf
Merge pull request #28 from IntelPython/master
Vyacheslav-Smirnov Nov 15, 2019
9c6932b
Merge pull request #29 from IntelPython/master
Vyacheslav-Smirnov Nov 18, 2019
db7d28a
Switch tests to new pipeline
Vyacheslav-Smirnov Nov 18, 2019
186f75c
Add --skip-smoke-tests option to build with Numba 0.46 to focus on te…
Vyacheslav-Smirnov Nov 18, 2019
75ef4d6
Remove --skip-smoke-tests from test.py script launch
Vyacheslav-Smirnov Nov 18, 2019
506b6c3
Merge branch 'master' into switch_tests_to_new_pipeline
shssf Nov 18, 2019
b66eb83
Merge pull request #34 from IntelPython/master
Vyacheslav-Smirnov Nov 26, 2019
384fbb5
Use SDC_CONFIG_PIPELINE_SDC=1 for Travis; Add Linux configuration wit…
Vyacheslav-Smirnov Nov 26, 2019
f2d2918
Add empty line in Azure config
Vyacheslav-Smirnov Nov 26, 2019
33cf163
Add decorators skip_numba_jit and skip_sdc_jit
PokhodenkoSA Nov 26, 2019
9148b8e
Add methods numba_jit() and sdc_jit(). Use one in method jit() accord…
PokhodenkoSA Nov 26, 2019
da5cf25
Remove TestSeriesNumba
PokhodenkoSA Nov 26, 2019
fd1b8e6
Skip tests using @skip_numba_jit
PokhodenkoSA Nov 26, 2019
5af18ca
Skip test_series_attr4 using @skip_numba_jit
PokhodenkoSA Nov 26, 2019
c461799
Skip tests using @skip_sdc_jit
PokhodenkoSA Nov 26, 2019
7d39561
Move skip_numba_jit() and skip_sdc_jit() to test_utils.py
PokhodenkoSA Nov 26, 2019
01fd00d
Create base class TestCase for all tests. Class has methods numba_jit…
PokhodenkoSA Nov 26, 2019
e9729b2
Move TestCase to test_utils.py
PokhodenkoSA Nov 26, 2019
cbefb4c
Make test_utils.TestCase as base class for all tests
PokhodenkoSA Nov 26, 2019
0a7cdec
Skip tests in test_basic using @skip_numba_jit
PokhodenkoSA Nov 26, 2019
9a029b3
Skip tests in test_dataframe using @skip_numba_jit
PokhodenkoSA Nov 26, 2019
c44c371
Skip tests in test_date using @skip_numba_jit
PokhodenkoSA Nov 26, 2019
cb87139
Skip tests in test_groupby using @skip_numba_jit
PokhodenkoSA Nov 26, 2019
2066218
Skip tests in test_hiframes using @skip_numba_jit
PokhodenkoSA Nov 26, 2019
7403c65
Skip tests in test_hpat_jit using @skip_numba_jit
PokhodenkoSA Nov 26, 2019
084643e
Skip tests in test_io using @skip_numba_jit
PokhodenkoSA Nov 26, 2019
a836a1f
Skip tests in test_join using @skip_numba_jit
PokhodenkoSA Nov 26, 2019
a983e60
Skip tests in test_ml using @skip_numba_jit
PokhodenkoSA Nov 26, 2019
b60774d
Skip tests in test_rolling using @skip_numba_jit
PokhodenkoSA Nov 26, 2019
c5004bc
Skip tests in test_strings using @skip_numba_jit
PokhodenkoSA Nov 26, 2019
e7851df
Merge remote-tracking branch 'vsm/switch_tests_to_new_pipeline' into …
PokhodenkoSA Nov 27, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,9 @@ env:
- NUMPY_VER=1.16
- CONDA_PREFIX_PATH=$HOME/miniconda3
matrix:
- BUILD_MODE=package TEST_MODE=conda RUN_COVERAGE=False SDC_NP_MPI=1
- BUILD_MODE=develop TEST_MODE=develop RUN_COVERAGE=True
- BUILD_MODE=package TEST_MODE=conda RUN_COVERAGE=False SDC_CONFIG_PIPELINE_SDC=True
- BUILD_MODE=package TEST_MODE=conda RUN_COVERAGE=False SDC_CONFIG_PIPELINE_SDC=True SDC_NP_MPI=1
- BUILD_MODE=develop TEST_MODE=develop RUN_COVERAGE=True SDC_CONFIG_PIPELINE_SDC=True

before_install:
- chmod 777 buildscripts/install_conda.sh
Expand Down
8 changes: 7 additions & 1 deletion azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ jobs:
PYTHON_VER: '3.7'
NUMPY_VER: '1.16'
USE_NUMBA_MASTER: 'False'
SDC_CONFIG_PIPELINE_SDC: 'False'

- template: buildscripts/azure/template-linux-macos.yml
parameters:
Expand All @@ -20,6 +21,7 @@ jobs:
PYTHON_VER: '3.7'
NUMPY_VER: '1.16'
USE_NUMBA_MASTER: 'False'
SDC_CONFIG_PIPELINE_SDC: 'False'

- template: buildscripts/azure/template-linux-macos.yml
parameters:
Expand All @@ -31,6 +33,7 @@ jobs:
PYTHON_VER: '3.7'
NUMPY_VER: '1.16'
USE_NUMBA_MASTER: 'False'
SDC_CONFIG_PIPELINE_SDC: 'False'

- template: buildscripts/azure/template-windows.yml
parameters:
Expand All @@ -42,6 +45,7 @@ jobs:
PYTHON_VER: '3.7'
NUMPY_VER: '1.16'
USE_NUMBA_MASTER: 'True'
SDC_CONFIG_PIPELINE_SDC: 'False'

- template: buildscripts/azure/template-linux-macos.yml
parameters:
Expand All @@ -53,6 +57,7 @@ jobs:
PYTHON_VER: '3.7'
NUMPY_VER: '1.16'
USE_NUMBA_MASTER: 'True'
SDC_CONFIG_PIPELINE_SDC: 'False'

- template: buildscripts/azure/template-linux-macos.yml
parameters:
Expand All @@ -63,4 +68,5 @@ jobs:
py3.7_numpy1.16:
PYTHON_VER: '3.7'
NUMPY_VER: '1.16'
USE_NUMBA_MASTER: 'True'
USE_NUMBA_MASTER: 'True'
SDC_CONFIG_PIPELINE_SDC: 'False'
2 changes: 1 addition & 1 deletion buildscripts/azure/template-linux-macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:

- script: |
if [ "$USE_NUMBA_MASTER" == "False" ]; then
$HOME/miniconda3/bin/python buildscripts/build.py --build-mode=package --python=$PYTHON_VER --numpy=$NUMPY_VER --conda-prefix=$HOME/miniconda3;
$HOME/miniconda3/bin/python buildscripts/build.py --build-mode=package --python=$PYTHON_VER --numpy=$NUMPY_VER --skip-smoke-tests --conda-prefix=$HOME/miniconda3;
else
$HOME/miniconda3/bin/python buildscripts/build.py --build-mode=package --python=$PYTHON_VER --numpy=$NUMPY_VER --use-numba-master --conda-prefix=$HOME/miniconda3;
fi
Expand Down
2 changes: 1 addition & 1 deletion buildscripts/azure/template-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:

- script: |
IF "%USE_NUMBA_MASTER%" == "False" (
"C:\\Miniconda\\python.exe" buildscripts\\build.py --build-mode=package --python=%PYTHON_VER% --numpy=%NUMPY_VER% --conda-prefix="C:\\Miniconda"
"C:\\Miniconda\\python.exe" buildscripts\\build.py --build-mode=package --python=%PYTHON_VER% --numpy=%NUMPY_VER% --skip-smoke-tests --conda-prefix="C:\\Miniconda"
) ELSE (
"C:\\Miniconda\\python.exe" buildscripts\\build.py --build-mode=package --python=%PYTHON_VER% --numpy=%NUMPY_VER% --use-numba-master --conda-prefix="C:\\Miniconda")
displayName: 'Build conda and wheel packages'
Expand Down
10 changes: 8 additions & 2 deletions sdc/tests/test_basic.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@
import sdc
from sdc.tests.test_utils import (count_array_REPs, count_parfor_REPs,
count_parfor_OneDs, count_array_OneDs, count_array_OneD_Vars,
dist_IR_contains, get_rank, get_start_end, check_numba_version)
dist_IR_contains, get_rank, get_start_end, check_numba_version,
skip_numba_jit, TestCase)


def get_np_state_ptr():
Expand All @@ -54,7 +55,7 @@ def _copy_py_state(r, ptr):
return ints, index


class BaseTest(unittest.TestCase):
class BaseTest(TestCase):

def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
Expand Down Expand Up @@ -214,6 +215,7 @@ def f():
hpat_f = sdc.jit(f)
hpat_f()

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

@skip_numba_jit
def test_reduce2(self):
import sys
dtypes = ['float32', 'float64', 'int32', 'int64']
Expand Down Expand Up @@ -277,6 +280,7 @@ def test_reduce2(self):
self.assertEqual(count_array_REPs(), 0)
self.assertEqual(count_parfor_REPs(), 0)

@skip_numba_jit
def test_reduce_filter1(self):
import sys
dtypes = ['float32', 'float64', 'int32', 'int64']
Expand Down Expand Up @@ -306,6 +310,7 @@ def test_reduce_filter1(self):
self.assertEqual(count_array_REPs(), 0)
self.assertEqual(count_parfor_REPs(), 0)

@skip_numba_jit
def test_array_reduce(self):
binops = ['+=', '*=', '+=', '*=', '|=', '|=']
dtypes = ['np.float32', 'np.float32', 'np.float64', 'np.float64', 'np.int32', 'np.int64']
Expand Down Expand Up @@ -365,6 +370,7 @@ def test_impl(N):
self.assertEqual(count_array_OneDs(), 2)
self.assertEqual(count_parfor_OneDs(), 2)

@skip_numba_jit
def test_dist_input(self):
def test_impl(A):
return len(A)
Expand Down
5 changes: 3 additions & 2 deletions sdc/tests/test_d4p.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,10 @@
from sdc.tests.test_utils import (count_array_REPs, count_parfor_REPs,
count_parfor_OneDs, count_array_OneDs,
count_parfor_OneD_Vars, count_array_OneD_Vars,
dist_IR_contains)
dist_IR_contains,
TestCase)

class TestD4P(unittest.TestCase):
class TestD4P(TestCase):
def test_logistic_regression(self):
'''
Testing logistic regression including
Expand Down
33 changes: 31 additions & 2 deletions sdc/tests/test_dataframe.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@
import numba
import sdc
from sdc.tests.test_utils import (count_array_REPs, count_parfor_REPs, count_parfor_OneDs,
count_array_OneDs, dist_IR_contains, get_start_end, check_numba_version)
count_array_OneDs, dist_IR_contains, get_start_end, check_numba_version,
skip_numba_jit, TestCase)

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


class TestDataFrame(unittest.TestCase):
class TestDataFrame(TestCase):

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

@skip_numba_jit
def test_box_categorical(self):
def test_impl(df):
df['A'] = df['A'] + 1
Expand Down Expand Up @@ -201,6 +203,7 @@ def test_impl(n):
self.assertEqual(count_array_REPs(), 0)
self.assertEqual(count_parfor_REPs(), 0)

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

@skip_numba_jit
def test_filter1(self):
def test_impl(n):
df = pd.DataFrame({'A': np.arange(n) + n, 'B': np.arange(n)**2})
Expand All @@ -236,6 +240,7 @@ def test_impl(n):
self.assertEqual(count_array_REPs(), 0)
self.assertEqual(count_parfor_REPs(), 0)

@skip_numba_jit
def test_filter2(self):
def test_impl(n):
df = pd.DataFrame({'A': np.arange(n) + n, 'B': np.arange(n)**2})
Expand All @@ -248,6 +253,7 @@ def test_impl(n):
self.assertEqual(count_array_REPs(), 0)
self.assertEqual(count_parfor_REPs(), 0)

@skip_numba_jit
def test_filter3(self):
def test_impl(n):
df = pd.DataFrame({'A': np.arange(n) + n, 'B': np.arange(n)**2})
Expand All @@ -260,6 +266,7 @@ def test_impl(n):
self.assertEqual(count_array_REPs(), 0)
self.assertEqual(count_parfor_REPs(), 0)

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

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

@skip_numba_jit
def test_set_column_bool1(self):
def test_impl(df):
df['C'] = df['A'][df['B']]
Expand Down Expand Up @@ -489,6 +498,7 @@ def test_impl(n):
self.assertEqual(count_array_REPs(), 0)
self.assertEqual(count_parfor_REPs(), 0)

@skip_numba_jit
def test_df_apply(self):
def test_impl(n):
df = pd.DataFrame({'A': np.arange(n), 'B': np.arange(n)})
Expand All @@ -499,6 +509,7 @@ def test_impl(n):
hpat_func = sdc.jit(test_impl)
np.testing.assert_almost_equal(hpat_func(n), test_impl(n))

@skip_numba_jit
def test_df_apply_branch(self):
def test_impl(n):
df = pd.DataFrame({'A': np.arange(n), 'B': np.arange(n)})
Expand All @@ -523,6 +534,7 @@ def test_impl(n):
self.assertEqual(count_array_REPs(), 0)
self.assertEqual(count_parfor_REPs(), 0)

@skip_numba_jit
def test_sort_values(self):
def test_impl(df):
df.sort_values('A', inplace=True)
Expand All @@ -534,6 +546,7 @@ def test_impl(df):
hpat_func = sdc.jit(test_impl)
np.testing.assert_almost_equal(hpat_func(df.copy()), test_impl(df))

@skip_numba_jit
def test_sort_values_copy(self):
def test_impl(df):
df2 = df.sort_values('A')
Expand All @@ -545,6 +558,7 @@ def test_impl(df):
hpat_func = sdc.jit(test_impl)
np.testing.assert_almost_equal(hpat_func(df.copy()), test_impl(df))

@skip_numba_jit
def test_sort_values_single_col(self):
def test_impl(df):
df.sort_values('A', inplace=True)
Expand All @@ -556,6 +570,7 @@ def test_impl(df):
hpat_func = sdc.jit(test_impl)
np.testing.assert_almost_equal(hpat_func(df.copy()), test_impl(df))

@skip_numba_jit
def test_sort_values_single_col_str(self):
def test_impl(df):
df.sort_values('A', inplace=True)
Expand All @@ -573,6 +588,7 @@ def test_impl(df):
hpat_func = sdc.jit(test_impl)
self.assertTrue((hpat_func(df.copy()) == test_impl(df)).all())

@skip_numba_jit
def test_sort_values_str(self):
def test_impl(df):
df.sort_values('A', inplace=True)
Expand All @@ -596,6 +612,7 @@ def test_impl(df):
hpat_func = sdc.jit(test_impl)
self.assertTrue((hpat_func(df) == sorted_df.B.values).all())

@skip_numba_jit
def test_sort_parallel_single_col(self):
# create `kde.parquet` file
ParquetGenerator.gen_kde_pq()
Expand Down Expand Up @@ -671,6 +688,7 @@ def test_impl(df):
})
pd.testing.assert_frame_equal(hpat_func(df), test_impl(df))

@skip_numba_jit
def test_sort_parallel(self):
# create `kde.parquet` file
ParquetGenerator.gen_kde_pq()
Expand Down Expand Up @@ -730,6 +748,7 @@ def test_impl(n):
n = 11
self.assertEqual(hpat_func(n), test_impl(n))

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

@skip_numba_jit
def test_pct_change1(self):
def test_impl(n):
df = pd.DataFrame({'A': np.arange(n) + 1.0, 'B': np.arange(n) + 1})
Expand Down Expand Up @@ -909,6 +929,7 @@ def test_impl():
hpat_func = sdc.jit(test_impl)
pd.testing.assert_frame_equal(hpat_func(), test_impl())

@skip_numba_jit
def test_df_dropna1(self):
def test_impl(df):
return df.dropna()
Expand All @@ -919,6 +940,7 @@ def test_impl(df):
h_out = hpat_func(df)
pd.testing.assert_frame_equal(out, h_out)

@skip_numba_jit
def test_df_dropna2(self):
def test_impl(df):
return df.dropna()
Expand All @@ -929,6 +951,7 @@ def test_impl(df):
h_out = hpat_func(df)
pd.testing.assert_frame_equal(out, h_out)

@skip_numba_jit
def test_df_dropna_inplace1(self):
# TODO: fix error when no df is returned
def test_impl(df):
Expand All @@ -942,6 +965,7 @@ def test_impl(df):
h_out = hpat_func(df2)
pd.testing.assert_frame_equal(out, h_out)

@skip_numba_jit
def test_df_dropna_str1(self):
def test_impl(df):
return df.dropna()
Expand All @@ -952,6 +976,7 @@ def test_impl(df):
h_out = hpat_func(df)
pd.testing.assert_frame_equal(out, h_out)

@skip_numba_jit
def test_df_drop1(self):
def test_impl(df):
return df.drop(columns=['A'])
Expand All @@ -960,6 +985,7 @@ def test_impl(df):
hpat_func = sdc.jit(test_impl)
pd.testing.assert_frame_equal(hpat_func(df), test_impl(df))

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

@skip_numba_jit
def test_append1(self):
def test_impl(df, df2):
return df.append(df2, ignore_index=True)
Expand All @@ -1025,6 +1052,7 @@ def test_impl(df, df2):
df2.A[n // 2:] = n
pd.testing.assert_frame_equal(hpat_func(df, df2), test_impl(df, df2))

@skip_numba_jit
def test_append2(self):
def test_impl(df, df2, df3):
return df.append([df2, df3], ignore_index=True)
Expand All @@ -1038,6 +1066,7 @@ def test_impl(df, df2, df3):
pd.testing.assert_frame_equal(
hpat_func(df, df2, df3), test_impl(df, df2, df3))

@skip_numba_jit
def test_concat_columns1(self):
def test_impl(S1, S2):
return pd.concat([S1, S2], axis=1)
Expand Down
Loading