Skip to content

Commit 2e3b3ec

Browse files
committed
Fixing events.csv compression: do not compress at the end of the train episodes, compress only after test run has also completed, because test run will need to append to same events.csv file.
1 parent ec6219a commit 2e3b3ec

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

aintelope/experiments.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,11 @@ def run_experiment(
8888
else:
8989
lzma_events_log = False
9090
events = recording.EventLog(
91-
experiment_dir, events_fname, events_columns, lzma_log=lzma_events_log
91+
experiment_dir,
92+
events_fname,
93+
events_columns,
94+
# NB! compress the log only after test has run, else if were already compressed after train, opening the CSV log during test would create a new file (instead of appending) and then at the end of the test, compressing that new CSV file would just overwrite the already existing compressed (training) log
95+
lzma_log=lzma_events_log and test_mode,
9296
)
9397

9498
# Common trainer for each agent's models

0 commit comments

Comments
 (0)