Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exception handling or time out needed in the parallel mode #40

Open
krzysztofarendt opened this issue Feb 9, 2021 · 0 comments
Open
Labels
bug Something isn't working enhancement New feature or request

Comments

@krzysztofarendt
Copy link
Owner

When an exception happens in one of the threads, the main process waits indefinitely for its result. A timeout or exception handling should be implemented.

An example from one of the users of ModestPy:

Traceback (most recent call last):

  File "C:\Users\lucjsar\Documents\ModestPy\lucile_GBM_max_flows.py", line 151, in <module>
    estimates = session.estimate()

  File "C:\Users\lucjsar\Documents\ModestPy\modestpy\estimation.py", line 289, in estimate
    m_estimates = m_inst.estimate()

  File "C:\Users\lucjsar\Documents\ModestPy\modestpy\estim\ga_parallel\ga_parallel.py", line 315, in estimate
    workers=self.workers)

  File "C:\Users\lucjsar\AppData\Local\Continuum\anaconda3\lib\site-packages\modestga\ga.py", line 257, in minimize
    if pipes[i].poll(0.001):

  File "C:\Users\lucjsar\AppData\Local\Continuum\anaconda3\lib\multiprocessing\connection.py", line 257, in poll
    return self._poll(timeout)

 File "C:\Users\lucjsar\AppData\Local\Continuum\anaconda3\lib\multiprocessing\connection.py", line 330, in _poll
    return bool(wait([self], timeout))

  File "C:\Users\lucjsar\AppData\Local\Continuum\anaconda3\lib\multiprocessing\connection.py", line 868, in wait
    ready_handles = _exhaustive_wait(waithandle_to_obj.keys(), timeout)

  File "C:\Users\lucjsar\AppData\Local\Continuum\anaconda3\lib\multiprocessing\connection.py", line 800, in _exhaustive_wait
    res = _winapi.WaitForMultipleObjects(L, False, timeout)
@krzysztofarendt krzysztofarendt added bug Something isn't working enhancement New feature or request labels Feb 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant