mars
mars copied to clipboard
[BUG] Ray executor raises ValueError: Tileable object must be executed first before fetch
Describe the bug A clear and concise description of what the bug is.
mars/learn/tests/test_wrappers.py:25 (test_parallel_post_fit_basic)
setup = <mars.deploy.oscar.session.SyncSession object at 0x295346820>
def test_parallel_post_fit_basic(setup):
raw_x, raw_y = make_classification(n_samples=1000)
X, y = mt.tensor(raw_x, chunk_size=100), mt.tensor(raw_y, chunk_size=100)
clf = ParallelPostFit(GradientBoostingClassifier())
> clf.fit(X, y)
mars/learn/tests/test_wrappers.py:30:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
mars/learn/wrappers.py:173: in fit
return self._make_fit("fit")(X, y=y, **kwargs)
mars/learn/wrappers.py:148: in _fit
mr.spawn(_wrap, args=(self.estimator, method, X, y), kwargs=kwargs)
mars/core/entity/executable.py:144: in execute
return execute(self, session=session, **kw)
mars/deploy/oscar/session.py:1888: in execute
return session.execute(
mars/deploy/oscar/session.py:1682: in execute
execution_info: ExecutionInfo = fut.result(
../../.pyenv/versions/3.8.13/lib/python3.8/concurrent/futures/_base.py:444: in result
return self.__get_result()
../../.pyenv/versions/3.8.13/lib/python3.8/concurrent/futures/_base.py:389: in __get_result
raise self._exception
mars/deploy/oscar/session.py:1868: in _execute
await execution_info
../../.pyenv/versions/3.8.13/lib/python3.8/asyncio/tasks.py:695: in _wrap_awaitable
return (yield from awaitable.__await__())
mars/deploy/oscar/session.py:105: in wait
return await self._aio_task
mars/deploy/oscar/session.py:953: in _run_in_background
raise task_result.error.with_traceback(task_result.traceback)
mars/services/task/supervisor/processor.py:372: in run
await self._process_stage_chunk_graph(*stage_args)
mars/services/task/supervisor/processor.py:250: in _process_stage_chunk_graph
chunk_to_result = await self._executor.execute_subtask_graph(
mars/services/task/execution/ray/executor.py:553: in execute_subtask_graph
meta_list = await asyncio.gather(*output_meta_object_refs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
awaitable = ObjectRef(359ec6ce30d3ca2dffffffffffffffffffffffff0100000001000000)
@types.coroutine
def _wrap_awaitable(awaitable):
"""Helper for asyncio.ensure_future().
Wraps awaitable (an object with __await__) into a coroutine
that will later be wrapped in a Task by ensure_future().
"""
> return (yield from awaitable.__await__())
E ray.exceptions.RayTaskError(ValueError): ray::execute_subtask() (pid=70399, ip=127.0.0.1)
E File "/home/admin/mars/mars/services/task/execution/ray/executor.py", line 187, in execute_subtask
E execute(context, chunk.op)
E File "/home/admin/mars/mars/core/operand/core.py", line 491, in execute
E result = executor(results, op)
E File "/home/admin/mars/mars/core/custom_log.py", line 94, in wrap
E return func(cls, ctx, op)
E File "/home/admin/mars/mars/utils.py", line 1160, in wrapped
E return func(cls, ctx, op)
E File "/home/admin/mars/mars/remote/core.py", line 154, in execute
E result = function(*function_args, **function_kwargs)
E File "/home/admin/mars/mars/learn/wrappers.py", line 34, in _wrap
E X = X.fetch() if isinstance(X, ENTITY_TYPE) else X
E File "/home/admin/mars/mars/core/entity/executable.py", line 164, in fetch
E return self._fetch(session=session, **kw)
E File "/home/admin/mars/mars/core/entity/executable.py", line 160, in _fetch
E self._check_session(session, "fetch")
E File "/home/admin/mars/mars/core/entity/executable.py", line 152, in _check_session
E raise ValueError(
E ValueError: Tileable object f3164084e1a24b42818a147a8ccc7be5_0 must be executed first before fetch
../../.pyenv/versions/3.8.13/lib/python3.8/asyncio/tasks.py:695: RayTaskError(ValueError)
To Reproduce To help us reproducing this bug, please provide information below:
- Your Python version
- The version of Mars you use
- Versions of crucial packages, such as numpy, scipy and pandas
- Full stack of the error.
- Minimized code to reproduce the error.
Expected behavior A clear and concise description of what you expected to happen.
Additional context Add any other context about the problem here.