Skip to content

Commit

Permalink
compress samples on disk in predict.py
Browse files Browse the repository at this point in the history
  • Loading branch information
henryaddison committed Aug 3, 2024
1 parent 5b8268e commit f6a7cd0
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions bin/predict.py
Original file line number Diff line number Diff line change
Expand Up @@ -276,6 +276,8 @@ def main(
output_filepath = output_dirpath / f"predictions-{shortuuid.uuid()}.nc"

logger.info(f"Saving samples to {output_filepath}...")
for varname in xr_samples.data_vars:
xr_samples[varname].encoding.update(zlib=True, complevel=5)
xr_samples.to_netcdf(output_filepath)


Expand Down

0 comments on commit f6a7cd0

Please sign in to comment.