Debug with local_mode=False

Hey @ColdFrenzy , for distributed debugging Ray comes with pdb integration: https://docs.ray.io/en/latest/ray-observability/ray-debugging.html

This is needed since Ray is managing multiple worker processes possibly across multiple machines. The distributed debugger will allow you to use breakpoints in a similar way with Ray.

  1. The fact that ray runs on multiple processes when local_mode=False is something that could give me problems or I can just build my application in local mode and then run it without the local mode?

We recommend generally not using local mode. Usually the distributed debugger should provide a better experience (local mode was added before this was available). Most Ray users run Ray in normal mode even when developing on a laptop / single machine.

  1. If the two modes are different, what are their main differences? and there is a way to debug in local_mode=False?

In local mode, parallel execution is completely disabled, and Ray tries to run everything in a single process.

1 Like