Skip to content

Commit

Permalink
FIX-#3741: Added delivery of the data argument to DataFrame construct…
Browse files Browse the repository at this point in the history
…or (#3742)

Signed-off-by: aleksandr.lozovskii <aleksandr.lozovskii@intel.com>
  • Loading branch information
Lozovskii-Aleksandr authored Dec 14, 2021
1 parent 1437dcf commit 2f7da1f
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 0 deletions.
1 change: 1 addition & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -603,6 +603,7 @@ jobs:
conda info
conda list
- run: python -m pytest --simulate-cloud=normal modin/pandas/test/test_io.py --verbose
- run: python -m pytest --simulate-cloud=normal modin/pandas/test/dataframe/test_default.py::test_kurt_kurtosis --verbose
- # When running without parameters, some of the tests fail
run: python -m pytest --simulate-cloud=normal modin/pandas/test/dataframe/test_binary.py::test_math_functions[add-rows-scalar]
- run: |
Expand Down
28 changes: 28 additions & 0 deletions modin/experimental/cloud/rpyc_proxy.py
Original file line number Diff line number Diff line change
Expand Up @@ -428,6 +428,13 @@ class Wrapper(override, origin_cls, metaclass=ProxyMeta):

def __init__(self, *a, __remote_end__=None, **kw):
if __remote_end__ is None:
try:
preprocess = object.__getattribute__(self, "_preprocess_init_args")
except AttributeError:
pass
else:
a, kw = preprocess(*a, **kw)

__remote_end__ = remote_cls(*a, **kw)
while True:
# unwrap the object if it's a wrapper
Expand Down Expand Up @@ -622,6 +629,27 @@ def iteritems(self):
ObtainingItems = _deliveringWrapper(Series, mixin=ObtainingItems)

class DataFrameOverrides(_prepare_loc_mixin()):
@classmethod
def _preprocess_init_args(
cls,
data=None,
index=None,
columns=None,
dtype=None,
copy=None,
query_compiler=None,
):

(data,) = conn.deliver((data,), {})[0]
return (), dict(
data=data,
index=index,
columns=columns,
dtype=dtype,
copy=copy,
query_compiler=query_compiler,
)

@property
def dtypes(self):
remote_dtypes = self.__remote_end__.dtypes
Expand Down

0 comments on commit 2f7da1f

Please sign in to comment.