How to print the training progress while usign Tune?

In older version of Ray, namely 1.6, tune.run() was autmatically reporting to the CLI the training results. For example, in the case of PPO, the printed statemetns were somethign like this:

"Result for PPO:
agent_timesteps_total: 3000
date: 27-07-2023
done: false
episode_len_mean: 105.444
episode_reward_max: 10.113
hostname: localhost
info:
learner:
etc …
"

Now, after adapting my code to Ray 2.5.1, I cannot print this information. I config In older version of Ray, namely 1.6, tune.run() was autmatically reporting to the CLI the trainign results. For example, in the case of PPO, the printed statemetns were somethign like this:

Result for PPO:
agent_timesteps_total: 3000
date: 27-07-2023
done: false
episode_len_mean: 105.444
episode_reward_max: 10.113
hostanme: localhost
info:
learner:
etc …

Now, after adapting my code to Ray 2.5.1, I cannot print this information. For this version, I instantiate a ray.tune.Tuner() object (see example from docs ray.tune.Tuner — Ray 2.6.1) and then run it with tuner.fit(). Aiming to print the progress, I tried customizing a CLIReporter() and setting verbose = 2 in air.RunConfig() but it did not produce any extra printing/logging.

Does anybody know how I can print the training prgoress of my (PPO) algorithm in the above format or something very similar to it? I mention that I have to use ray.tune and a multi_agent custome environment (see . Thnak you!

How severe does this issue affect your experience of using Ray?

  • High: It blocks me to complete my task.

Hi,
Could you take a look at this issue and let us know if you can resolve it yourself?

Thank you for your very prompt response!

Unfortunately, even after setting os.environ[“RAY_AIR_NEW_OUTPUT”] = ‘0’ and os.environ[“RAY_AIR_RICH_LAYOUT”] = ‘1’ , the learning progress (reward, loss, etc.) is not shown.

Is there any tune.Tuner() config parameter that I would have to change? Or maybe the problem comes from PPO trainable, I use the ray/rllib version and I overwrite its config.

Best regards,

Vlad

This Item has been reviewed and was determined as not listed under German regulation, nor EU export controls, nor U.S. export controls. However, in the case of the item has to be resold, transferred, or otherwise disposed of to an embargoed country, to an end user of concern or in support of a prohibited end use, you may be required to obtain an export license.

~WRD0000.jpg

could you start with the working script you had before and just add os.environ[“RAY_AIR_NEW_OUTPUT”] = "0" and nothing else?

Hello,

If by the working script you mean the one using Ray 2.5, adding os.environ[“RAY_AIR_NEW_OUTPUT”] = "0" made no difference.

The way the output is printed looks exactly the same as before. ``

Is there anything else I could try?

Best,

Vlad

This Item has been reviewed and was determined as not listed under German regulation, nor EU export controls, nor U.S. export controls. However, in the case of the item has to be resold, transferred, or otherwise disposed of to an embargoed country, to an end user of concern or in support of a prohibited end use, you may be required to obtain an export license.

~WRD0000.jpg

ah I mean using the same script and change to ay 2.6.x and set the RAY_AIR_NEW_OUTPUT env var. Does it work?

OK, I have tried that once again. No change as nothing changes to the CLI output.

Just to make sure, my script is as follows:

  • set RAY_AIR_NEW_OUPUT=0

  • register custom multi-agent environnement

  • load trainer config & overwrite

  • add verbose = 1 to air.RunConfig()

  • define ray.tune.Tuner() using the above trainer config and RunConfig()

  • tuner.fit() to start training

Would you suggest any other solution? How can I check if the policy/critic models are actually updated within the tuner.fit() loop?

This Item has been reviewed and was determined as not listed under German regulation, nor EU export controls, nor U.S. export controls. However, in the case of the item has to be resold, transferred, or otherwise disposed of to an embargoed country, to an end user of concern or in support of a prohibited end use, you may be required to obtain an export license.

~WRD0000.jpg

could you remove

" * add verbose = 1 to air.RunConfig()"?

Just use the exact same script that used to work on pre-2.6 and add RAY_AIR_NEW_OUPUT=0