Hmm actually I just read code, and I think ray.is_initialized() is guaranteed to be False if you called ray.shutdown(). And it looks like we reset all the states when shutdown is returned. But it doesn’t guarantee all states are reset when ray.shutdown() is returned. For example, some of worker procs are probably still alive when ray.shutdown is returned (however, they will be cleaned up very soon)