Skip to content

Commit

Permalink
FEAT-modin-project#7249: Add reload_modin feature
Browse files Browse the repository at this point in the history
Signed-off-by: Igoshev, Iaroslav <[email protected]>
  • Loading branch information
YarShev committed May 17, 2024
1 parent 685f7ba commit 1cf82e6
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions modin/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -878,3 +878,17 @@ def __init__(self, func: Any):

def __get__(self, instance: Any, owner: Any) -> Any: # noqa: GL08
return self.fget(owner)


def reload_modin():
"""
Reload all previously imported Modin modules.
The call to this function is required
if an execution engine has been shut down and
is going to be started up once again.
"""
modules = sys.modules.copy()
for key, module in modules.items():
if key.startswith("modin"):
importlib.reload(module)

0 comments on commit 1cf82e6

Please sign in to comment.