Open ravihammond opened 2 years ago
I have encountered similar problems multiple times when having multithread, torchscript and print in torchscript. Unfortunately I don’t know how to fix it. But if you reduce the number of thread to 1, the print should work. This may be helpful to debug.
On Thu, Sep 22, 2022 at 6:28 AM Ravi Hammond @.***> wrote:
I'm trying to print to the terminal inside the r2d2 act() function https://github.com/facebookresearch/off-belief-learning/blob/ce8e4fdbdb75aac317568c507fd801af51b286ca/pyhanabi/r2d2.py#L161. Whilst training using selfplay.py https://github.com/facebookresearch/off-belief-learning/blob/main/pyhanabi/selfplay.py, the act group that generates data are successfully printing, however, when I run the eval_model.py https://github.com/facebookresearch/off-belief-learning/blob/main/pyhanabi/tools/eval_model.py script, the program is freezing when calling runner_->get("act") https://github.com/facebookresearch/off-belief-learning/blob/main/pyhanabi/tools/eval_model.py .
Would you have any idea why this is happening, and how I can fix it from freezing? I would like to run some print statements within torchscript during eval mode.
— Reply to this email directly, view it on GitHub https://github.com/facebookresearch/off-belief-learning/issues/13, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABECKZJZ7W767AOVMQBCALLV7PU6LANCNFSM6AAAAAAQSV6RGY . You are receiving this because you are subscribed to this thread.Message ID: @.***>
I'm trying to print to the terminal inside the r2d2 act() function. Whilst training using selfplay.py, the act group that generates data are successfully printing, however, when I run the eval_model.py script, the program is freezing when calling runner_->get("act").
Would you have any idea why this is happening, and how I can fix it from freezing? I would like to run some print statements within torchscript during eval mode.