Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions nemo_rl/distributed/virtual_cluster.py
Original file line number Diff line number Diff line change
Expand Up @@ -1018,6 +1018,11 @@ def shutdown(self) -> bool:

This method is idempotent and can be safely called multiple times.
"""
# Skip if Ray is already gone (typically from __del__ during _Py_Finalize
# after Ray's atexit teardown). Any Ray API call would trigger a fatal
# core_worker_process.cc:88 CHECK. Placement groups die with Ray.
if not ray.is_initialized():
return True
if self._node_placement_groups is not None:
# Remove all placement groups
for pg in self._node_placement_groups:
Expand Down
Loading