Newline problem of Monitor's ResultsWriter in Windows environments
See original GitHub issuehttps://github.com/DLR-RM/stable-baselines3/blob/e24147390d2ce3b39cafc954e079d693a1971330/stable_baselines3/common/monitor.py#L181
When running the codes in Windows environments, the logged csv files end each line with \r\r\n
, making empty lines between data lines.
From Python 3 documentation, adding newline=''
as an argument of the open
function seems able to solve the problem.
https://docs.python.org/3/library/csv.html#examples
Issue Analytics
- State:
- Created 2 years ago
- Comments:13 (7 by maintainers)
Top Results From Across the Web
stable_baselines3.common.monitor - Stable Baselines3
Wrapper): """ A monitor wrapper for Gym environments, it is used to know the episode reward, length, time and other data. :param env:...
Read more >Plotting Documentation #356 - DLR-RM/stable-baselines3
We need to document: plotting training reward/success (using monitor file) ... Newline problem of Monitor's ResultsWriter in Windows environments #692.
Read more >Troubleshoot external monitor connections in Windows 10
Troubleshoot issues that occur when setting up external monitors. If you are trying to set up an external monitor and it's not working,...
Read more >User Manual | Newline Interactive
windows, or outdoor environments that experience rain, snow, or other harsh weather. Avoid installation near hot spring vapor. The preceding environments ...
Read more >How to setup touch extended mode in Windows
Issue: Touch screen is not functioning as expected when Windows computer is in extended mode · **For MacOS visit: Helpdesk : Newline Interactive ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
What I meant is that all lines end with only a single “\n”, so this (the quoted part) might do the trick unless rest of the code adds additional “\n” or other characters into the mix 😃.
I would disagree with that. Using tensorboard or simply
python scripts/plot_train.py -a ppo -e Cartpole -f logs/ -w 100
from the RL Zoo are two convenient options. They also handle multi envs properly.