[RLlib] Resources freed after trainer.stop()

Raoul K. asked this on the Slack channel:

What is the recommended way to wait for a trainer.stop
I noticed that if I do:

trainer = PPOTrainer(config)
print(ray.available_resources())
trainer.stop()
print(ray.available_resources())

the resources wont be free yet
but if i add a time.sleep(1) the resources will finally be freed up.

3 Likes