-
Notifications
You must be signed in to change notification settings - Fork 61
Change tests execution #111
Change tests execution #111
Conversation
Merge changes from origin repo
Remove spark dependency from HPA; use pre-generated sdf_dt.pq
* HPAT Build: Code style check for C and Python sources * PR103. Comments partially addressed
…n#99) Problem description: merge_overload and merge_asof_overload functions use 'on' argument value to compute 'left_on' and 'right_on' arguments in a way that breaks type stability, causing compilation failure when 'on' is assigned a StringLiteral value. Error: File "../hpat/hiframes/dataframe_pass.py", line 202, in _run_assign return self._run_call(assign, lhs, rhs) File "../hpat/hiframes/dataframe_pass.py", line 522, in _run_call return self._run_call_join(assign, lhs, rhs) File "../hpat/hiframes/dataframe_pass.py", line 1488, in _run_call_join left_on = self._get_const_or_list(left_on_var) File "../hpat/hiframes/dataframe_pass.py", line 2135, in _get_const_or_list raise ValueError(err_msg) ValueError: Failed in hpat mode pipeline (step: typed dataframe pass) None Following tests should be fixed with this commit: test_join_cat1 (hpat.tests.test_join.TestJoin) test_join_cat2 (hpat.tests.test_join.TestJoin) test_join_cat_parallel1 (hpat.tests.test_join.TestJoin) test_join_datetime_seq1 (hpat.tests.test_join.TestJoin) test_join_left_seq1 (hpat.tests.test_join.TestJoin) test_join_left_seq2 (hpat.tests.test_join.TestJoin) test_join_outer_seq1 (hpat.tests.test_join.TestJoin) test_join_right_seq1 (hpat.tests.test_join.TestJoin) test_merge_asof_seq1 (hpat.tests.test_join.TestJoin)
…eries.py' (IntelPython#97) * pep8 style for 'test_strings.py'; flake8 check successful * pep8 style for 'test_utils.py' * pep8 style for 'test_series.py'; more readable * fixed 'test_string_series' * removed extra white spaces * deleted mention of flake8 * trigger build
* code_style_change_part_2
Actually test suite should be executed via hpat.runtests: python -u -m hpat.runtests -v This resolve the issue with doulbe test suite execution which occurs due to the "python -u -m unittest -v" command import all files in tree including runtests.py and runtests.py triggers 1-st suite execution. Then unittest triggers 2-d. Add decorator to execute some tests (mostly parallel) 2 or more times (depending on existance of REPEAT_TEST_NUMBER environment variable) This should highlight issues like the test fails if executed twice because is corrupts memory during first execution (like test_series_head_index_parallel1) Skip test_series_head_index_parallel1 because it triggers memory corruption. This should be fixed.
This reverts commit dfc54ee.
This reverts commit 4070ce3.
This reverts commit abf5bd0.
This reverts commit 9076493.
… 'test_series.py' (IntelPython#97)" This reverts commit 8641f7a.
…telPython#99)" This reverts commit a2a8ee5.
This reverts commit 551c0e3.
This reverts commit 6dae0b3.
…ython#103)" This reverts commit 1a30e4f.
This reverts commit 34a2260.
This reverts commit 9e77fde.
Merge changes from origin repo
Merge changes from master
May be it is better to implement this in |
I just don't like the idea that all tests have to be decorated in the same manner. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Need to find a way to avoid decorator for each test but keep the functionality proposed
Ok, I think I can add parallel tests in suite twice or wrap them in decorator in test_load in runtests.py |
hpat/tests/tests_config.py
Outdated
'test_series_head_index_parallel1', | ||
'test_series_median_parallel1', | ||
'test_series_argsort_parallel', | ||
'test_series_sort_values_parallel1'] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add new line at the end of the file
hpat/runtests.py
Outdated
for i in range(len(hpat_tests._tests)): | ||
for j in range(len(hpat_tests._tests[i]._tests)): | ||
if hpat_tests._tests[i]._tests[j].id().split('.')[-1] in tests_to_repeat: | ||
hpat_tests._tests[i]._tests[j] = repeat_test(hpat_tests._tests[i]._tests[j]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you still think we need a decorator for this? I'not sure but it looks like it could be done simpler (just by a loop).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here the load_tests function returns the suite to be executed by unittest.
So I can add the test to the list multiple times instead of decorator, or now I think that there is more right, but more complicated way - overload loadTestsFromModule unittest method to make it return desired test collection or something like that.
Right now I do not see the other way.
What do you think about it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think that "overload loadTestsFromModule unittest method" is a good way. We need simpler solution. Need to think.
@dmitrii-zagornyi any ideas?
Also, I don't think we need to have subset of the tests which can be run several times. I think we can implement an ability to control all tests execution times. No need to get a sub set of tests for this. |
My idea was to execute some of tests (for example only parallel due to there is a suspicion they can fails on the second time) but not whole tests. But looks like it is some tricky to implement) |
Execute every test specified times, which is set via the REPEAT_TEST_NUMBER environment variable. Skip test_series_list_str_unbox1 because is fails on the second launch with Segmentation fault
hpat/runtests.py
Outdated
hpat_tests._tests[i]._tests[j] = repeat_test(hpat_tests._tests[i]._tests[j]) | ||
repeat_test_number = 1 | ||
if 'REPEAT_TEST_NUMBER' in os.environ: | ||
repeat_test_number = os.environ['REPEAT_TEST_NUMBER'] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please, use HPAT_
prefix for external variables.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, it might be better to use https://github.com/IntelPython/hpat/blob/master/hpat/config.py#L45 approach? It has default value and throw exception if wrong parameter (non digit) provided.
Rename REPEAT_TEST_NUMBER to HPAT_REPEAT_TEST_NUMBER Use os.getenv to get value for HPAT_REPEAT_TEST_NUMBER
* Remove spark dependency (IntelPython#102) Remove spark dependency from HPA; use pre-generated sdf_dt.pq * explicitly adding data-file (IntelPython#104) * HPAT Build: Code style check for C and Python sources (IntelPython#103) * HPAT Build: Code style check for C and Python sources * PR103. Comments partially addressed * Code style change part 1 (IntelPython#106) * Style check config fo pystyle (IntelPython#105) * Fix for pandas.merge wrong overload handling of 'on' args (IntelPython#99) Problem description: merge_overload and merge_asof_overload functions use 'on' argument value to compute 'left_on' and 'right_on' arguments in a way that breaks type stability, causing compilation failure when 'on' is assigned a StringLiteral value. Error: File "../hpat/hiframes/dataframe_pass.py", line 202, in _run_assign return self._run_call(assign, lhs, rhs) File "../hpat/hiframes/dataframe_pass.py", line 522, in _run_call return self._run_call_join(assign, lhs, rhs) File "../hpat/hiframes/dataframe_pass.py", line 1488, in _run_call_join left_on = self._get_const_or_list(left_on_var) File "../hpat/hiframes/dataframe_pass.py", line 2135, in _get_const_or_list raise ValueError(err_msg) ValueError: Failed in hpat mode pipeline (step: typed dataframe pass) None Following tests should be fixed with this commit: test_join_cat1 (hpat.tests.test_join.TestJoin) test_join_cat2 (hpat.tests.test_join.TestJoin) test_join_cat_parallel1 (hpat.tests.test_join.TestJoin) test_join_datetime_seq1 (hpat.tests.test_join.TestJoin) test_join_left_seq1 (hpat.tests.test_join.TestJoin) test_join_left_seq2 (hpat.tests.test_join.TestJoin) test_join_outer_seq1 (hpat.tests.test_join.TestJoin) test_join_right_seq1 (hpat.tests.test_join.TestJoin) test_merge_asof_seq1 (hpat.tests.test_join.TestJoin) * [STL] PEP8 code style for 'test_strings.py', 'test_utils.py', 'test_series.py' (IntelPython#97) * pep8 style for 'test_strings.py'; flake8 check successful * pep8 style for 'test_utils.py' * pep8 style for 'test_series.py'; more readable * fixed 'test_string_series' * removed extra white spaces * deleted mention of flake8 * trigger build * Code style change part 2 (IntelPython#107) * code_style_change_part_2 * Add more check in style configuration (IntelPython#108) * code_style_part_3 (IntelPython#109) * Fix boost runtime issue on Ubuntu16.04 with gcc 5.4 (IntelPython#92) * Code style change part 4 (IntelPython#110) * Cahnge tests execution Actually test suite should be executed via hpat.runtests: python -u -m hpat.runtests -v This resolve the issue with doulbe test suite execution which occurs due to the "python -u -m unittest -v" command import all files in tree including runtests.py and runtests.py triggers 1-st suite execution. Then unittest triggers 2-d. Add decorator to execute some tests (mostly parallel) 2 or more times (depending on existance of REPEAT_TEST_NUMBER environment variable) This should highlight issues like the test fails if executed twice because is corrupts memory during first execution (like test_series_head_index_parallel1) Skip test_series_head_index_parallel1 because it triggers memory corruption. This should be fixed. * Revert "Code style change part 4 (IntelPython#110)" This reverts commit dfc54ee. * Revert "Fix boost runtime issue on Ubuntu16.04 with gcc 5.4 (IntelPython#92)" This reverts commit 231a76c. * Revert "code_style_part_3 (IntelPython#109)" This reverts commit 4070ce3. * Revert "Add more check in style configuration (IntelPython#108)" This reverts commit abf5bd0. * Revert "Code style change part 2 (IntelPython#107)" This reverts commit 9076493. * Revert "[STL] PEP8 code style for 'test_strings.py', 'test_utils.py', 'test_series.py' (IntelPython#97)" This reverts commit 8641f7a. * Revert "Fix for pandas.merge wrong overload handling of 'on' args (IntelPython#99)" This reverts commit a2a8ee5. * Revert "Style check config fo pystyle (IntelPython#105)" This reverts commit 551c0e3. * Revert "Code style change part 1 (IntelPython#106)" This reverts commit 6dae0b3. * Revert "HPAT Build: Code style check for C and Python sources (IntelPython#103)" This reverts commit 1a30e4f. * Revert "explicitly adding data-file (IntelPython#104)" This reverts commit 34a2260. * Revert "Remove spark dependency (IntelPython#102)" This reverts commit 9e77fde. * Wrap functions to be executed twice in runtests.py * Update runtests.py Execute every test specified times, which is set via the REPEAT_TEST_NUMBER environment variable. Skip test_series_list_str_unbox1 because is fails on the second launch with Segmentation fault * Apply comments from review Rename REPEAT_TEST_NUMBER to HPAT_REPEAT_TEST_NUMBER Use os.getenv to get value for HPAT_REPEAT_TEST_NUMBER
Actually test suite should be executed via hpat.runtests:
python -u -m hpat.runtests -v
This resolve the issue with doulbe test suite execution
which occurs due to the "python -u -m unittest -v" command
import all files in tree including runtests.py and runtests.py
triggers 1-st suite execution. Then unittest triggers 2-d.
Add decorator to execute some tests (mostly parallel)
2 or more times (depending on existance of REPEAT_TEST_NUMBER
environment variable)
This should highlight issues like the test fails if executed twice
because is corrupts memory during first execution
(like test_series_head_index_parallel1)
Skip test_series_head_index_parallel1 because it triggers memory
corruption. This should be fixed.