Skip to content

Commit

Permalink
Added compression to sl results
Browse files Browse the repository at this point in the history
  • Loading branch information
jw3il committed Jul 14, 2024
1 parent cba89a4 commit 231749b
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions src/sl.py
Original file line number Diff line number Diff line change
Expand Up @@ -554,6 +554,8 @@ def test(
with_regression = False
with_regression_all = True

export_complevel = 9

sequence_length = args.sequence_length

save_results_filename = args.filename
Expand Down Expand Up @@ -681,7 +683,7 @@ def validation_callback():
"Total Loss",
],
)
df_loss.to_hdf(save_results_filename, "loss", mode="a")
df_loss.to_hdf(save_results_filename, "loss", mode="a", complevel=export_complevel)

def validation_results_idx(idx):
return list(map(lambda x: x[idx], validation_results))
Expand All @@ -704,7 +706,9 @@ def validation_results_idx(idx):
"Regression Loss All",
],
)
df_validation.to_hdf(save_results_filename, "validation", mode="a")
df_validation.to_hdf(
save_results_filename, "validation", mode="a", complevel=export_complevel
)


print("Train data eval: ")
Expand Down Expand Up @@ -784,4 +788,6 @@ def test_sequence_results_idx(idx):
"Regression Loss All",
],
)
df_loss.to_hdf(save_results_filename, "results", mode="a")
df_loss.to_hdf(
save_results_filename, "results", mode="a", complevel=export_complevel
)

0 comments on commit 231749b

Please sign in to comment.