Closed ahaselsteiner closed 6 years ago
I will write a function, which roughly approximates the required computing time to calculate an environmental contour. If it would be too long, the user is not allowed to perform the calculation if RUN_MODE is online-dev or production (in local-dev there is no limit).
A similar approach should be applied to too much computing time required for fitting, see #138
@janlehmk As discussed your idea of using the multiprocessing timeout method sounds great. Go ahead and try to implementing it.
Consequently, I will not write the function, which approximates computing time.
I am implementing a function so estimate the required computing time nevertheless. In case the timeout method works we do not need to use it.
@kawindme @ahaselsteiner I created a pull request in the Viroconcom repository for this issue. The timeout can be defined as parameter by creating a Fit/Contour -object. The default value for this parameter is '1e6' the highest possible value on Windows systems.
@janlehmk Thanks. @kawindme had a look at it. Although he does not like the changes, which were necessary, too much, he does not have a better idea, so we go with this solution. I will implement to catch the TimeOutError you are reaising in viroconweb properly and will then merge your viroconcom pull request.
Impemented for fit:
And for the contour:
Done and merged into master.
I'm submitting a ...
Expected behavior
How should it work (with the bug fixed or the feature implemented)? Users should not be allowed to perform calculations which cause a time out. In case a timeout occurs the user should be preseneted with an appropriate error message.
Screenshot
Actual behavior
How does it currently work (with the bug causing problems or without the feature)? Timeouts can occur and the user does get the information "application error".
Screenshot Probabilistic model:
HDC setting:
Error:
Steps to reproduce the problem (how to see the actual behavior)