Skip to content

Commit

Permalink
FEAT-#7249: Add reload_modin feature (#7280)
Browse files Browse the repository at this point in the history
Signed-off-by: Igoshev, Iaroslav <iaroslav.igoshev@intel.com>
  • Loading branch information
YarShev authored Jun 15, 2024
1 parent 061a934 commit 2d46ab3
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 @@ -944,3 +944,17 @@ def __init__(self, func: Any):

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


def reload_modin() -> None:
"""
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 name, module in modules.items():
if name.startswith("modin"):
importlib.reload(module)

0 comments on commit 2d46ab3

Please sign in to comment.