Unverified Commit c2e75b3c authored by Ning Xie's avatar Ning Xie Committed by GitHub
Browse files

remove duplicate code within cleanup_dist_env_and_memory (#22147)


Signed-off-by: default avatarAndy Xie <andy.xning@gmail.com>
parent 0d7db16a
......@@ -1238,8 +1238,6 @@ def destroy_distributed_environment():
def cleanup_dist_env_and_memory(shutdown_ray: bool = False):
destroy_model_parallel()
destroy_distributed_environment()
with contextlib.suppress(AssertionError):
torch.distributed.destroy_process_group()
if shutdown_ray:
import ray # Lazy import Ray
ray.shutdown()
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment