Skip to content

Commit

Permalink
fix test_pipeline_fit_time_constraint (#633)
Browse files Browse the repository at this point in the history
Fixed occasional test error when computational time of pipeline with higher time constraint was lower than computational time with less time constraint
Time constraint affects fit time, but fit time also fluctuates because of internal hardware reasons. The dispersion of this fluctuation seems to be constant. Therefore, if fit process is optimized, the fit time of both time constraint values in test is reduced, but dispersion remains the same. This raises the probability of dispersions' overlay and, hence, the test fail. Change of timeouts to 1 and 5 seconds provides stable work of test
  • Loading branch information
andreygetmanov authored Apr 11, 2022
1 parent 2209d02 commit 96eb8a9
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions test/unit/pipelines/test_pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -391,8 +391,7 @@ def test_pipeline_fit_time_constraint(data_fixture, request):
computation_time_first = test_pipeline_first.computation_time
assert type(received_ex) is TimeoutError
comp_time_proc_with_first_constraint = (time.time() - process_start_time)
time_constraint = datetime.timedelta(seconds=2)
test_pipeline_first.unfit(unfit_preprocessor=True)
time_constraint = datetime.timedelta(seconds=5)
process_start_time = time.time()

try:
Expand Down

0 comments on commit 96eb8a9

Please sign in to comment.