mirror of
https://github.com/saymrwulf/stable-baselines3.git
synced 2026-11-18 09:54:10 +00:00
Eliminate extra empty lines in CSV monitor files on Windows (DLR-RM#692) (#695)
* Added ``newline="\n"`` when opening CSV monitor files so that each line ends with ``\r\n`` instead of ``\r\r\n`` on Windows while Linux environments are not affected
This commit is contained in:
parent
e24147390d
commit
222a69ca49
2 changed files with 3 additions and 2 deletions
|
|
@ -37,6 +37,7 @@ Others:
|
||||||
^^^^^^^
|
^^^^^^^
|
||||||
- Added a warning in the env checker when not using ``np.float32`` for continuous actions
|
- Added a warning in the env checker when not using ``np.float32`` for continuous actions
|
||||||
- Improved test coverage and error message when checking shape of observation
|
- Improved test coverage and error message when checking shape of observation
|
||||||
|
- Added ``newline="\n"`` when opening CSV monitor files so that each line ends with ``\r\n`` instead of ``\r\r\n`` on Windows while Linux environments are not affected (@hsuehch)
|
||||||
|
|
||||||
Documentation:
|
Documentation:
|
||||||
^^^^^^^^^^^^^^
|
^^^^^^^^^^^^^^
|
||||||
|
|
@ -852,4 +853,4 @@ And all the contributors:
|
||||||
@ShangqunYu @PierreExeter @JacopoPan @ltbd78 @tom-doerr @Atlis @liusida @09tangriro @amy12xx @juancroldan
|
@ShangqunYu @PierreExeter @JacopoPan @ltbd78 @tom-doerr @Atlis @liusida @09tangriro @amy12xx @juancroldan
|
||||||
@benblack769 @bstee615 @c-rizz @skandermoalla @MihaiAnca13 @davidblom603 @ayeright @cyprienc
|
@benblack769 @bstee615 @c-rizz @skandermoalla @MihaiAnca13 @davidblom603 @ayeright @cyprienc
|
||||||
@wkirgsn @AechPro @CUN-bjy @batu @IljaAvadiev @timokau @kachayev @cleversonahum
|
@wkirgsn @AechPro @CUN-bjy @batu @IljaAvadiev @timokau @kachayev @cleversonahum
|
||||||
@eleurent @ac-93 @cove9988 @theDebugger811
|
@eleurent @ac-93 @cove9988 @theDebugger811 @hsuehch
|
||||||
|
|
|
||||||
|
|
@ -178,7 +178,7 @@ class ResultsWriter:
|
||||||
filename = os.path.join(filename, Monitor.EXT)
|
filename = os.path.join(filename, Monitor.EXT)
|
||||||
else:
|
else:
|
||||||
filename = filename + "." + Monitor.EXT
|
filename = filename + "." + Monitor.EXT
|
||||||
self.file_handler = open(filename, "wt")
|
self.file_handler = open(filename, "wt", newline="\n")
|
||||||
self.file_handler.write("#%s\n" % json.dumps(header))
|
self.file_handler.write("#%s\n" % json.dumps(header))
|
||||||
self.logger = csv.DictWriter(self.file_handler, fieldnames=("r", "l", "t") + extra_keys)
|
self.logger = csv.DictWriter(self.file_handler, fieldnames=("r", "l", "t") + extra_keys)
|
||||||
self.logger.writeheader()
|
self.logger.writeheader()
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue