Skip to content

Commit

Permalink
Add docstrings
Browse files Browse the repository at this point in the history
Signed-off-by: Igoshev, Iaroslav <[email protected]>
  • Loading branch information
YarShev committed Apr 24, 2024
1 parent 1955c72 commit 6175037
Show file tree
Hide file tree
Showing 3 changed files with 57 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,25 @@ def from_map(cls, func, iterable, *args, **kwargs):
return cls.query_compiler_cls(cls.frame_cls(partitions))


def deploy_map_func(func, obj, *args, **kwargs):
def deploy_map_func(func, obj, *args, **kwargs): # pragma: no cover
"""
Deploy a func to apply to an object.
Parameters
----------
func : callable
Function to map across the iterable object.
obj : object
An object to apply a function to.
*args : tuple
Positional arguments to pass in `func`.
**kwargs : dict
Keyword arguments to pass in `func`.
Returns
-------
pandas.DataFrame
"""
result = func(obj, *args, **kwargs)
if not isinstance(result, pandas.DataFrame):
result = pandas.DataFrame(result)
Expand Down
20 changes: 19 additions & 1 deletion modin/core/execution/ray/implementations/pandas_on_ray/io/io.py
Original file line number Diff line number Diff line change
Expand Up @@ -345,7 +345,25 @@ def from_map(cls, func, iterable, *args, **kwargs):


@ray.remote
def deploy_map_func(func, obj, *args, **kwargs):
def deploy_map_func(func, obj, *args, **kwargs): # pragma: no cover
"""
Deploy a func to apply to an object.
Parameters
----------
func : callable
Function to map across the iterable object.
obj : object
An object to apply a function to.
*args : tuple
Positional arguments to pass in `func`.
**kwargs : dict
Keyword arguments to pass in `func`.
Returns
-------
pandas.DataFrame
"""
result = func(obj, *args, **kwargs)
if not isinstance(result, pandas.DataFrame):
result = pandas.DataFrame(result)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,25 @@ def from_map(cls, func, iterable, *args, **kwargs):


@unidist.remote
def deploy_map_func(func, obj, *args, **kwargs):
def deploy_map_func(func, obj, *args, **kwargs): # pragma: no cover
"""
Deploy a func to apply to an object.
Parameters
----------
func : callable
Function to map across the iterable object.
obj : object
An object to apply a function to.
*args : tuple
Positional arguments to pass in `func`.
**kwargs : dict
Keyword arguments to pass in `func`.
Returns
-------
pandas.DataFrame
"""
result = func(obj, *args, **kwargs)
if not isinstance(result, pandas.DataFrame):
result = pandas.DataFrame(result)
Expand Down

0 comments on commit 6175037

Please sign in to comment.