Skip to content

Commit

Permalink
register pickle functions as proxy funcs
Browse files Browse the repository at this point in the history
  • Loading branch information
Matt711 committed Jun 27, 2024
1 parent fa8284d commit a6375a0
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions python/cudf/cudf/pandas/_wrappers/pandas.py
Original file line number Diff line number Diff line change
Expand Up @@ -891,6 +891,28 @@ def Index__new__(cls, *args, **kwargs):

_eval_func = _FunctionProxy(_Unusable(), pd.eval)

_read_pickle_func = _FunctionProxy(_Unusable(), pd.read_pickle)

_to_pickle_func = _FunctionProxy(_Unusable(), pd.to_pickle)

@register_proxy_func(pd.read_pickle)
def _read_pickle(
filepath_or_buffer,
compression = "infer",
storage_options = None,
):
return _read_pickle_func(filepath_or_buffer, compression, storage_options)


@register_proxy_func(pd.to_pickle)
def _to_pickle(
*args,
**kwargs,
):
return _to_pickle_func(
*args,
**kwargs,
)

def _get_eval_locals_and_globals(level, local_dict=None, global_dict=None):
frame = sys._getframe(level + 3)
Expand Down

0 comments on commit a6375a0

Please sign in to comment.