How to print at only one worker???
怎么样只print一次呢?调试的时候想看一下数据结构,但是每次都会所有worker一起print,太乱了 how to perform "print" on only one worker??? everytime try to print something to check out the data structure, all the ray workers start to print. SO MESSSSSSYYYYYYY!!! :(
You may try export RAY_DEDUP_LOGS=1 before running the experiment.
If dedup does not work, I think you could do something like
if distributed.get_rank() == 0:
# do something
Alternatively you could use Ray distributed debugger to look at the data during runtime.
You may try
export RAY_DEDUP_LOGS=1before running the experiment. i tried but no good qwq perhaps i did sth wrong.. but thank u for ur kindness
If dedup does not work, I think you could do something like
if distributed.get_rank() == 0: # do somethingAlternatively you could use Ray distributed debugger to look at the data during runtime.
it works!! really helpful