thouska / spotpy

A Statistical Parameter Optimization Tool
https://spotpy.readthedocs.io/en/latest/
MIT License
248 stars 150 forks source link

avoids spawning of timeout thread if no timeout set #254

Closed wookietreiber closed 4 years ago

wookietreiber commented 4 years ago

fixes #253

coveralls commented 4 years ago

Pull Request Test Coverage Report for Build 856


Files with Coverage Reduction New Missed Lines %
spotpy/algorithms/fscabc.py 1 80.43%
spotpy/algorithms/rope.py 1 93.58%
<!-- Total: 2 -->
Totals Coverage Status
Change from base Build 851: -0.04%
Covered Lines: 4136
Relevant Lines: 4608

💛 - Coveralls
wookietreiber commented 4 years ago

@thouska What are your recommendations regarding the coverage diff?

thouska commented 4 years ago

Great thank you! As the issue is arrising with single-core usage, how about checking for that with if not parallel == 'seq': instaead of if self.sim_timeout:?

wookietreiber commented 4 years ago

@thouska The overhead is not just with single-core usage. Generally, if you don't have/need/want a timeout, you should not need to pay the overhead cost of the extra thread and the logistics around it.

thouska commented 4 years ago

Ok, you are right, than we leave it like that and check for the timeout. And never mind the coverage, it varies from time to time because i have’nt set a random seed. Therefor some algorithms behave differently from one test to the other. Your contribution will be available on pypi in spotpy version >=1.5.11 (propably published today, if not tomorrow).

wookietreiber commented 4 years ago

Alright, thanks for the quick response!