The `print` in the `compute_action` function of class `PPOTorchPolicy` have no output

When conducting PPO training in MARL, I want to use the print function to check the information output by the compute_action method of PPOTorchPolicy. However, there is no output. Could you please tell me what the reason is?

Here is my code for starting the training:

ray.init(
    ignore_reinit_error=True,
    num_cpus=N_CPUS,
    num_gpus=1,
    object_store_memory=2_000_000_000,  # 2 GB
    log_to_driver=True,
    logging_level="INFO"
)

# Run the training
tune.run(
    "PPO",
    config=config.to_dict(),
    stop={"training_iteration": 30},  # Adjust the number of iterations as needed
    log_to_file=True,  # 让 Ray 记录 Worker 输出
)

# Shutdown Ray
ray.shutdown()

You hid too much information, so it’d hard to check the problem.

Duplicate of Problem of using an LLM during PPO training