after_merge stringlengths 28 79.6k | before_merge stringlengths 20 79.6k | url stringlengths 38 71 | full_traceback stringlengths 43 922k | traceback_type stringclasses 555
values |
|---|---|---|---|---|
def decide_dataframe_chunk_sizes(shape, chunk_size, memory_usage):
"""
Decide how a given DataFrame can be split into chunk.
:param shape: DataFrame's shape
:param chunk_size: if dict provided, it's dimension id to chunk size;
if provided, it's the chunk size for each dimension.
... | def decide_dataframe_chunk_sizes(shape, chunk_size, memory_usage):
"""
Decide how a given DataFrame can be split into chunk.
:param shape: DataFrame's shape
:param chunk_size: if dict provided, it's dimension id to chunk size;
if provided, it's the chunk size for each dimension.
... | https://github.com/mars-project/mars/issues/2018 | In [52]: df = md.DataFrame(index=[1, 2, 3])
In [53]: df['a'] = md.Series(['a', 'b', 'c'], index=[2, 3, 4])
---------------------------------------------------------------------------
NotImplementedError Traceback (most recent call last)
<ipython-input-53-f550a59ef82c> in <module>
----> 1 df['a'] ... | NotImplementedError |
def tile(cls, op):
from ..indexing.slice import TensorSlice
check_chunks_unknown_shape(op.inputs, TilesError)
if len(set([inp.shape for inp in op.inputs])) != 1:
# check shape again when input has unknown shape
raise ValueError("all input tensors must have the same shape")
inputs = un... | def tile(cls, op):
from ..indexing.slice import TensorSlice
inputs = unify_chunks(*op.inputs)
output = op.outputs[0]
axis = op.axis
output_nsplits = (
inputs[0].nsplits[:axis] + ((1,) * len(inputs),) + inputs[0].nsplits[axis:]
)
output_idxes = itertools.product(*[range(len(nsplit))... | https://github.com/mars-project/mars/issues/2018 | In [52]: df = md.DataFrame(index=[1, 2, 3])
In [53]: df['a'] = md.Series(['a', 'b', 'c'], index=[2, 3, 4])
---------------------------------------------------------------------------
NotImplementedError Traceback (most recent call last)
<ipython-input-53-f550a59ef82c> in <module>
----> 1 df['a'] ... | NotImplementedError |
def stack(tensors, axis=0, out=None):
"""
Join a sequence of tensors along a new axis.
The `axis` parameter specifies the index of the new axis in the dimensions
of the result. For example, if ``axis=0`` it will be the first dimension
and if ``axis=-1`` it will be the last dimension.
Parameter... | def stack(tensors, axis=0, out=None):
"""
Join a sequence of tensors along a new axis.
The `axis` parameter specifies the index of the new axis in the dimensions
of the result. For example, if ``axis=0`` it will be the first dimension
and if ``axis=-1`` it will be the last dimension.
Parameter... | https://github.com/mars-project/mars/issues/2018 | In [52]: df = md.DataFrame(index=[1, 2, 3])
In [53]: df['a'] = md.Series(['a', 'b', 'c'], index=[2, 3, 4])
---------------------------------------------------------------------------
NotImplementedError Traceback (most recent call last)
<ipython-input-53-f550a59ef82c> in <module>
----> 1 df['a'] ... | NotImplementedError |
def __call__(self, a, bins, range, weights):
if range is not None:
_check_range(range)
if isinstance(bins, str):
# string, 'auto', 'stone', ...
# shape is unknown
bin_name = bins
# if `bins` is a string for an automatic method,
# this will replace it with the numb... | def __call__(self, a, bins, range, weights):
if range is not None:
_check_range(range)
if isinstance(bins, str):
# string, 'auto', 'stone', ...
# shape is unknown
bin_name = bins
# if `bins` is a string for an automatic method,
# this will replace it with the numb... | https://github.com/mars-project/mars/issues/1959 | Traceback (most recent call last):
File "/opt/conda/lib/python3.7/site-packages/requests/adapters.py", line 479, in send
r = low_conn.getresponse(buffering=True)
TypeError: getresponse() got an unexpected keyword argument 'buffering'
During handling of the above exception, another exception occurred:
Traceback (most ... | TypeError |
def tile(cls, op):
ctx = get_context()
range_ = op.range
if isinstance(op.bins, str):
check_chunks_unknown_shape([op.input], TilesError)
if op.input_min is not None:
# check if input min and max are calculated
min_max_chunk_keys = [inp.chunks[0].key for inp in (op.input_min, op.i... | def tile(cls, op):
ctx = get_context()
range_ = op.range
if isinstance(op.bins, str):
check_chunks_unknown_shape([op.input], TilesError)
if op.input_min is not None:
# check if input min and max are calculated
min_max_chunk_keys = [inp.chunks[0].key for inp in (op.input_min, op.i... | https://github.com/mars-project/mars/issues/1959 | Traceback (most recent call last):
File "/opt/conda/lib/python3.7/site-packages/requests/adapters.py", line 479, in send
r = low_conn.getresponse(buffering=True)
TypeError: getresponse() got an unexpected keyword argument 'buffering'
During handling of the above exception, another exception occurred:
Traceback (most ... | TypeError |
def calc(self, session_id, graph_key, ser_graph, chunk_targets, callback):
"""
Do actual calculation. This method should be called when all data
is available (i.e., either in shared cache or in memory)
:param session_id: session id
:param graph_key: key of executable graph
:param ser_graph: seri... | def calc(self, session_id, graph_key, ser_graph, chunk_targets, callback):
"""
Do actual calculation. This method should be called when all data
is available (i.e., either in shared cache or in memory)
:param session_id: session id
:param graph_key: key of executable graph
:param ser_graph: seri... | https://github.com/mars-project/mars/issues/1959 | Traceback (most recent call last):
File "/opt/conda/lib/python3.7/site-packages/requests/adapters.py", line 479, in send
r = low_conn.getresponse(buffering=True)
TypeError: getresponse() got an unexpected keyword argument 'buffering'
During handling of the above exception, another exception occurred:
Traceback (most ... | TypeError |
def _finalize(keys, exc_info):
if not self._marked_as_destroy:
self._dispatch_ref.register_free_slot(
self.uid, self._slot_name, _tell=True, _wait=False
)
if not exc_info:
self.tell_promise(callback, keys)
else:
try:
self.tell_promise(callback, *exc_i... | def _finalize(keys, exc_info):
if not self._marked_as_destroy:
self._dispatch_ref.register_free_slot(
self.uid, self._slot_name, _tell=True, _wait=False
)
if not exc_info:
self.tell_promise(callback, keys)
else:
self.tell_promise(callback, *exc_info, _accept=Fals... | https://github.com/mars-project/mars/issues/1959 | Traceback (most recent call last):
File "/opt/conda/lib/python3.7/site-packages/requests/adapters.py", line 479, in send
r = low_conn.getresponse(buffering=True)
TypeError: getresponse() got an unexpected keyword argument 'buffering'
During handling of the above exception, another exception occurred:
Traceback (most ... | TypeError |
def execute_agg(cls, ctx, op):
(input_chunk,), device_id, xp = as_same_device(
[ctx[c.key] for c in op.inputs], device=op.device, ret_extra=True
)
axis = cls.get_axis(op.axis)
func_name = getattr(cls, "_func_name", None)
reduce_func = getattr(xp, func_name)
out = op.outputs[0]
with d... | def execute_agg(cls, ctx, op):
(input_chunk,), device_id, xp = as_same_device(
[ctx[c.key] for c in op.inputs], device=op.device, ret_extra=True
)
axis = cls.get_axis(op.axis)
func_name = getattr(cls, "_func_name", None)
reduce_func = getattr(xp, func_name)
out = op.outputs[0]
with d... | https://github.com/mars-project/mars/issues/1977 | Traceback (most recent call last):
File "miniconda3/lib/python3.8/site-packages/IPython/core/interactiveshell.py", line 3417, in run_code
exec(code_obj, self.user_global_ns, self.user_ns)
File "<ipython-input-26-c79b5d2b7d19>", line 1, in <module>
histogram(vt).execute()
File "Code/mars/mars/core.py", line 764, in exec... | ValueError |
def execute(cls, ctx, op):
(a,), device_id, xp = as_same_device(
[ctx[c.key] for c in op.inputs], device=op.device, ret_extra=True
)
if len(a) == 0:
# when chunk is empty, return the empty chunk itself
ctx[op.outputs[0].key] = ctx[op.outputs[-1].key] = a
return
with dev... | def execute(cls, ctx, op):
(a,), device_id, xp = as_same_device(
[ctx[c.key] for c in op.inputs], device=op.device, ret_extra=True
)
with device(device_id):
n = op.n_partition
w = a.shape[op.axis] * 1.0 / (n + 1)
if not op.return_indices:
if op.kind is not None:
... | https://github.com/mars-project/mars/issues/1960 | In [59]: a = mt.random.randint(0, 2, size=(1000,), chunk_size=300)
In [60]: mt.sort(mt.sort(a)).execute()
---------------------------------------------------------------------------
IndexError Traceback (most recent call last)
<ipython-input-60-6c95dab88665> in <module>
----> 1 mt.sort(m... | IndexError |
def execute(cls, ctx, op):
inputs, device_id, xp = as_same_device(
[ctx[c.key] for c in op.inputs if len(ctx[c.key]) > 0],
device=op.device,
ret_extra=True,
)
with device(device_id):
a = xp.concatenate(inputs, axis=op.axis)
p = len(inputs)
assert a.shape[op.a... | def execute(cls, ctx, op):
inputs, device_id, xp = as_same_device(
[ctx[c.key] for c in op.inputs], device=op.device, ret_extra=True
)
with device(device_id):
a = xp.concatenate(inputs, axis=op.axis)
p = len(inputs)
assert a.shape[op.axis] == p**2
if op.kind is not ... | https://github.com/mars-project/mars/issues/1960 | In [59]: a = mt.random.randint(0, 2, size=(1000,), chunk_size=300)
In [60]: mt.sort(mt.sort(a)).execute()
---------------------------------------------------------------------------
IndexError Traceback (most recent call last)
<ipython-input-60-6c95dab88665> in <module>
----> 1 mt.sort(m... | IndexError |
def _check_response_finished(self, graph_url, timeout=None):
import requests
try:
resp = self._req_session.get(graph_url, params={"wait_timeout": timeout})
except requests.ConnectionError as ex:
err_msg = str(ex)
if (
"ConnectionResetError" in err_msg
or "Con... | def _check_response_finished(self, graph_url, timeout=None):
import requests
try:
resp = self._req_session.get(graph_url, params={"wait_timeout": timeout})
except requests.ConnectionError as ex:
err_msg = str(ex)
if "ConnectionResetError" in err_msg or "Connection refused" in err_ms... | https://github.com/mars-project/mars/issues/1960 | In [59]: a = mt.random.randint(0, 2, size=(1000,), chunk_size=300)
In [60]: mt.sort(mt.sort(a)).execute()
---------------------------------------------------------------------------
IndexError Traceback (most recent call last)
<ipython-input-60-6c95dab88665> in <module>
----> 1 mt.sort(m... | IndexError |
def rechunk(
a, chunk_size, threshold=None, chunk_size_limit=None, reassign_worker=False
):
if not any(pd.isna(s) for s in a.shape) and not a.is_coarse():
try:
check_chunks_unknown_shape([a], ValueError)
except ValueError:
# due to reason that tileable has unknown chunk s... | def rechunk(
a, chunk_size, threshold=None, chunk_size_limit=None, reassign_worker=False
):
if not any(pd.isna(s) for s in a.shape) and not a.is_coarse():
# do client check only when no unknown shape,
# real nsplits will be recalculated inside `tile`
chunk_size = _get_chunk_size(a, chunk... | https://github.com/mars-project/mars/issues/1963 | In [1]: import mars.dataframe as md
In [2]: import numpy as np
In [3]: df = md.DataFrame({'a': np.random.randint(100, size=10), 'b':np.random.rand(10), 'label': np.random.randint(2, size=10)}, chunk_size=4)
In [4]: df = df[df.a > 0]
In [5]: df._shape = (10, 3)
In [6]: data = df[['a', 'b']]
In [7]: label = df['lab... | ValueError |
def predict(self, data, **kw):
session = kw.pop("session", None)
run_kwargs = kw.pop("run_kwargs", dict())
run = kw.pop("run", True)
prob = predict(self.get_booster(), data, run=False, **kw)
if prob.ndim > 1:
prediction = mt.argmax(prob, axis=1)
else:
prediction = (prob > 0.5).as... | def predict(self, data, **kw):
session = kw.pop("session", None)
run_kwargs = kw.pop("run_kwargs", dict())
run = kw.pop("run", True)
if kw:
raise TypeError(
f"predict got an unexpected keyword argument '{next(iter(kw))}'"
)
prob = predict(self.get_booster(), data, run=Fal... | https://github.com/mars-project/mars/issues/1963 | In [1]: import mars.dataframe as md
In [2]: import numpy as np
In [3]: df = md.DataFrame({'a': np.random.randint(100, size=10), 'b':np.random.rand(10), 'label': np.random.randint(2, size=10)}, chunk_size=4)
In [4]: df = df[df.a > 0]
In [5]: df._shape = (10, 3)
In [6]: data = df[['a', 'b']]
In [7]: label = df['lab... | ValueError |
def __init__(
self, data=None, model=None, kwargs=None, output_types=None, gpu=None, **kw
):
super().__init__(
_data=data,
_model=model,
_kwargs=kwargs,
_gpu=gpu,
_output_types=output_types,
**kw,
)
| def __init__(self, data=None, model=None, output_types=None, gpu=None, **kw):
super().__init__(
_data=data, _model=model, _gpu=gpu, _output_types=output_types, **kw
)
| https://github.com/mars-project/mars/issues/1963 | In [1]: import mars.dataframe as md
In [2]: import numpy as np
In [3]: df = md.DataFrame({'a': np.random.randint(100, size=10), 'b':np.random.rand(10), 'label': np.random.randint(2, size=10)}, chunk_size=4)
In [4]: df = df[df.a > 0]
In [5]: df._shape = (10, 3)
In [6]: data = df[['a', 'b']]
In [7]: label = df['lab... | ValueError |
def __call__(self):
num_class = self._model.attr("num_class")
if num_class is not None:
num_class = int(num_class)
if num_class is not None:
shape = (self._data.shape[0], num_class)
else:
shape = (self._data.shape[0],)
inputs = [self._data]
if self.output_types[0] == Outp... | def __call__(self):
num_class = self._model.attr("num_class")
if num_class is not None:
num_class = int(num_class)
if num_class is not None:
shape = (self._data.shape[0], num_class)
else:
shape = (self._data.shape[0],)
if self.output_types[0] == OutputType.tensor:
# t... | https://github.com/mars-project/mars/issues/1963 | In [1]: import mars.dataframe as md
In [2]: import numpy as np
In [3]: df = md.DataFrame({'a': np.random.randint(100, size=10), 'b':np.random.rand(10), 'label': np.random.randint(2, size=10)}, chunk_size=4)
In [4]: df = df[df.a > 0]
In [5]: df._shape = (10, 3)
In [6]: data = df[['a', 'b']]
In [7]: label = df['lab... | ValueError |
def execute(cls, ctx, op):
from xgboost import DMatrix
raw_data = data = ctx[op.data.key]
if isinstance(data, tuple):
data = ToDMatrix.get_xgb_dmatrix(data)
else:
data = data.spmatrix if hasattr(data, "spmatrix") else data
data = DMatrix(data)
# do not pass arguments that a... | def execute(cls, ctx, op):
from xgboost import DMatrix
raw_data = data = ctx[op.data.key]
if isinstance(data, tuple):
data = ToDMatrix.get_xgb_dmatrix(data)
else:
data = data.spmatrix if hasattr(data, "spmatrix") else data
data = DMatrix(data)
result = op.model.predict(data)... | https://github.com/mars-project/mars/issues/1963 | In [1]: import mars.dataframe as md
In [2]: import numpy as np
In [3]: df = md.DataFrame({'a': np.random.randint(100, size=10), 'b':np.random.rand(10), 'label': np.random.randint(2, size=10)}, chunk_size=4)
In [4]: df = df[df.a > 0]
In [5]: df._shape = (10, 3)
In [6]: data = df[['a', 'b']]
In [7]: label = df['lab... | ValueError |
def predict(
model,
data,
output_margin=False,
ntree_limit=None,
validate_features=True,
base_margin=None,
session=None,
run_kwargs=None,
run=True,
):
from xgboost import Booster
data = check_data(data)
if not isinstance(model, Booster):
raise TypeError(f"model h... | def predict(model, data, session=None, run_kwargs=None, run=True):
from xgboost import Booster
data = check_data(data)
if not isinstance(model, Booster):
raise TypeError(f"model has to be a xgboost.Booster, got {type(model)} instead")
num_class = model.attr("num_class")
if isinstance(data,... | https://github.com/mars-project/mars/issues/1963 | In [1]: import mars.dataframe as md
In [2]: import numpy as np
In [3]: df = md.DataFrame({'a': np.random.randint(100, size=10), 'b':np.random.rand(10), 'label': np.random.randint(2, size=10)}, chunk_size=4)
In [4]: df = df[df.a > 0]
In [5]: df._shape = (10, 3)
In [6]: data = df[['a', 'b']]
In [7]: label = df['lab... | ValueError |
def predict(self, data, **kw):
session = kw.pop("session", None)
run_kwargs = kw.pop("run_kwargs", None)
return predict(
self.get_booster(), data, session=session, run_kwargs=run_kwargs, **kw
)
| def predict(self, data, **kw):
session = kw.pop("session", None)
run_kwargs = kw.pop("run_kwargs", None)
if kw:
raise TypeError(
f"predict got an unexpected keyword argument '{next(iter(kw))}'"
)
return predict(self.get_booster(), data, session=session, run_kwargs=run_kwargs)... | https://github.com/mars-project/mars/issues/1963 | In [1]: import mars.dataframe as md
In [2]: import numpy as np
In [3]: df = md.DataFrame({'a': np.random.randint(100, size=10), 'b':np.random.rand(10), 'label': np.random.randint(2, size=10)}, chunk_size=4)
In [4]: df = df[df.a > 0]
In [5]: df._shape = (10, 3)
In [6]: data = df[['a', 'b']]
In [7]: label = df['lab... | ValueError |
def rechunk(
tensor, chunk_size, threshold=None, chunk_size_limit=None, reassign_worker=False
):
if not any(np.isnan(s) for s in tensor.shape) and not tensor.is_coarse():
try:
check_chunks_unknown_shape([tensor], ValueError)
except ValueError:
# due to reason that tensor ... | def rechunk(
tensor, chunk_size, threshold=None, chunk_size_limit=None, reassign_worker=False
):
if not any(np.isnan(s) for s in tensor.shape) and not tensor.is_coarse():
# do client check only when tensor has no unknown shape,
# otherwise, recalculate chunk_size in `tile`
chunk_size = g... | https://github.com/mars-project/mars/issues/1963 | In [1]: import mars.dataframe as md
In [2]: import numpy as np
In [3]: df = md.DataFrame({'a': np.random.randint(100, size=10), 'b':np.random.rand(10), 'label': np.random.randint(2, size=10)}, chunk_size=4)
In [4]: df = df[df.a > 0]
In [5]: df._shape = (10, 3)
In [6]: data = df[['a', 'b']]
In [7]: label = df['lab... | ValueError |
def __mars_tensor__(self, dtype=None, order="K"):
return self._data.__mars_tensor__(dtype=dtype, order=order)
| def __mars_tensor__(self, dtype=None, order="K"):
return self._to_mars_tensor(dtype=dtype, order=order)
| https://github.com/mars-project/mars/issues/1943 | ---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
<ipython-input-52-f2912f2e33a0> in <module>
1 from mars.learn.metrics import accuracy_score
----> 2 accuracy_score(y_test,y_pred).execute()
/home/tops/lib/python3.6/si... | ValueError |
def to_frame(self, index: bool = True, name=None):
"""
Create a DataFrame with a column containing the Index.
Parameters
----------
index : bool, default True
Set the index of the returned DataFrame as the original Index.
name : object, default None
The passed name should subst... | def to_frame(self, index: bool = True, name=None):
"""
Create a DataFrame with a column containing the Index.
Parameters
----------
index : bool, default True
Set the index of the returned DataFrame as the original Index.
name : object, default None
The passed name should subst... | https://github.com/mars-project/mars/issues/1943 | ---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
<ipython-input-52-f2912f2e33a0> in <module>
1 from mars.learn.metrics import accuracy_score
----> 2 accuracy_score(y_test,y_pred).execute()
/home/tops/lib/python3.6/si... | ValueError |
def __mars_tensor__(self, dtype=None, order="K"):
return self._data.__mars_tensor__(dtype=dtype, order=order)
| def __mars_tensor__(self, dtype=None, order="K"):
tensor = self._data.to_tensor()
dtype = dtype if dtype is not None else tensor.dtype
return tensor.astype(dtype=dtype, order=order, copy=False)
| https://github.com/mars-project/mars/issues/1943 | ---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
<ipython-input-52-f2912f2e33a0> in <module>
1 from mars.learn.metrics import accuracy_score
----> 2 accuracy_score(y_test,y_pred).execute()
/home/tops/lib/python3.6/si... | ValueError |
def __mars_tensor__(self, dtype=None, order="K"):
return self._data.__mars_tensor__(dtype=dtype, order=order)
| def __mars_tensor__(self, dtype=None, order="K"):
return self._data.to_tensor().astype(dtype=dtype, order=order, copy=False)
| https://github.com/mars-project/mars/issues/1943 | ---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
<ipython-input-52-f2912f2e33a0> in <module>
1 from mars.learn.metrics import accuracy_score
----> 2 accuracy_score(y_test,y_pred).execute()
/home/tops/lib/python3.6/si... | ValueError |
def _to_mars_tensor(self, dtype=None, order="K", extract_multi_index=False):
tensor = self.to_tensor(extract_multi_index=extract_multi_index)
dtype = dtype if dtype is not None else tensor.dtype
return tensor.astype(dtype=dtype, order=order, copy=False)
| def _to_mars_tensor(self, dtype=None, order="K", extract_multi_index=False):
tensor = self._data.to_tensor(extract_multi_index=extract_multi_index)
dtype = dtype if dtype is not None else tensor.dtype
return tensor.astype(dtype=dtype, order=order, copy=False)
| https://github.com/mars-project/mars/issues/1943 | ---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
<ipython-input-52-f2912f2e33a0> in <module>
1 from mars.learn.metrics import accuracy_score
----> 2 accuracy_score(y_test,y_pred).execute()
/home/tops/lib/python3.6/si... | ValueError |
def __init__(self, y_true=None, y_pred=None, type_true=None, type_pred=None, **kw):
super().__init__(
_y_true=y_true, _y_pred=y_pred, _type_true=type_true, _type_pred=type_pred, **kw
)
# scalar(y_type), y_true, y_pred
self.output_types = [OutputType.tensor] * 3
| def __init__(self, y_true=None, y_pred=None, type_true=None, type_pred=None, **kw):
super().__init__(
_y_true=y_true, _y_pred=y_pred, _type_true=type_true, _type_pred=type_pred, **kw
)
# scalar(y_type), y_true, y_pred
self.output_types = [OutputType.tensor] + get_output_types(
*[y_true, ... | https://github.com/mars-project/mars/issues/1943 | ---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
<ipython-input-52-f2912f2e33a0> in <module>
1 from mars.learn.metrics import accuracy_score
----> 2 accuracy_score(y_test,y_pred).execute()
/home/tops/lib/python3.6/si... | ValueError |
def tile(cls, op):
y_true, y_pred = op.y_true, op.y_pred
for y in (op.y_true, op.y_pred):
if isinstance(y, (Base, Entity)):
if np.isnan(y.size): # pragma: no cover
raise TilesError("input has unknown shape")
check_consistent_length(y_true, y_pred)
ctx = get_context... | def tile(cls, op):
y_true, y_pred = op.y_true, op.y_pred
for y in (op.y_true, op.y_pred):
if isinstance(y, (Base, Entity)):
if np.isnan(y.size): # pragma: no cover
raise TilesError("input has unknown shape")
check_consistent_length(y_true, y_pred)
ctx = get_context... | https://github.com/mars-project/mars/issues/1943 | ---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
<ipython-input-52-f2912f2e33a0> in <module>
1 from mars.learn.metrics import accuracy_score
----> 2 accuracy_score(y_test,y_pred).execute()
/home/tops/lib/python3.6/si... | ValueError |
def tile(cls, op):
ctx = get_context()
try:
type_true = ctx.get_chunk_results([op.type_true.chunks[0].key])[0]
except (KeyError, AttributeError):
raise TilesError("type_true needed to be executed first")
y_true, y_pred = op.y_true, op.y_pred
if type_true.item().startswith("multilabe... | def tile(cls, op):
ctx = get_context()
try:
type_true = ctx.get_chunk_results([op.type_true.chunks[0].key])[0]
except KeyError:
raise TilesError("type_true needed to be executed first")
y_true, y_pred = op.y_true, op.y_pred
if type_true.item().startswith("multilabel"):
diffe... | https://github.com/mars-project/mars/issues/1943 | ---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
<ipython-input-52-f2912f2e33a0> in <module>
1 from mars.learn.metrics import accuracy_score
----> 2 accuracy_score(y_test,y_pred).execute()
/home/tops/lib/python3.6/si... | ValueError |
def type_of_target(y):
"""Determine the type of data indicated by the target.
Note that this type is the most specific type that can be inferred.
For example:
* ``binary`` is more specific but compatible with ``multiclass``.
* ``multiclass`` of integers is more specific but compatible with... | def type_of_target(y):
"""Determine the type of data indicated by the target.
Note that this type is the most specific type that can be inferred.
For example:
* ``binary`` is more specific but compatible with ``multiclass``.
* ``multiclass`` of integers is more specific but compatible with... | https://github.com/mars-project/mars/issues/1943 | ---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
<ipython-input-52-f2912f2e33a0> in <module>
1 from mars.learn.metrics import accuracy_score
----> 2 accuracy_score(y_test,y_pred).execute()
/home/tops/lib/python3.6/si... | ValueError |
def __init__(self, n_workers=None, output_types=None, pure_depends=None, **kw):
super().__init__(
_n_workers=n_workers,
_output_types=output_types,
_pure_depends=pure_depends,
**kw,
)
if self.output_types is None:
self.output_types = [OutputType.object]
| def __init__(self, n_workers=None, output_types=None, **kw):
super().__init__(_n_workers=n_workers, _output_types=output_types, **kw)
if self.output_types is None:
self.output_types = [OutputType.object]
| https://github.com/mars-project/mars/issues/1932 | 2021-01-26 15:39:43,801 mars.scheduler.operands.base 474 DEBUG Operand e3036e9fb2b4f84911306f8fa9cf3e03(StartTracker) state from OperandState.UNSCHEDULED to OperandState.READY.
2021-01-26 15:39:43,802 mars.scheduler.assigner 476 DEBUG Operand e3036e9fb2b4f84911306f8fa9cf3e03 enqueued
2021-01-26 15:49:43,403 mars... | TimeoutError |
def tile(cls, op):
ctx = get_context()
if ctx.running_mode != RunningMode.distributed:
assert all(len(inp.chunks) == 1 for inp in op.inputs)
chunk_op = op.copy().reset_key()
out_chunk = chunk_op.new_chunk(
[inp.chunks[0] for inp in op.inputs], shape=(1,), index=(0,)
... | def tile(cls, op):
ctx = get_context()
if ctx.running_mode != RunningMode.distributed:
assert all(len(inp.chunks) == 1 for inp in op.inputs)
chunk_op = op.copy().reset_key()
out_chunk = chunk_op.new_chunk(
[inp.chunks[0] for inp in op.inputs], shape=(1,), index=(0,)
... | https://github.com/mars-project/mars/issues/1932 | 2021-01-26 15:39:43,801 mars.scheduler.operands.base 474 DEBUG Operand e3036e9fb2b4f84911306f8fa9cf3e03(StartTracker) state from OperandState.UNSCHEDULED to OperandState.READY.
2021-01-26 15:39:43,802 mars.scheduler.assigner 476 DEBUG Operand e3036e9fb2b4f84911306f8fa9cf3e03 enqueued
2021-01-26 15:49:43,403 mars... | TimeoutError |
def tile(cls, op):
inputs = op.inputs
check_chunks_unknown_shape(inputs, TilesError)
axis_to_nsplits = defaultdict(list)
has_dataframe = any(
output_type == OutputType.dataframe for output_type in op.output_types
)
for ax in op.axes:
if has_dataframe and ax == 1:
# if... | def tile(cls, op):
inputs = op.inputs
check_chunks_unknown_shape(inputs, TilesError)
axis_to_nsplits = defaultdict(list)
has_dataframe = any(
output_type == OutputType.dataframe for output_type in op.output_types
)
for ax in op.axes:
if has_dataframe and ax == 1:
# if... | https://github.com/mars-project/mars/issues/1930 | SCH 2021-01-26 14:35:13,477 Mars Scheduler started in standalone mode.
SCH 2021-01-26 14:35:13,477 Actor s:h1:SchedulerClusterInfoActor running in process 72974
SCH 2021-01-26 14:35:13,478 Actor s:h1:ChunkMetaActor running in process 72974 at 127.0.0.1:27341
SCH 2021-01-26 14:35:13,478 Actor s:h1:SessionManagerActor ru... | KeyError |
def _replace_copied_tilebale(self, graph):
if len(self._optimizer_context) == 0:
return graph
new_graph = DAG()
replaced_tileables = weakref.WeakKeyDictionary()
for n in graph.topological_iter():
if graph.count_predecessors(n) == 0:
if n in self._optimizer_context and all(
... | def _replace_copied_tilebale(self, graph):
if len(self._optimizer_context) == 0:
return graph
new_graph = DAG()
replaced_tileables = weakref.WeakKeyDictionary()
for n in graph.topological_iter():
if graph.count_predecessors(n) == 0:
if n in self._optimizer_context and all(
... | https://github.com/mars-project/mars/issues/1923 | In [9]: d = md.read_csv('Downloads/test.csv')
In [10]: (d.head() + 1).execute()
Unexpected exception occurred in GraphActor.prepare_graph.
Traceback (most recent call last):
File "/Users/hekaisheng/Documents/mars_dev/mars/mars/utils.py", line 383, in _wrapped
return func(*args, **kwargs)
File "/Users/hekaisheng/Docume... | KeyError |
def __init__(
self,
model_type=None,
data=None,
label=None,
sample_weight=None,
init_score=None,
eval_datas=None,
eval_labels=None,
eval_sample_weights=None,
eval_init_scores=None,
params=None,
kwds=None,
workers=None,
worker_id=None,
worker_ports=None,
tr... | def __init__(
self,
model_type=None,
data=None,
label=None,
sample_weight=None,
init_score=None,
eval_datas=None,
eval_labels=None,
eval_sample_weights=None,
eval_init_scores=None,
params=None,
kwds=None,
lgbm_endpoints=None,
lgbm_port=None,
tree_learner=None,... | https://github.com/mars-project/mars/issues/1917 | Traceback (most recent call last):
File "/home/admin/work/_public-mars-0.6.2.zip/mars/promise.py", line 100, in _wrapped
result = func(*args, **kwargs)
File "/home/admin/work/_public-mars-0.6.2.zip/mars/worker/calc.py", line 301, in <lambda>
.then(lambda context_dict: _start_calc(context_dict)) \
File "/home/admin/work... | lightgbm.basic.LightGBMError |
def _set_inputs(self, inputs):
super()._set_inputs(inputs)
it = iter(inputs)
for attr in ["_data", "_label", "_sample_weight", "_init_score"]:
if getattr(self, attr) is not None:
setattr(self, attr, next(it))
for attr in [
"_eval_datas",
"_eval_labels",
"_eval... | def _set_inputs(self, inputs):
super()._set_inputs(inputs)
it = iter(inputs)
for attr in ["_data", "_label", "_sample_weight", "_init_score"]:
if getattr(self, attr) is not None:
setattr(self, attr, next(it))
for attr in [
"_eval_datas",
"_eval_labels",
"_eval... | https://github.com/mars-project/mars/issues/1917 | Traceback (most recent call last):
File "/home/admin/work/_public-mars-0.6.2.zip/mars/promise.py", line 100, in _wrapped
result = func(*args, **kwargs)
File "/home/admin/work/_public-mars-0.6.2.zip/mars/worker/calc.py", line 301, in <lambda>
.then(lambda context_dict: _start_calc(context_dict)) \
File "/home/admin/work... | lightgbm.basic.LightGBMError |
def tile(cls, op: "LGBMTrain"):
ctx = get_context()
if ctx.running_mode != RunningMode.distributed:
assert all(len(inp.chunks) == 1 for inp in op.inputs)
chunk_op = op.copy().reset_key()
out_chunk = chunk_op.new_chunk(
[inp.chunks[0] for inp in op.inputs], shape=(1,), index=... | def tile(cls, op: "LGBMTrain"):
ctx = get_context()
if ctx.running_mode != RunningMode.distributed:
assert all(len(inp.chunks) == 1 for inp in op.inputs)
chunk_op = op.copy().reset_key()
out_chunk = chunk_op.new_chunk(
[inp.chunks[0] for inp in op.inputs], shape=(1,), index=... | https://github.com/mars-project/mars/issues/1917 | Traceback (most recent call last):
File "/home/admin/work/_public-mars-0.6.2.zip/mars/promise.py", line 100, in _wrapped
result = func(*args, **kwargs)
File "/home/admin/work/_public-mars-0.6.2.zip/mars/worker/calc.py", line 301, in <lambda>
.then(lambda context_dict: _start_calc(context_dict)) \
File "/home/admin/work... | lightgbm.basic.LightGBMError |
def execute(cls, ctx, op: "LGBMTrain"):
if op.merge:
return super().execute(ctx, op)
from lightgbm.basic import _safe_call, _LIB
data_val = ctx[op.data.key]
data_val = data_val.spmatrix if hasattr(data_val, "spmatrix") else data_val
label_val = ctx[op.label.key]
sample_weight_val = (
... | def execute(cls, ctx, op: "LGBMTrain"):
if op.merge:
return super().execute(ctx, op)
from lightgbm.basic import _safe_call, _LIB
data_val = ctx[op.data.key]
data_val = data_val.spmatrix if hasattr(data_val, "spmatrix") else data_val
label_val = ctx[op.label.key]
sample_weight_val = (
... | https://github.com/mars-project/mars/issues/1917 | Traceback (most recent call last):
File "/home/admin/work/_public-mars-0.6.2.zip/mars/promise.py", line 100, in _wrapped
result = func(*args, **kwargs)
File "/home/admin/work/_public-mars-0.6.2.zip/mars/worker/calc.py", line 301, in <lambda>
.then(lambda context_dict: _start_calc(context_dict)) \
File "/home/admin/work... | lightgbm.basic.LightGBMError |
def get_next_port(typ=None, occupy=True):
import psutil
try:
conns = psutil.net_connections()
typ = typ or socket.SOCK_STREAM
occupied = set(
sc.laddr.port
for sc in conns
if sc.type == typ and LOW_PORT_BOUND <= sc.laddr.port <= HIGH_PORT_BOUND
... | def get_next_port(typ=None):
import psutil
try:
conns = psutil.net_connections()
typ = typ or socket.SOCK_STREAM
occupied = set(
sc.laddr.port
for sc in conns
if sc.type == typ and LOW_PORT_BOUND <= sc.laddr.port <= HIGH_PORT_BOUND
)
excep... | https://github.com/mars-project/mars/issues/1917 | Traceback (most recent call last):
File "/home/admin/work/_public-mars-0.6.2.zip/mars/promise.py", line 100, in _wrapped
result = func(*args, **kwargs)
File "/home/admin/work/_public-mars-0.6.2.zip/mars/worker/calc.py", line 301, in <lambda>
.then(lambda context_dict: _start_calc(context_dict)) \
File "/home/admin/work... | lightgbm.basic.LightGBMError |
def rechunk(
a, chunk_size, threshold=None, chunk_size_limit=None, reassign_worker=False
):
if not any(pd.isna(s) for s in a.shape) and not a.is_coarse():
# do client check only when no unknown shape,
# real nsplits will be recalculated inside `tile`
chunk_size = _get_chunk_size(a, chunk... | def rechunk(
a, chunk_size, threshold=None, chunk_size_limit=None, reassign_worker=False
):
if not any(pd.isna(s) for s in a.shape):
# do client check only when no unknown shape,
# real nsplits will be recalculated inside `tile`
chunk_size = _get_chunk_size(a, chunk_size)
if chun... | https://github.com/mars-project/mars/issues/1908 | Traceback (most recent call last):
File "/usr/local/lib/python3.6/dist-packages/mars/scheduler/graph.py", line 411, in _execute_graph
self.prepare_graph(compose=compose)
File "/usr/local/lib/python3.6/dist-packages/mars/utils.py", line 383, in _wrapped
return func(*args, **kwargs)
File "/usr/local/lib/python3.6/dist-pa... | ValueError |
def merge_index_value(to_merge_index_values, store_data=False):
"""
Merge index value according to their chunk index.
:param to_merge_index_values: Dict object. {index: index_value}
:return: Merged index_value
"""
index_value = None
min_val, min_val_close, max_val, max_val_close = None, None... | def merge_index_value(to_merge_index_values, store_data=False):
"""
Merge index value according to their chunk index.
:param to_merge_index_values: Dict object. {index: index_value}
:return: Merged index_value
"""
index_value = None
min_val, min_val_close, max_val, max_val_close = None, None... | https://github.com/mars-project/mars/issues/1908 | Traceback (most recent call last):
File "/usr/local/lib/python3.6/dist-packages/mars/scheduler/graph.py", line 411, in _execute_graph
self.prepare_graph(compose=compose)
File "/usr/local/lib/python3.6/dist-packages/mars/utils.py", line 383, in _wrapped
return func(*args, **kwargs)
File "/usr/local/lib/python3.6/dist-pa... | ValueError |
def tile(cls, op):
check_chunks_unknown_shape(op.inputs, TilesError)
tensor = astensor(op.input)
chunk_size = get_nsplits(tensor, op.chunk_size, tensor.dtype.itemsize)
if chunk_size == tensor.nsplits:
return [tensor]
new_chunk_size = chunk_size
steps = plan_rechunks(
op.inputs[... | def tile(cls, op):
check_chunks_unknown_shape(op.inputs, TilesError)
tensor = astensor(op.input)
chunk_size = get_nsplits(tensor, op.chunk_size, tensor.dtype.itemsize)
if chunk_size == tensor.nsplits:
return [tensor]
new_chunk_size = op.chunk_size
steps = plan_rechunks(
op.inpu... | https://github.com/mars-project/mars/issues/1908 | Traceback (most recent call last):
File "/usr/local/lib/python3.6/dist-packages/mars/scheduler/graph.py", line 411, in _execute_graph
self.prepare_graph(compose=compose)
File "/usr/local/lib/python3.6/dist-packages/mars/utils.py", line 383, in _wrapped
return func(*args, **kwargs)
File "/usr/local/lib/python3.6/dist-pa... | ValueError |
def rechunk(
tensor, chunk_size, threshold=None, chunk_size_limit=None, reassign_worker=False
):
if not any(np.isnan(s) for s in tensor.shape) and not tensor.is_coarse():
# do client check only when tensor has no unknown shape,
# otherwise, recalculate chunk_size in `tile`
chunk_size = g... | def rechunk(
tensor, chunk_size, threshold=None, chunk_size_limit=None, reassign_worker=False
):
if not any(np.isnan(s) for s in tensor.shape):
# do client check only when tensor has no unknown shape,
# otherwise, recalculate chunk_size in `tile`
chunk_size = get_nsplits(tensor, chunk_si... | https://github.com/mars-project/mars/issues/1908 | Traceback (most recent call last):
File "/usr/local/lib/python3.6/dist-packages/mars/scheduler/graph.py", line 411, in _execute_graph
self.prepare_graph(compose=compose)
File "/usr/local/lib/python3.6/dist-packages/mars/utils.py", line 383, in _wrapped
return func(*args, **kwargs)
File "/usr/local/lib/python3.6/dist-pa... | ValueError |
def _set_inputs(self, inputs):
super()._set_inputs(inputs)
if len(self._inputs) == 2:
self._lhs = self._inputs[0]
self._rhs = self._inputs[1]
else:
if isinstance(self._lhs, (Base, Entity)):
self._lhs = self._inputs[0]
elif pd.api.types.is_scalar(self._lhs):
... | def _set_inputs(self, inputs):
super()._set_inputs(inputs)
if len(self._inputs) == 2:
self._lhs = self._inputs[0]
self._rhs = self._inputs[1]
else:
if isinstance(self._lhs, (DATAFRAME_TYPE, SERIES_TYPE)):
self._lhs = self._inputs[0]
elif pd.api.types.is_scalar(sel... | https://github.com/mars-project/mars/issues/1918 | Attempt 1: Unexpected error KeyError occurred in executing operand bc8dccd428eb0f6261420866f7206b73 in 0.0.0.0:23252
Traceback (most recent call last):
File "/Users/wenjun.swj/Code/mars/mars/promise.py", line 378, in _wrapped
return func(*args, **kwargs)
File "/Users/wenjun.swj/Code/mars/mars/utils.py", line 383, in _w... | KeyError |
def _get_grouped(cls, op: "DataFrameGroupByAgg", df, ctx, copy=False, grouper=None):
if copy:
df = df.copy()
params = op.groupby_params.copy()
params.pop("as_index", None)
selection = params.pop("selection", None)
if grouper is not None:
params["by"] = grouper
params.pop("l... | def _get_grouped(cls, op: "DataFrameGroupByAgg", df, ctx, copy=False, grouper=None):
if copy:
df = df.copy()
params = op.groupby_params.copy()
params.pop("as_index", None)
selection = params.pop("selection", None)
if grouper is not None:
params["by"] = grouper
params.pop("l... | https://github.com/mars-project/mars/issues/1918 | Attempt 1: Unexpected error KeyError occurred in executing operand bc8dccd428eb0f6261420866f7206b73 in 0.0.0.0:23252
Traceback (most recent call last):
File "/Users/wenjun.swj/Code/mars/mars/promise.py", line 378, in _wrapped
return func(*args, **kwargs)
File "/Users/wenjun.swj/Code/mars/mars/utils.py", line 383, in _w... | KeyError |
def _execute_agg(cls, ctx, op: "DataFrameGroupByAgg"):
xdf = cudf if op.gpu else pd
out_chunk = op.outputs[0]
col_value = (
out_chunk.columns_value.to_pandas()
if hasattr(out_chunk, "columns_value")
else None
)
in_data_tuple = ctx[op.inputs[0].key]
in_data_list = []
... | def _execute_agg(cls, ctx, op: "DataFrameGroupByAgg"):
xdf = cudf if op.gpu else pd
out = op.outputs[0]
col_value = out.columns_value.to_pandas() if hasattr(out, "columns_value") else None
in_data_tuple = ctx[op.inputs[0].key]
in_data_list = []
for in_data in in_data_tuple:
if (
... | https://github.com/mars-project/mars/issues/1918 | Attempt 1: Unexpected error KeyError occurred in executing operand bc8dccd428eb0f6261420866f7206b73 in 0.0.0.0:23252
Traceback (most recent call last):
File "/Users/wenjun.swj/Code/mars/mars/promise.py", line 378, in _wrapped
return func(*args, **kwargs)
File "/Users/wenjun.swj/Code/mars/mars/utils.py", line 383, in _w... | KeyError |
def tile(cls, op):
in_groupby = op.inputs[0]
out_df = op.outputs[0]
chunks = []
for c in in_groupby.chunks:
new_op = op.copy().reset_key()
new_index = parse_index(pd.RangeIndex(-1), c.key)
if op.output_types[0] == OutputType.dataframe:
chunks.append(
... | def tile(cls, op):
in_groupby = op.inputs[0]
out_df = op.outputs[0]
chunks = []
for c in in_groupby.chunks:
new_op = op.copy().reset_key()
new_index = parse_index(pd.RangeIndex(-1), c.key)
if op.output_types[0] == OutputType.dataframe:
chunks.append(
... | https://github.com/mars-project/mars/issues/1918 | Attempt 1: Unexpected error KeyError occurred in executing operand bc8dccd428eb0f6261420866f7206b73 in 0.0.0.0:23252
Traceback (most recent call last):
File "/Users/wenjun.swj/Code/mars/mars/promise.py", line 378, in _wrapped
return func(*args, **kwargs)
File "/Users/wenjun.swj/Code/mars/mars/utils.py", line 383, in _w... | KeyError |
def execute(cls, ctx, op: "GroupByCumReductionOperand"):
in_data = ctx[op.inputs[0].key]
out_chunk = op.outputs[0]
if not in_data or in_data.empty:
ctx[out_chunk.key] = (
build_empty_df(out_chunk.dtypes)
if op.output_types[0] == OutputType.dataframe
else build_em... | def execute(cls, ctx, op: "GroupByCumReductionOperand"):
in_data = ctx[op.inputs[0].key]
out_df = op.outputs[0]
if not in_data or in_data.empty:
ctx[out_df.key] = (
build_empty_df(out_df.dtypes)
if op.output_types[0] == OutputType.dataframe
else build_empty_serie... | https://github.com/mars-project/mars/issues/1918 | Attempt 1: Unexpected error KeyError occurred in executing operand bc8dccd428eb0f6261420866f7206b73 in 0.0.0.0:23252
Traceback (most recent call last):
File "/Users/wenjun.swj/Code/mars/mars/promise.py", line 378, in _wrapped
return func(*args, **kwargs)
File "/Users/wenjun.swj/Code/mars/mars/utils.py", line 383, in _w... | KeyError |
def execute(cls, ctx, op):
in_data = ctx[op.inputs[0].key]
out_chunk = op.outputs[0]
if not in_data:
if op.output_types[0] == OutputType.dataframe:
ctx[op.outputs[0].key] = build_empty_df(out_chunk.dtypes)
else:
ctx[op.outputs[0].key] = build_empty_series(out_chunk.d... | def execute(cls, ctx, op):
in_data = ctx[op.inputs[0].key]
out_chunk = op.outputs[0]
if not in_data:
if op.output_types[0] == OutputType.dataframe:
ctx[op.outputs[0].key] = build_empty_df(out_chunk.dtypes)
else:
ctx[op.outputs[0].key] = build_empty_series(out_chunk.d... | https://github.com/mars-project/mars/issues/1918 | Attempt 1: Unexpected error KeyError occurred in executing operand bc8dccd428eb0f6261420866f7206b73 in 0.0.0.0:23252
Traceback (most recent call last):
File "/Users/wenjun.swj/Code/mars/mars/promise.py", line 378, in _wrapped
return func(*args, **kwargs)
File "/Users/wenjun.swj/Code/mars/mars/utils.py", line 383, in _w... | KeyError |
def _set_inputs(self, inputs):
super()._set_inputs(inputs)
input_iter = iter(inputs)
next(input_iter)
if isinstance(self.to_replace, (SERIES_TYPE, SERIES_CHUNK_TYPE)):
self._to_replace = next(input_iter)
if isinstance(self.value, (SERIES_TYPE, SERIES_CHUNK_TYPE)):
self._value = next(... | def _set_inputs(self, inputs):
super()._set_inputs(inputs)
input_iter = iter(inputs)
next(input_iter)
if isinstance(self.to_replace, SERIES_TYPE):
self._to_replace = next(input_iter)
if isinstance(self.value, SERIES_TYPE):
self._value = next(input_iter)
self._fill_chunks = list(i... | https://github.com/mars-project/mars/issues/1918 | Attempt 1: Unexpected error KeyError occurred in executing operand bc8dccd428eb0f6261420866f7206b73 in 0.0.0.0:23252
Traceback (most recent call last):
File "/Users/wenjun.swj/Code/mars/mars/promise.py", line 378, in _wrapped
return func(*args, **kwargs)
File "/Users/wenjun.swj/Code/mars/mars/utils.py", line 383, in _w... | KeyError |
def _set_inputs(self, inputs):
super()._set_inputs(inputs)
self._input = self._inputs[0]
if isinstance(self._q, (TENSOR_TYPE, TENSOR_CHUNK_TYPE)):
self._q = self._inputs[-1]
| def _set_inputs(self, inputs):
super()._set_inputs(inputs)
self._input = self._inputs[0]
if isinstance(self._q, TENSOR_TYPE):
self._q = self._inputs[-1]
| https://github.com/mars-project/mars/issues/1918 | Attempt 1: Unexpected error KeyError occurred in executing operand bc8dccd428eb0f6261420866f7206b73 in 0.0.0.0:23252
Traceback (most recent call last):
File "/Users/wenjun.swj/Code/mars/mars/promise.py", line 378, in _wrapped
return func(*args, **kwargs)
File "/Users/wenjun.swj/Code/mars/mars/utils.py", line 383, in _w... | KeyError |
def _set_inputs(self, inputs):
super()._set_inputs(inputs)
self._input = self._inputs[0]
if isinstance(self._tree, (OBJECT_TYPE, OBJECT_CHUNK_TYPE)):
self._tree = self._inputs[1]
| def _set_inputs(self, inputs):
super()._set_inputs(inputs)
self._input = self._inputs[0]
if isinstance(self._tree, OBJECT_TYPE):
self._tree = self._inputs[1]
| https://github.com/mars-project/mars/issues/1918 | Attempt 1: Unexpected error KeyError occurred in executing operand bc8dccd428eb0f6261420866f7206b73 in 0.0.0.0:23252
Traceback (most recent call last):
File "/Users/wenjun.swj/Code/mars/mars/promise.py", line 378, in _wrapped
return func(*args, **kwargs)
File "/Users/wenjun.swj/Code/mars/mars/utils.py", line 383, in _w... | KeyError |
def _set_inputs(self, inputs):
super()._set_inputs(inputs)
inputs_iter = iter(self._inputs)
self._input = next(inputs_iter)
if isinstance(self._bins, (TENSOR_TYPE, TENSOR_CHUNK_TYPE)):
self._bins = next(inputs_iter)
if self._weights is not None:
self._weights = next(inputs_iter)
... | def _set_inputs(self, inputs):
super()._set_inputs(inputs)
inputs_iter = iter(self._inputs)
self._input = next(inputs_iter)
if isinstance(self._bins, TENSOR_TYPE):
self._bins = next(inputs_iter)
if self._weights is not None:
self._weights = next(inputs_iter)
if self._input_min is... | https://github.com/mars-project/mars/issues/1918 | Attempt 1: Unexpected error KeyError occurred in executing operand bc8dccd428eb0f6261420866f7206b73 in 0.0.0.0:23252
Traceback (most recent call last):
File "/Users/wenjun.swj/Code/mars/mars/promise.py", line 378, in _wrapped
return func(*args, **kwargs)
File "/Users/wenjun.swj/Code/mars/mars/utils.py", line 383, in _w... | KeyError |
def _set_inputs(self, inputs):
super()._set_inputs(inputs)
inputs_iter = iter(self._inputs)
self._input = next(inputs_iter)
if isinstance(self._bins, (TENSOR_TYPE, TENSOR_CHUNK_TYPE)):
self._bins = next(inputs_iter)
if self._weights is not None:
self._weights = next(inputs_iter)
| def _set_inputs(self, inputs):
super()._set_inputs(inputs)
inputs_iter = iter(self._inputs)
self._input = next(inputs_iter)
if isinstance(self._bins, TENSOR_TYPE):
self._bins = next(inputs_iter)
if self._weights is not None:
self._weights = next(inputs_iter)
| https://github.com/mars-project/mars/issues/1918 | Attempt 1: Unexpected error KeyError occurred in executing operand bc8dccd428eb0f6261420866f7206b73 in 0.0.0.0:23252
Traceback (most recent call last):
File "/Users/wenjun.swj/Code/mars/mars/promise.py", line 378, in _wrapped
return func(*args, **kwargs)
File "/Users/wenjun.swj/Code/mars/mars/utils.py", line 383, in _w... | KeyError |
def deserialize_graph(ser_graph, graph_cls=None):
from google.protobuf.message import DecodeError
from .serialize.protos.graph_pb2 import GraphDef
from .graph import DirectedGraph
graph_cls = graph_cls or DirectedGraph
ser_graph_bin = to_binary(ser_graph)
g = GraphDef()
try:
g.Parse... | def deserialize_graph(ser_graph, graph_cls=None):
from google.protobuf.message import DecodeError
from .serialize.protos.graph_pb2 import GraphDef
from .graph import DirectedGraph
graph_cls = graph_cls or DirectedGraph
ser_graph_bin = to_binary(ser_graph)
g = GraphDef()
try:
ser_gra... | https://github.com/mars-project/mars/issues/1918 | Attempt 1: Unexpected error KeyError occurred in executing operand bc8dccd428eb0f6261420866f7206b73 in 0.0.0.0:23252
Traceback (most recent call last):
File "/Users/wenjun.swj/Code/mars/mars/promise.py", line 378, in _wrapped
return func(*args, **kwargs)
File "/Users/wenjun.swj/Code/mars/mars/utils.py", line 383, in _w... | KeyError |
def tile(cls, op):
check_chunks_unknown_shape(op.inputs, TilesError)
a = op.input
a = asdataframe(a) if a.ndim == 2 else asseries(a)
chunk_size = _get_chunk_size(a, op.chunk_size)
if chunk_size == a.nsplits:
return [a]
out = op.outputs[0]
new_chunk_size = chunk_size
if isinstan... | def tile(cls, op):
check_chunks_unknown_shape(op.inputs, TilesError)
out = op.outputs[0]
new_chunk_size = op.chunk_size
if isinstance(out, DATAFRAME_TYPE):
itemsize = max(getattr(dt, "itemsize", 8) for dt in out.dtypes)
else:
itemsize = out.dtype.itemsize
steps = plan_rechunks(
... | https://github.com/mars-project/mars/issues/1910 | Traceback (most recent call last):
File "/home/admin/work/_public-mars-0.6.2.zip/mars/scheduler/graph.py", line 410, in _execute_graph
self.prepare_graph(compose=compose)
File "/home/admin/work/_public-mars-0.6.2.zip/mars/utils.py", line 377, in _wrapped
return func(*args, **kwargs)
File "/home/admin/work/_public-mars-... | ValueError |
def rechunk(
a, chunk_size, threshold=None, chunk_size_limit=None, reassign_worker=False
):
if not any(pd.isna(s) for s in a.shape):
# do client check only when no unknown shape,
# real nsplits will be recalculated inside `tile`
chunk_size = _get_chunk_size(a, chunk_size)
if chun... | def rechunk(
a, chunk_size, threshold=None, chunk_size_limit=None, reassign_worker=False
):
if isinstance(a, DATAFRAME_TYPE):
itemsize = max(getattr(dt, "itemsize", 8) for dt in a.dtypes)
else:
itemsize = a.dtype.itemsize
chunk_size = get_nsplits(a, chunk_size, itemsize)
if chunk_siz... | https://github.com/mars-project/mars/issues/1910 | Traceback (most recent call last):
File "/home/admin/work/_public-mars-0.6.2.zip/mars/scheduler/graph.py", line 410, in _execute_graph
self.prepare_graph(compose=compose)
File "/home/admin/work/_public-mars-0.6.2.zip/mars/utils.py", line 377, in _wrapped
return func(*args, **kwargs)
File "/home/admin/work/_public-mars-... | ValueError |
def tile(cls, op: "DataFrameToCSV"):
in_df = op.input
out_df = op.outputs[0]
if in_df.ndim == 2 and in_df.chunk_shape[1] > 1:
# make sure only 1 chunk on the column axis
in_df = in_df.rechunk({1: in_df.shape[1]})._inplace_tile()
one_file = op.one_file
out_chunks = [], []
for c... | def tile(cls, op: "DataFrameToCSV"):
in_df = op.input
out_df = op.outputs[0]
if in_df.ndim == 2:
# make sure only 1 chunk on the column axis
in_df = in_df.rechunk({1: in_df.shape[1]})._inplace_tile()
one_file = op.one_file
out_chunks = [], []
for chunk in in_df.chunks:
... | https://github.com/mars-project/mars/issues/1910 | Traceback (most recent call last):
File "/home/admin/work/_public-mars-0.6.2.zip/mars/scheduler/graph.py", line 410, in _execute_graph
self.prepare_graph(compose=compose)
File "/home/admin/work/_public-mars-0.6.2.zip/mars/utils.py", line 377, in _wrapped
return func(*args, **kwargs)
File "/home/admin/work/_public-mars-... | ValueError |
def tile(cls, op):
check_chunks_unknown_shape(op.inputs, TilesError)
tensor = astensor(op.input)
chunk_size = get_nsplits(tensor, op.chunk_size, tensor.dtype.itemsize)
if chunk_size == tensor.nsplits:
return [tensor]
new_chunk_size = op.chunk_size
steps = plan_rechunks(
op.inpu... | def tile(cls, op):
check_chunks_unknown_shape(op.inputs, TilesError)
new_chunk_size = op.chunk_size
steps = plan_rechunks(
op.inputs[0],
new_chunk_size,
op.inputs[0].dtype.itemsize,
threshold=op.threshold,
chunk_size_limit=op.chunk_size_limit,
)
tensor = op.ou... | https://github.com/mars-project/mars/issues/1910 | Traceback (most recent call last):
File "/home/admin/work/_public-mars-0.6.2.zip/mars/scheduler/graph.py", line 410, in _execute_graph
self.prepare_graph(compose=compose)
File "/home/admin/work/_public-mars-0.6.2.zip/mars/utils.py", line 377, in _wrapped
return func(*args, **kwargs)
File "/home/admin/work/_public-mars-... | ValueError |
def rechunk(
tensor, chunk_size, threshold=None, chunk_size_limit=None, reassign_worker=False
):
if not any(np.isnan(s) for s in tensor.shape):
# do client check only when tensor has no unknown shape,
# otherwise, recalculate chunk_size in `tile`
chunk_size = get_nsplits(tensor, chunk_si... | def rechunk(
tensor, chunk_size, threshold=None, chunk_size_limit=None, reassign_worker=False
):
chunk_size = get_nsplits(tensor, chunk_size, tensor.dtype.itemsize)
if chunk_size == tensor.nsplits:
return tensor
op = TensorRechunk(
chunk_size,
threshold,
chunk_size_limit... | https://github.com/mars-project/mars/issues/1910 | Traceback (most recent call last):
File "/home/admin/work/_public-mars-0.6.2.zip/mars/scheduler/graph.py", line 410, in _execute_graph
self.prepare_graph(compose=compose)
File "/home/admin/work/_public-mars-0.6.2.zip/mars/utils.py", line 377, in _wrapped
return func(*args, **kwargs)
File "/home/admin/work/_public-mars-... | ValueError |
def __init__(
self,
op=None,
shape=None,
nsplits=None,
dtype=None,
name=None,
names=None,
index_value=None,
chunks=None,
**kw,
):
super().__init__(
_op=op,
_shape=shape,
_nsplits=nsplits,
_dtype=dtype,
_name=name,
_names=names,
... | def __init__(
self,
op=None,
shape=None,
nsplits=None,
dtype=None,
name=None,
index_value=None,
chunks=None,
**kw,
):
super().__init__(
_op=op,
_shape=shape,
_nsplits=nsplits,
_dtype=dtype,
_name=name,
_index_value=index_value,
... | https://github.com/mars-project/mars/issues/1890 | Traceback (most recent call last):
File "/Users/wenjun.swj/miniconda3/lib/python3.8/site-packages/IPython/core/interactiveshell.py", line 3417, in run_code
exec(code_obj, self.user_global_ns, self.user_ns)
File "<ipython-input-6-f86c22f8381d>", line 1, in <module>
mdf[mdf[0] != 0].sort_values(0).execute()
File "/Users/... | ZeroDivisionError |
def __call__(self, shape=None, chunk_size=None, inp=None, name=None, names=None):
if inp is None:
# create from pandas Index
name = name if name is not None else self._data.name
names = names if names is not None else self._data.names
return self.new_index(
None,
... | def __call__(self, shape=None, chunk_size=None, inp=None, name=None, names=None):
if inp is None:
# create from pandas Index
name = name if name is not None else self._data.name
return self.new_index(
None,
shape=shape,
dtype=self._dtype,
index... | https://github.com/mars-project/mars/issues/1890 | Traceback (most recent call last):
File "/Users/wenjun.swj/miniconda3/lib/python3.8/site-packages/IPython/core/interactiveshell.py", line 3417, in run_code
exec(code_obj, self.user_global_ns, self.user_ns)
File "<ipython-input-6-f86c22f8381d>", line 1, in <module>
mdf[mdf[0] != 0].sort_values(0).execute()
File "/Users/... | ZeroDivisionError |
def from_tileable(tileable, dtype=None, name=None, names=None):
op = IndexDataSource(gpu=tileable.op.gpu, sparse=tileable.issparse(), dtype=dtype)
return op(inp=tileable, name=name, names=names)
| def from_tileable(tileable, dtype=None, name=None):
op = IndexDataSource(gpu=tileable.op.gpu, sparse=tileable.issparse(), dtype=dtype)
return op(inp=tileable, name=name)
| https://github.com/mars-project/mars/issues/1890 | Traceback (most recent call last):
File "/Users/wenjun.swj/miniconda3/lib/python3.8/site-packages/IPython/core/interactiveshell.py", line 3417, in run_code
exec(code_obj, self.user_global_ns, self.user_ns)
File "<ipython-input-6-f86c22f8381d>", line 1, in <module>
mdf[mdf[0] != 0].sort_values(0).execute()
File "/Users/... | ZeroDivisionError |
def __init__(
self,
data=None,
dtype=None,
copy=False,
name=None,
tupleize_cols=True,
chunk_size=None,
gpu=None,
sparse=None,
names=None,
num_partitions=None,
):
# make sure __getattr__ does not result in stack overflow
self._data = None
need_repart = False
i... | def __init__(
self,
data=None,
dtype=None,
copy=False,
name=None,
tupleize_cols=True,
chunk_size=None,
gpu=None,
sparse=None,
names=None,
num_partitions=None,
):
# make sure __getattr__ does not result in stack overflow
self._data = None
need_repart = False
i... | https://github.com/mars-project/mars/issues/1890 | Traceback (most recent call last):
File "/Users/wenjun.swj/miniconda3/lib/python3.8/site-packages/IPython/core/interactiveshell.py", line 3417, in run_code
exec(code_obj, self.user_global_ns, self.user_ns)
File "<ipython-input-6-f86c22f8381d>", line 1, in <module>
mdf[mdf[0] != 0].sort_values(0).execute()
File "/Users/... | ZeroDivisionError |
def execute(cls, ctx, op):
a = ctx[op.inputs[0].key]
xdf = pd if isinstance(a, (pd.DataFrame, pd.Series)) else cudf
if len(a) == 0:
# when chunk is empty, return the empty chunk itself
ctx[op.outputs[0].key] = ctx[op.outputs[-1].key] = a
return
if op.sort_type == "sort_values":... | def execute(cls, ctx, op):
a = ctx[op.inputs[0].key]
xdf = pd if isinstance(a, (pd.DataFrame, pd.Series)) else cudf
if op.sort_type == "sort_values":
ctx[op.outputs[0].key] = res = execute_sort_values(a, op)
else:
ctx[op.outputs[0].key] = res = execute_sort_index(a, op)
by = op.by
... | https://github.com/mars-project/mars/issues/1890 | Traceback (most recent call last):
File "/Users/wenjun.swj/miniconda3/lib/python3.8/site-packages/IPython/core/interactiveshell.py", line 3417, in run_code
exec(code_obj, self.user_global_ns, self.user_ns)
File "<ipython-input-6-f86c22f8381d>", line 1, in <module>
mdf[mdf[0] != 0].sort_values(0).execute()
File "/Users/... | ZeroDivisionError |
def execute(cls, ctx, op):
inputs = [ctx[c.key] for c in op.inputs if len(ctx[c.key]) > 0]
if len(inputs) == 0:
# corner case: nothing sampled, we need to do nothing
ctx[op.outputs[-1].key] = ctx[op.inputs[0].key]
return
xdf = pd if isinstance(inputs[0], (pd.DataFrame, pd.Series)) e... | def execute(cls, ctx, op):
inputs = [ctx[c.key] for c in op.inputs]
xdf = pd if isinstance(inputs[0], (pd.DataFrame, pd.Series)) else cudf
a = xdf.concat(inputs, axis=op.axis)
p = len(inputs)
assert a.shape[op.axis] == p**2
slc = np.linspace(p - 1, a.shape[op.axis] - 1, num=p - 1, endpoint=Fal... | https://github.com/mars-project/mars/issues/1890 | Traceback (most recent call last):
File "/Users/wenjun.swj/miniconda3/lib/python3.8/site-packages/IPython/core/interactiveshell.py", line 3417, in run_code
exec(code_obj, self.user_global_ns, self.user_ns)
File "<ipython-input-6-f86c22f8381d>", line 1, in <module>
mdf[mdf[0] != 0].sort_values(0).execute()
File "/Users/... | ZeroDivisionError |
def _execute_dataframe_map(cls, ctx, op):
a, pivots = [ctx[c.key] for c in op.inputs]
out = op.outputs[0]
if len(a) == 0:
# when the chunk is empty, no slices can be produced
for i in range(op.n_partition):
ctx[(out.key, str(i))] = a
return
# use numpy.searchsorted ... | def _execute_dataframe_map(cls, ctx, op):
a, pivots = [ctx[c.key] for c in op.inputs]
out = op.outputs[0]
# use numpy.searchsorted to find split positions.
by = op.by
distinct_col = (
_PSRS_DISTINCT_COL
if a.columns.nlevels == 1
else (_PSRS_DISTINCT_COL,) + ("",) * (a.colum... | https://github.com/mars-project/mars/issues/1890 | Traceback (most recent call last):
File "/Users/wenjun.swj/miniconda3/lib/python3.8/site-packages/IPython/core/interactiveshell.py", line 3417, in run_code
exec(code_obj, self.user_global_ns, self.user_ns)
File "<ipython-input-6-f86c22f8381d>", line 1, in <module>
mdf[mdf[0] != 0].sort_values(0).execute()
File "/Users/... | ZeroDivisionError |
def _execute_reduce(cls, ctx, op):
out_chunk = op.outputs[0]
input_keys, _ = get_shuffle_input_keys_idxes(op.inputs[0])
if getattr(ctx, "running_mode", None) == RunningMode.distributed:
raw_inputs = [ctx.pop((input_key, op.shuffle_key)) for input_key in input_keys]
else:
raw_inputs = [ct... | def _execute_reduce(cls, ctx, op):
input_keys, _ = get_shuffle_input_keys_idxes(op.inputs[0])
if getattr(ctx, "running_mode", None) == RunningMode.distributed:
raw_inputs = [ctx.pop((input_key, op.shuffle_key)) for input_key in input_keys]
else:
raw_inputs = [ctx[(input_key, op.shuffle_key)]... | https://github.com/mars-project/mars/issues/1890 | Traceback (most recent call last):
File "/Users/wenjun.swj/miniconda3/lib/python3.8/site-packages/IPython/core/interactiveshell.py", line 3417, in run_code
exec(code_obj, self.user_global_ns, self.user_ns)
File "<ipython-input-6-f86c22f8381d>", line 1, in <module>
mdf[mdf[0] != 0].sort_values(0).execute()
File "/Users/... | ZeroDivisionError |
def fetch(self, session=None, **kw):
from .indexing.iloc import DataFrameIlocGetItem, SeriesIlocGetItem
batch_size = kw.pop("batch_size", 1000)
if len(kw) > 0: # pragma: no cover
raise TypeError(
f"'{next(iter(kw))}' is an invalid keyword argument for this function"
)
if i... | def fetch(self, session=None, **kw):
batch_size = kw.pop("batch_size", 1000)
if len(kw) > 0: # pragma: no cover
raise TypeError(
f"'{next(iter(kw))}' is an invalid keyword argument for this function"
)
batches = list(self._iter(batch_size=batch_size, session=session))
return... | https://github.com/mars-project/mars/issues/1871 | In [20]: df = md.DataFrame(mt.random.rand(10, 3, chunk_size=3))
In [21]: df.execute()
Out[21]:
0 1 2
0 0.996454 0.199555 0.058095
1 0.856396 0.477889 0.869464
2 0.578357 0.449761 0.313753
3 0.907721 0.887646 0.171193
4 0.727089 0.617502 0.210623
5 0.209806 0.070762 0.183754
6 0.38974... | ValueError |
def tile(cls, op: "DataFrameCartesianChunk"):
left = op.left
right = op.right
out = op.outputs[0]
if left.ndim == 2 and left.chunk_shape[1] > 1:
check_chunks_unknown_shape([left], TilesError)
# if left is a DataFrame, make sure 1 chunk on axis columns
left = left.rechunk({1: lef... | def tile(cls, op: "DataFrameCartesianChunk"):
left = op.left
right = op.right
out = op.outputs[0]
if left.ndim == 2 and left.chunk_shape[1] > 1:
check_chunks_unknown_shape([left], TilesError)
# if left is a DataFrame, make sure 1 chunk on axis columns
left = left.rechunk({1: lef... | https://github.com/mars-project/mars/issues/1843 | Traceback (most recent call last):
File "/home/smartguo/lib/anaconda3/envs/mars/lib/python3.7/site-packages/pandas/core/dtypes/common.py", line 171, in ensure_python_int
new_value = int(value)
ValueError: cannot convert float NaN to integer
The above exception was the direct cause of the following exception:
Tracebac... | ValueError |
def _call_input_tensor(self, input_tensor, index, columns):
if input_tensor.ndim not in {1, 2}:
raise ValueError("Must pass 1-d or 2-d input")
inputs = [input_tensor]
if index is not None:
if input_tensor.shape[0] != len(index):
raise ValueError(
f"index {index} ... | def _call_input_tensor(self, input_tensor, index, columns):
if input_tensor.ndim not in {1, 2}:
raise ValueError("Must pass 1-d or 2-d input")
inputs = [input_tensor]
if index is not None:
if input_tensor.shape[0] != len(index):
raise ValueError(
f"index {index} ... | https://github.com/mars-project/mars/issues/1843 | Traceback (most recent call last):
File "/home/smartguo/lib/anaconda3/envs/mars/lib/python3.7/site-packages/pandas/core/dtypes/common.py", line 171, in ensure_python_int
new_value = int(value)
ValueError: cannot convert float NaN to integer
The above exception was the direct cause of the following exception:
Tracebac... | ValueError |
def _tile_input_tensor(cls, op):
out_df = op.outputs[0]
in_tensor = op.input
out_chunks = []
nsplits = in_tensor.nsplits
if op.index is not None:
# rechunk index if it's a tensor
check_chunks_unknown_shape(op.inputs, TilesError)
index_tensor = op.index.rechunk([nsplits[0]]).... | def _tile_input_tensor(cls, op):
out_df = op.outputs[0]
in_tensor = op.input
out_chunks = []
nsplits = in_tensor.nsplits
if op.index is not None:
# rechunk index if it's a tensor
check_chunks_unknown_shape(op.inputs, TilesError)
index_tensor = op.index.rechunk([nsplits[0]]).... | https://github.com/mars-project/mars/issues/1843 | Traceback (most recent call last):
File "/home/smartguo/lib/anaconda3/envs/mars/lib/python3.7/site-packages/pandas/core/dtypes/common.py", line 171, in ensure_python_int
new_value = int(value)
ValueError: cannot convert float NaN to integer
The above exception was the direct cause of the following exception:
Tracebac... | ValueError |
def execute(cls, ctx, op):
chunk = op.outputs[0]
if isinstance(op.input, dict):
d = OrderedDict()
for k, v in op.input.items():
if hasattr(v, "key"):
d[k] = ctx[v.key]
else:
d[k] = v
if op.index is not None:
index_data ... | def execute(cls, ctx, op):
chunk = op.outputs[0]
if isinstance(op.input, dict):
d = OrderedDict()
for k, v in op.input.items():
if hasattr(v, "key"):
d[k] = ctx[v.key]
else:
d[k] = v
if op.index is not None:
index_data ... | https://github.com/mars-project/mars/issues/1843 | Traceback (most recent call last):
File "/home/smartguo/lib/anaconda3/envs/mars/lib/python3.7/site-packages/pandas/core/dtypes/common.py", line 171, in ensure_python_int
new_value = int(value)
ValueError: cannot convert float NaN to integer
The above exception was the direct cause of the following exception:
Tracebac... | ValueError |
def tile(cls, op):
in_tensor = op.input
tensor = op.outputs[0]
# check unknown shape
check_chunks_unknown_shape(op.inputs, TilesError)
if any(np.isnan(s) for s in tensor.shape):
# -1 exists in newshape and input tensor has unknown shape
# recalculate new shape
shape = tuple... | def tile(cls, op):
in_tensor = op.input
tensor = op.outputs[0]
if op.order == "F":
# do transpose first, then do regular reshape, then transpose back
result = in_tensor.transpose().reshape(op.newshape[::-1])
if getattr(op, "_reshape_with_shuffle", True):
result.op.extra_... | https://github.com/mars-project/mars/issues/1843 | Traceback (most recent call last):
File "/home/smartguo/lib/anaconda3/envs/mars/lib/python3.7/site-packages/pandas/core/dtypes/common.py", line 171, in ensure_python_int
new_value = int(value)
ValueError: cannot convert float NaN to integer
The above exception was the direct cause of the following exception:
Tracebac... | ValueError |
def reshape(a, newshape, order="C"):
"""
Gives a new shape to a tensor without changing its data.
Parameters
----------
a : array_like
Tensor to be reshaped.
newshape : int or tuple of ints
The new shape should be compatible with the original shape. If
an integer, then t... | def reshape(a, newshape, order="C"):
"""
Gives a new shape to a tensor without changing its data.
Parameters
----------
a : array_like
Tensor to be reshaped.
newshape : int or tuple of ints
The new shape should be compatible with the original shape. If
an integer, then t... | https://github.com/mars-project/mars/issues/1843 | Traceback (most recent call last):
File "/home/smartguo/lib/anaconda3/envs/mars/lib/python3.7/site-packages/pandas/core/dtypes/common.py", line 171, in ensure_python_int
new_value = int(value)
ValueError: cannot convert float NaN to integer
The above exception was the direct cause of the following exception:
Tracebac... | ValueError |
def __call__(self, a, bins, range, weights):
if range is not None:
_check_range(range)
if isinstance(bins, str):
# string, 'auto', 'stone', ...
# shape is unknown
bin_name = bins
# if `bins` is a string for an automatic method,
# this will replace it with the numb... | def __call__(self, a, bins, range, weights):
if range is not None:
_check_range(range)
if isinstance(bins, str):
# string, 'auto', 'stone', ...
# shape is unknown
bin_name = bins
# if `bins` is a string for an automatic method,
# this will replace it with the numb... | https://github.com/mars-project/mars/issues/1843 | Traceback (most recent call last):
File "/home/smartguo/lib/anaconda3/envs/mars/lib/python3.7/site-packages/pandas/core/dtypes/common.py", line 171, in ensure_python_int
new_value = int(value)
ValueError: cannot convert float NaN to integer
The above exception was the direct cause of the following exception:
Tracebac... | ValueError |
def tile_with_columns(cls, op):
in_df = op.inputs[0]
out_df = op.outputs[0]
col_names = op.col_names
if not isinstance(col_names, list):
column_index = calc_columns_index(col_names, in_df)
out_chunks = []
dtype = in_df.dtypes[col_names]
for i in range(in_df.chunk_shape[0]... | def tile_with_columns(cls, op):
in_df = op.inputs[0]
out_df = op.outputs[0]
col_names = op.col_names
if not isinstance(col_names, list):
column_index = calc_columns_index(col_names, in_df)
out_chunks = []
dtype = in_df.dtypes[col_names]
for i in range(in_df.chunk_shape[0]... | https://github.com/mars-project/mars/issues/1786 | In [1]: import mars.dataframe as md
In [2]: import pandas as pd
In [4]: md.Series(pd.Series([], dtype=object)).execute()
---------------------------------------------------------------------------
ZeroDivisionError Traceback (most recent call last)
<ipython-input-4-665db81dbad7> in <module>
--... | ZeroDivisionError |
def decide_series_chunk_size(shape, chunk_size, memory_usage):
from ..config import options
chunk_size = dictify_chunk_size(shape, chunk_size)
average_memory_usage = memory_usage / shape[0] if shape[0] != 0 else memory_usage
if len(chunk_size) == len(shape):
return normalize_chunk_sizes(shape,... | def decide_series_chunk_size(shape, chunk_size, memory_usage):
from ..config import options
chunk_size = dictify_chunk_size(shape, chunk_size)
average_memory_usage = memory_usage / shape[0] if shape[0] != 0 else memory_usage
if len(chunk_size) == len(shape):
return normalize_chunk_sizes(shape,... | https://github.com/mars-project/mars/issues/1786 | In [1]: import mars.dataframe as md
In [2]: import pandas as pd
In [4]: md.Series(pd.Series([], dtype=object)).execute()
---------------------------------------------------------------------------
ZeroDivisionError Traceback (most recent call last)
<ipython-input-4-665db81dbad7> in <module>
--... | ZeroDivisionError |
def tile(cls, op):
if op.compression:
return cls._tile_compressed(op)
df = op.outputs[0]
chunk_bytes = df.extra_params.chunk_bytes
chunk_bytes = int(parse_readable_size(chunk_bytes)[0])
dtypes = df.dtypes
if (
op.use_arrow_dtype is None and not op.gpu and options.dataframe.use_... | def tile(cls, op):
if op.compression:
return cls._tile_compressed(op)
df = op.outputs[0]
chunk_bytes = df.extra_params.chunk_bytes
chunk_bytes = int(parse_readable_size(chunk_bytes)[0])
dtypes = df.dtypes
if (
op.use_arrow_dtype is None and not op.gpu and options.dataframe.use_... | https://github.com/mars-project/mars/issues/1780 | 20/12/13 13:13:40 WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable
hdfsOpenFile(hdfs://<hdfs_ip>:8020/user/test/parquet_test): FileSystem#open((Lorg/apache/hadoop/fs/Path;I)Lorg/apache/hadoop/fs/FSDataInputStream;) error:
RemoteException: ... | OSError |
def read_csv(
path,
names=None,
sep=",",
index_col=None,
compression=None,
header="infer",
dtype=None,
usecols=None,
nrows=None,
chunk_bytes="64M",
gpu=None,
head_bytes="100k",
head_lines=None,
incremental_index=False,
use_arrow_dtype=None,
storage_options... | def read_csv(
path,
names=None,
sep=",",
index_col=None,
compression=None,
header="infer",
dtype=None,
usecols=None,
nrows=None,
chunk_bytes="64M",
gpu=None,
head_bytes="100k",
head_lines=None,
incremental_index=False,
use_arrow_dtype=None,
storage_options... | https://github.com/mars-project/mars/issues/1780 | 20/12/13 13:13:40 WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable
hdfsOpenFile(hdfs://<hdfs_ip>:8020/user/test/parquet_test): FileSystem#open((Lorg/apache/hadoop/fs/Path;I)Lorg/apache/hadoop/fs/FSDataInputStream;) error:
RemoteException: ... | OSError |
def _tile_partitioned(cls, op):
out_df = op.outputs[0]
shape = (np.nan, out_df.shape[1])
dtypes = cls._to_arrow_dtypes(out_df.dtypes, op)
dataset = pq.ParquetDataset(op.path)
parsed_path = urlparse(op.path)
if not os.path.exists(op.path) and parsed_path.scheme:
path_prefix = f"{parsed_p... | def _tile_partitioned(cls, op):
out_df = op.outputs[0]
shape = (np.nan, out_df.shape[1])
dtypes = cls._to_arrow_dtypes(out_df.dtypes, op)
dataset = pq.ParquetDataset(op.path)
chunk_index = 0
out_chunks = []
for piece in dataset.pieces:
chunk_op = op.copy().reset_key()
chunk_... | https://github.com/mars-project/mars/issues/1780 | 20/12/13 13:13:40 WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable
hdfsOpenFile(hdfs://<hdfs_ip>:8020/user/test/parquet_test): FileSystem#open((Lorg/apache/hadoop/fs/Path;I)Lorg/apache/hadoop/fs/FSDataInputStream;) error:
RemoteException: ... | OSError |
def tile(cls, op):
if get_fs(op.path, op.storage_options).isdir(op.path):
return cls._tile_partitioned(op)
else:
return cls._tile_no_partitioned(op)
| def tile(cls, op):
if os.path.isdir(op.path):
return cls._tile_partitioned(op)
else:
return cls._tile_no_partitioned(op)
| https://github.com/mars-project/mars/issues/1780 | 20/12/13 13:13:40 WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable
hdfsOpenFile(hdfs://<hdfs_ip>:8020/user/test/parquet_test): FileSystem#open((Lorg/apache/hadoop/fs/Path;I)Lorg/apache/hadoop/fs/FSDataInputStream;) error:
RemoteException: ... | OSError |
def read_parquet(
path,
engine: str = "auto",
columns=None,
groups_as_chunks=False,
use_arrow_dtype=None,
incremental_index=False,
storage_options=None,
**kwargs,
):
"""
Load a parquet object from the file path, returning a DataFrame.
Parameters
----------
path : str... | def read_parquet(
path,
engine: str = "auto",
columns=None,
groups_as_chunks=False,
use_arrow_dtype=None,
incremental_index=False,
storage_options=None,
**kwargs,
):
"""
Load a parquet object from the file path, returning a DataFrame.
Parameters
----------
path : str... | https://github.com/mars-project/mars/issues/1780 | 20/12/13 13:13:40 WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable
hdfsOpenFile(hdfs://<hdfs_ip>:8020/user/test/parquet_test): FileSystem#open((Lorg/apache/hadoop/fs/Path;I)Lorg/apache/hadoop/fs/FSDataInputStream;) error:
RemoteException: ... | OSError |
def fetch_data(
self,
session_id,
tileable_key,
index_obj=None,
serial=True,
serial_type=None,
compressions=None,
pickle_protocol=None,
):
logger.debug("Fetching tileable data %s", tileable_key)
session_uid = SessionActor.gen_uid(session_id)
session_ref = self.get_actor_ref(s... | def fetch_data(
self,
session_id,
tileable_key,
index_obj=None,
serial=True,
serial_type=None,
compressions=None,
pickle_protocol=None,
):
session_uid = SessionActor.gen_uid(session_id)
session_ref = self.get_actor_ref(session_uid)
graph_ref = self.actor_client.actor_ref(
... | https://github.com/mars-project/mars/issues/1771 | Traceback (most recent call last):
File "/Users/wenjun.swj/miniconda3/lib/python3.8/site-packages/IPython/core/interactiveshell.py", line 3417, in run_code
exec(code_obj, self.user_global_ns, self.user_ns)
File "<ipython-input-9-60fd09690beb>", line 1, in <module>
df[df[0] > 0.5].execute()
File "/Users/wenjun.swj/Code/... | TypeError |
def fetch_chunk_data(self, session_id, chunk_key, index_obj=None):
endpoints = self.chunk_meta_client.get_workers(session_id, chunk_key)
if endpoints is None:
raise KeyError(f"Chunk key {chunk_key} not exist in cluster")
source_endpoint = random.choice(endpoints)
logger.debug("Fetching chunk %s... | def fetch_chunk_data(self, session_id, chunk_key, index_obj=None):
endpoints = self.chunk_meta_client.get_workers(session_id, chunk_key)
if endpoints is None:
raise KeyError(f"Chunk key {chunk_key} not exist in cluster")
sender_ref = self.actor_client.actor_ref(
ResultSenderActor.default_uid... | https://github.com/mars-project/mars/issues/1771 | Traceback (most recent call last):
File "/Users/wenjun.swj/miniconda3/lib/python3.8/site-packages/IPython/core/interactiveshell.py", line 3417, in run_code
exec(code_obj, self.user_global_ns, self.user_ns)
File "<ipython-input-9-60fd09690beb>", line 1, in <module>
df[df[0] > 0.5].execute()
File "/Users/wenjun.swj/Code/... | TypeError |
def _get_chunk_index_min_max(index_chunks):
chunk_index_min_max = []
for chunk in index_chunks:
min_val = chunk.min_val
min_val_close = chunk.min_val_close
max_val = chunk.max_val
max_val_close = chunk.max_val_close
if min_val is None or max_val is None:
chunk... | def _get_chunk_index_min_max(index_chunks):
chunk_index_min_max = []
for chunk in index_chunks:
min_val = chunk.min_val
min_val_close = chunk.min_val_close
max_val = chunk.max_val
max_val_close = chunk.max_val_close
if min_val is None or max_val is None:
retur... | https://github.com/mars-project/mars/issues/1771 | Traceback (most recent call last):
File "/Users/wenjun.swj/miniconda3/lib/python3.8/site-packages/IPython/core/interactiveshell.py", line 3417, in run_code
exec(code_obj, self.user_global_ns, self.user_ns)
File "<ipython-input-9-60fd09690beb>", line 1, in <module>
df[df[0] > 0.5].execute()
File "/Users/wenjun.swj/Code/... | TypeError |
def _need_align_map(
input_chunk,
index_min_max,
column_min_max,
dummy_index_splits=False,
dummy_column_splits=False,
):
if isinstance(input_chunk, SERIES_CHUNK_TYPE):
if input_chunk.index_value is None:
return True
if input_chunk.index_value.min_max != index_min_max:... | def _need_align_map(
input_chunk,
index_min_max,
column_min_max,
dummy_index_splits=False,
dummy_column_splits=False,
):
if not dummy_index_splits:
assert not index_min_max[0] is None and not index_min_max[2] is None
if isinstance(input_chunk, SERIES_CHUNK_TYPE):
if input_chu... | https://github.com/mars-project/mars/issues/1771 | Traceback (most recent call last):
File "/Users/wenjun.swj/miniconda3/lib/python3.8/site-packages/IPython/core/interactiveshell.py", line 3417, in run_code
exec(code_obj, self.user_global_ns, self.user_ns)
File "<ipython-input-9-60fd09690beb>", line 1, in <module>
df[df[0] > 0.5].execute()
File "/Users/wenjun.swj/Code/... | TypeError |
def _install():
from ..core import DATAFRAME_TYPE, SERIES_TYPE, INDEX_TYPE
def _register_method(cls, name, func, wrapper=None):
if wrapper is None:
@functools.wraps(func)
def wrapper(df, *args, **kwargs):
return func(df, *args, **kwargs)
try:
... | def _install():
from ..core import DATAFRAME_TYPE, SERIES_TYPE, INDEX_TYPE
def _register_method(cls, name, func, wrapper=None):
if wrapper is None:
@functools.wraps(func)
def wrapper(df, *args, **kwargs):
return func(df, *args, **kwargs)
try:
... | https://github.com/mars-project/mars/issues/1771 | Traceback (most recent call last):
File "/Users/wenjun.swj/miniconda3/lib/python3.8/site-packages/IPython/core/interactiveshell.py", line 3417, in run_code
exec(code_obj, self.user_global_ns, self.user_ns)
File "<ipython-input-9-60fd09690beb>", line 1, in <module>
df[df[0] > 0.5].execute()
File "/Users/wenjun.swj/Code/... | TypeError |
def _tile_with_tensor(cls, op):
out = op.outputs[0]
axis = op.axis
if axis is None:
axis = 0
rhs_is_tensor = isinstance(op.rhs, TENSOR_TYPE)
tensor, other = (op.rhs, op.lhs) if rhs_is_tensor else (op.lhs, op.rhs)
if tensor.shape == other.shape:
tensor = tensor.rechunk(other.nspl... | def _tile_with_tensor(cls, op):
out = op.outputs[0]
axis = op.axis
rhs_is_tensor = isinstance(op.rhs, TENSOR_TYPE)
tensor, other = (op.rhs, op.lhs) if rhs_is_tensor else (op.lhs, op.rhs)
if tensor.shape == other.shape:
tensor = tensor.rechunk(other.nsplits)._inplace_tile()
else:
... | https://github.com/mars-project/mars/issues/1771 | Traceback (most recent call last):
File "/Users/wenjun.swj/miniconda3/lib/python3.8/site-packages/IPython/core/interactiveshell.py", line 3417, in run_code
exec(code_obj, self.user_global_ns, self.user_ns)
File "<ipython-input-9-60fd09690beb>", line 1, in <module>
df[df[0] > 0.5].execute()
File "/Users/wenjun.swj/Code/... | TypeError |
def __call__(self, df):
if self.col_names is not None:
# if col_names is a list, return a DataFrame, else return a Series
if isinstance(self._col_names, list):
dtypes = df.dtypes[self._col_names]
columns = parse_index(pd.Index(self._col_names), store_data=True)
re... | def __call__(self, df):
if self.col_names is not None:
# if col_names is a list, return a DataFrame, else return a Series
if isinstance(self._col_names, list):
dtypes = df.dtypes[self._col_names]
columns = parse_index(pd.Index(self._col_names), store_data=True)
re... | https://github.com/mars-project/mars/issues/1771 | Traceback (most recent call last):
File "/Users/wenjun.swj/miniconda3/lib/python3.8/site-packages/IPython/core/interactiveshell.py", line 3417, in run_code
exec(code_obj, self.user_global_ns, self.user_ns)
File "<ipython-input-9-60fd09690beb>", line 1, in <module>
df[df[0] > 0.5].execute()
File "/Users/wenjun.swj/Code/... | TypeError |
def tile_with_mask(cls, op):
in_df = op.inputs[0]
out_df = op.outputs[0]
out_chunks = []
if isinstance(op.mask, (SERIES_TYPE, DATAFRAME_TYPE, TENSOR_TYPE)):
mask = op.inputs[1]
if isinstance(op.mask, SERIES_TYPE):
nsplits, out_shape, df_chunks, mask_chunks = align_datafram... | def tile_with_mask(cls, op):
in_df = op.inputs[0]
out_df = op.outputs[0]
out_chunks = []
if isinstance(op.mask, (SERIES_TYPE, DATAFRAME_TYPE)):
mask = op.inputs[1]
if isinstance(op.mask, SERIES_TYPE):
nsplits, out_shape, df_chunks, mask_chunks = align_dataframe_series(
... | https://github.com/mars-project/mars/issues/1771 | Traceback (most recent call last):
File "/Users/wenjun.swj/miniconda3/lib/python3.8/site-packages/IPython/core/interactiveshell.py", line 3417, in run_code
exec(code_obj, self.user_global_ns, self.user_ns)
File "<ipython-input-9-60fd09690beb>", line 1, in <module>
df[df[0] > 0.5].execute()
File "/Users/wenjun.swj/Code/... | TypeError |
def execute(cls, ctx, op):
if op.mask is None:
df = ctx[op.inputs[0].key]
ctx[op.outputs[0].key] = df[op.col_names]
else:
df = ctx[op.inputs[0].key]
if isinstance(
op.mask, (SERIES_CHUNK_TYPE, DATAFRAME_CHUNK_TYPE, TENSOR_CHUNK_TYPE)
):
mask = ctx[... | def execute(cls, ctx, op):
if op.mask is None:
df = ctx[op.inputs[0].key]
ctx[op.outputs[0].key] = df[op.col_names]
else:
df = ctx[op.inputs[0].key]
if isinstance(op.mask, (SERIES_CHUNK_TYPE, DATAFRAME_CHUNK_TYPE)):
mask = ctx[op.inputs[1].key]
else:
... | https://github.com/mars-project/mars/issues/1771 | Traceback (most recent call last):
File "/Users/wenjun.swj/miniconda3/lib/python3.8/site-packages/IPython/core/interactiveshell.py", line 3417, in run_code
exec(code_obj, self.user_global_ns, self.user_ns)
File "<ipython-input-9-60fd09690beb>", line 1, in <module>
df[df[0] > 0.5].execute()
File "/Users/wenjun.swj/Code/... | TypeError |
def tile(cls, op: "DataFrameDropNA"):
in_df = op.inputs[0]
out_df = op.outputs[0]
# series tiling will go here
if len(in_df.chunk_shape) == 1 or in_df.chunk_shape[1] == 1:
return cls._tile_drop_directly(op)
subset_df = in_df
if op.subset:
subset_df = in_df[op.subset]._inplace_t... | def tile(cls, op: "DataFrameDropNA"):
in_df = op.inputs[0]
out_df = op.outputs[0]
if len(in_df.chunk_shape) == 1 or in_df.chunk_shape[1] == 1:
return cls._tile_drop_directly(op)
subset_df = in_df
if op.subset:
subset_df = in_df[op.subset]._inplace_tile()
count_series = subset_d... | https://github.com/mars-project/mars/issues/1771 | Traceback (most recent call last):
File "/Users/wenjun.swj/miniconda3/lib/python3.8/site-packages/IPython/core/interactiveshell.py", line 3417, in run_code
exec(code_obj, self.user_global_ns, self.user_ns)
File "<ipython-input-9-60fd09690beb>", line 1, in <module>
df[df[0] > 0.5].execute()
File "/Users/wenjun.swj/Code/... | TypeError |
def _call(self, x1, x2, out=None, where=None):
# check tensor ufunc, if x1 or x2 is not a tensor, e.g. Mars DataFrame
# which implements tensor ufunc, will delegate the computation
# to it if possible
ret = self._call_tensor_ufunc(x1, x2, out=out, where=where)
if ret is not None:
return ret
... | def _call(self, x1, x2, out=None, where=None):
x1, x2, out, where = self._process_inputs(x1, x2, out, where)
# check broadcast
x1_shape = () if np.isscalar(x1) else x1.shape
x2_shape = () if np.isscalar(x2) else x2.shape
shape = broadcast_shape(x1_shape, x2_shape)
order = self._calc_order(x1, x2... | https://github.com/mars-project/mars/issues/1771 | Traceback (most recent call last):
File "/Users/wenjun.swj/miniconda3/lib/python3.8/site-packages/IPython/core/interactiveshell.py", line 3417, in run_code
exec(code_obj, self.user_global_ns, self.user_ns)
File "<ipython-input-9-60fd09690beb>", line 1, in <module>
df[df[0] > 0.5].execute()
File "/Users/wenjun.swj/Code/... | TypeError |
def fetch_data(self, session_id, chunk_key, index_obj=None, compression_type=None):
logger.debug("Sending data %s from %s", chunk_key, self.uid)
if compression_type is None:
compression_type = dataserializer.CompressType(
options.worker.transfer_compression
)
if index_obj is None... | def fetch_data(self, session_id, chunk_key, index_obj=None, compression_type=None):
if compression_type is None:
compression_type = dataserializer.CompressType(
options.worker.transfer_compression
)
if index_obj is None:
if options.vineyard.socket:
target_devs = [... | https://github.com/mars-project/mars/issues/1771 | Traceback (most recent call last):
File "/Users/wenjun.swj/miniconda3/lib/python3.8/site-packages/IPython/core/interactiveshell.py", line 3417, in run_code
exec(code_obj, self.user_global_ns, self.user_ns)
File "<ipython-input-9-60fd09690beb>", line 1, in <module>
df[df[0] > 0.5].execute()
File "/Users/wenjun.swj/Code/... | TypeError |
def series_from_tensor(tensor, index=None, name=None, gpu=None, sparse=False):
if tensor.ndim > 1 or tensor.ndim <= 0:
raise TypeError(f"Not support create Series from {tensor.ndim} dims tensor")
gpu = tensor.op.gpu if gpu is None else gpu
op = SeriesFromTensor(dtype=tensor.dtype, gpu=gpu, sparse=sp... | def series_from_tensor(tensor, index=None, name=None, gpu=None, sparse=False):
if tensor.ndim > 1 or tensor.ndim <= 0:
raise TypeError(f"Not support create DataFrame from {tensor.ndim} dims tensor")
gpu = tensor.op.gpu if gpu is None else gpu
op = SeriesFromTensor(dtype=tensor.dtype, gpu=gpu, sparse... | https://github.com/mars-project/mars/issues/1754 | In [1]: import mars.dataframe as md
In [2]: import mars.tensor as mt
In [3]: df = md.DataFrame(mt.random.rand(10 ,3))
In [4]: df['a'] = df[0].mean()
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
<ipython-input-4... | TypeError |
def __call__(self, target: DataFrame, value):
inputs = [target]
if np.isscalar(value):
value_dtype = np.array(value).dtype
elif self._is_scalar_tensor(value):
inputs.append(value)
value_dtype = value.dtype
else:
if isinstance(value, (pd.Series, SERIES_TYPE)):
... | def __call__(self, target: DataFrame, value):
inputs = [target]
if np.isscalar(value):
value_dtype = np.array(value).dtype
else:
if isinstance(value, (pd.Series, SERIES_TYPE)):
value = asseries(value)
inputs.append(value)
value_dtype = value.dtype
... | https://github.com/mars-project/mars/issues/1754 | In [1]: import mars.dataframe as md
In [2]: import mars.tensor as mt
In [3]: df = md.DataFrame(mt.random.rand(10 ,3))
In [4]: df['a'] = df[0].mean()
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
<ipython-input-4... | TypeError |
def tile(cls, op):
out = op.outputs[0]
target = op.target
value = op.value
col = op.indexes
columns = target.columns_value.to_pandas()
is_value_scalar = np.isscalar(value) or cls._is_scalar_tensor(value)
if not is_value_scalar:
# check if all chunk's index_value are identical
... | def tile(cls, op):
out = op.outputs[0]
target = op.target
value = op.value
col = op.indexes
columns = target.columns_value.to_pandas()
if not np.isscalar(value):
# check if all chunk's index_value are identical
target_chunk_index_values = [
c.index_value for c in tar... | https://github.com/mars-project/mars/issues/1754 | In [1]: import mars.dataframe as md
In [2]: import mars.tensor as mt
In [3]: df = md.DataFrame(mt.random.rand(10 ,3))
In [4]: df['a'] = df[0].mean()
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
<ipython-input-4... | TypeError |
def _gen_shuffle_chunks(cls, op, in_df, chunks):
# generate map chunks
map_chunks = []
chunk_shape = (in_df.chunk_shape[0], 1)
for chunk in chunks:
# no longer consider as_index=False for the intermediate phases,
# will do reset_index at last if so
map_op = DataFrameGroupByOperan... | def _gen_shuffle_chunks(cls, op, in_df, chunks):
# generate map chunks
map_chunks = []
chunk_shape = (in_df.chunk_shape[0], 1)
for chunk in chunks:
# no longer consider as_index=False for the intermediate phases,
# will do reset_index at last if so
map_op = DataFrameGroupByOperan... | https://github.com/mars-project/mars/issues/1741 | 2020-12-02 11:19:40,309 mars.scheduler.operands.common 87 ERROR Attempt 1: Unexpected error KeyError occurred in executing operand 5c7a3b06d448300987640036d2f5a34e in 11.238.145.234:49708
Traceback (most recent call last):
File "/home/admin/work/_public-mars-0.5.5.zip/mars/promise.py", line 378, in _wrapped
return f... | KeyError |
def execute_map(cls, ctx, op):
is_dataframe_obj = op.is_dataframe_obj
by = op.by
chunk = op.outputs[0]
df = ctx[op.inputs[0].key]
deliver_by = False # output by for the upcoming process
if isinstance(by, list):
new_by = []
for v in by:
if isinstance(v, Base):
... | def execute_map(cls, ctx, op):
is_dataframe_obj = op.is_dataframe_obj
by = op.by
chunk = op.outputs[0]
df = ctx[op.inputs[0].key]
deliver_by = False # output by for the upcoming process
if isinstance(by, list):
new_by = []
for v in by:
if isinstance(v, Base):
... | https://github.com/mars-project/mars/issues/1741 | 2020-12-02 11:19:40,309 mars.scheduler.operands.common 87 ERROR Attempt 1: Unexpected error KeyError occurred in executing operand 5c7a3b06d448300987640036d2f5a34e in 11.238.145.234:49708
Traceback (most recent call last):
File "/home/admin/work/_public-mars-0.5.5.zip/mars/promise.py", line 378, in _wrapped
return f... | KeyError |
def _tile_head_tail(cls, op):
from ..merge import DataFrameConcat
inp = op.input
out = op.outputs[0]
combine_size = options.combine_size
chunks = inp.chunks
new_chunks = []
for c in chunks:
chunk_op = op.copy().reset_key()
params = out.params
params["index"] = c.in... | def _tile_head_tail(cls, op):
from ..merge import DataFrameConcat
inp = op.input
out = op.outputs[0]
combine_size = options.combine_size
chunks = inp.chunks
new_chunks = []
for c in chunks:
chunk_op = op.copy().reset_key()
params = out.params
params["index"] = c.in... | https://github.com/mars-project/mars/issues/1741 | 2020-12-02 11:19:40,309 mars.scheduler.operands.common 87 ERROR Attempt 1: Unexpected error KeyError occurred in executing operand 5c7a3b06d448300987640036d2f5a34e in 11.238.145.234:49708
Traceback (most recent call last):
File "/home/admin/work/_public-mars-0.5.5.zip/mars/promise.py", line 378, in _wrapped
return f... | KeyError |
def add_finished_terminal(self, op_key, final_state=None, exc=None):
"""
Add a terminal operand to finished set. Calling this method
will change graph state if all terminals are in finished states.
:param op_key: operand key
:param final_state: state of the operand
"""
if self._state not in ... | def add_finished_terminal(self, op_key, final_state=None, exc=None):
"""
Add a terminal operand to finished set. Calling this method
will change graph state if all terminals are in finished states.
:param op_key: operand key
:param final_state: state of the operand
"""
if self._state not in ... | https://github.com/mars-project/mars/issues/1741 | 2020-12-02 11:19:40,309 mars.scheduler.operands.common 87 ERROR Attempt 1: Unexpected error KeyError occurred in executing operand 5c7a3b06d448300987640036d2f5a34e in 11.238.145.234:49708
Traceback (most recent call last):
File "/home/admin/work/_public-mars-0.5.5.zip/mars/promise.py", line 378, in _wrapped
return f... | KeyError |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.