verl icon indicating copy to clipboard operation
verl copied to clipboard

How to debug parallel ray

Open HarideP opened this issue 8 months ago • 8 comments
trafficstars

I am currently learning to use this library, I am not familiar with ray's parallel strategy, is there any way to debug this process (such as single-step running the large model generation process of training batches), or single-step running during the debug process.

HarideP avatar Feb 24 '25 02:02 HarideP

You can try ray distributed debugger

xffxff avatar Feb 24 '25 04:02 xffxff

@PeterSH6, would you mind adding a "ray" label to this issue? I am triaging Ray-related issues in veRL. Thanks!

kevin85421 avatar Feb 24 '25 18:02 kevin85421

  • Add a breakpoint() in your code where you want to stop execution.
  • Run the code and it will pause at the breakpoint.
  • Use ray debug in the terminal to enter the interactive PDB debugger.

huiyeruzhou avatar Feb 25 '25 06:02 huiyeruzhou

  • Use ray debug in the terminal to enter the interactive PDB debugger.

How can I interactively debug using Ray in the terminal? python -m pdb job.py?

jiezhangGt avatar Mar 20 '25 13:03 jiezhangGt

You can try ray distributed debugger

seems not work for me.... env: vscode/pycharm + ray debugger + remote ssh [docker]

yangluo23 avatar Apr 22 '25 09:04 yangluo23

You can try ray distributed debugger

seems not work for me.... env: vscode/pycharm + ray debugger + remote ssh [docker]

Have you find a solution ? I also meet the same question.

cocoJennie avatar May 27 '25 03:05 cocoJennie

I just gave up using Pycharm due to the firewall issue with my remote-server.. instead, I use Vscode now. It seems that Pycharm is not good for ray development... But you can follow this question.

yangluo23 avatar May 27 '25 03:05 yangluo23

Nice reply, thx. I just find #1474 also discuss a relevant question. May it helps.

cocoJennie avatar May 27 '25 03:05 cocoJennie