You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I mentioned last week that I noted some small errors I ran into the FuturesExecutor. I was able to patch most of them when running my experiments, so I'd be happy to spend some time today/tomorrow on a PR. I'm not quite sure about (2) though, as it's an error in the Manager and maybe unrelated to the FuturesExecutor.
Exceptions are not raised by Future.result() nor is Future.exception() set.
Traceback (most recent call last):
File "/Users/jgpaul/workspace/cctools/scratch/done.py", line 9, in <module>
assert future.done()
^^^^^^^^^^^^^
File "/Users/jgpaul/miniconda3/envs/cctools-build/lib/python3.12/site-packages/ndcctools/taskvine/futures.py", line 258, in done
state = self._task._module_manager.task_state(self._task.id)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/jgpaul/miniconda3/envs/cctools-build/lib/python3.12/site-packages/ndcctools/taskvine/manager.py", line 393, in task_state
return cvine.vine_task_state(self._taskvine, task_id)
^^^^^^^^^^^^^^^^^^^^^
AttributeError: module 'ndcctools.taskvine.cvine' has no attribute 'vine_task_state'. Did you mean: 'vine_task_create'?
Future.result(timeout=TIMEOUT) returns 'result_pending' instead of raising TimeoutError.
fromndcctools.taskvineimportFuturesExecutorfromndcctools.taskvine.futuresimportas_completeddeftimeout() ->None:
importtimetime.sleep(60)
withFuturesExecutor(manager_name='done-example') asexecutor:
future=executor.submit(timeout)
try:
# This returns "result_pending" instead of raising TimeoutError.future.result(timeout=1)
exceptTimeoutError:
passelse:
raiseRuntimeError('result() did not raise TimeoutError')
TimeoutErrors are not correctly raised by as_completed().
Rather, as_completed() returns the class TimeoutError.
I mentioned last week that I noted some small errors I ran into the
FuturesExecutor
. I was able to patch most of them when running my experiments, so I'd be happy to spend some time today/tomorrow on a PR. I'm not quite sure about (2) though, as it's an error in theManager
and maybe unrelated to theFuturesExecutor
.Future.result()
nor isFuture.exception()
set.Future.done()
does not work.Future.result(timeout=TIMEOUT)
returns'result_pending'
instead of raisingTimeoutError
.TimeoutError
s are not correctly raised byas_completed()
.Rather,
as_completed()
returns the classTimeoutError
.Future.result()
of aFutureFunctionCall
returns the string traceback instead of raising the exception from the task.The text was updated successfully, but these errors were encountered: