xorbitsai / xorbits

Scalable Python DS & ML, in an API compatible & lightning fast way.
https://xorbits.readthedocs.io
Apache License 2.0
1.13k stars 69 forks source link

BUG: pd.read_pickle returns an object, we should adapt output type according to real data #592

Closed qinxuye closed 1 year ago

qinxuye commented 1 year ago

Describe the bug

pd.read_pickle returns an object, we should adapt output type according to real data

To Reproduce

To help us to reproduce this bug, please provide information below:

In [6]: import xorbits.pandas as pd

In [7]: df = pd.read_pickle('my.pickle')
/Users/xuyeqin/Workspace/xorbits/python/xorbits/core/utils/fallback.py:35: RuntimeWarning: xorbits.pandas.read_pickle will fallback to Pandas
  warnings.warn(warning_str, RuntimeWarning)
/Users/xuyeqin/Workspace/xorbits/python/xorbits/_mars/deploy/oscar/session.py:1873: UserWarning: No existing session found, creating a new local session now.
  warnings.warn(warning_msg)
2023-07-11 13:36:00,892 xorbits._mars.deploy.oscar.local 35123 WARNING  Web service started at http://0.0.0.0:49928
100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 100.00/100 [00:00<00:00, 338.48it/s]

In [8]: df
Out[8]: Object <op=RemoteFunction, key=dbfcf1160b5ff4f721d4158ffb5c6bff_0>
  1. Your Python version
  2. The version of Xorbits you use
  3. Versions of crucial packages, such as numpy, scipy and pandas
  4. Full stack of the error.
  5. Minimized code to reproduce the error.

Additional context

Returning object is introduced in #484

aresnow1 commented 1 year ago

Should be closed by #598