Skip to content

Commit 1464b94

Browse files
author
Cedric Richter
committed
Save slcs in compressed form
1 parent a8b87cd commit 1464b94

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

run_slc_process.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,11 +100,11 @@ def _update_handler(self):
100100
need_update = self.file_handler is None or self.object_count >= self.num_objects
101101
if not need_update: return
102102

103-
file_path = os.path.join(self.save_dir, "file-%d.jsonl" % self.file_count)
103+
file_path = os.path.join(self.save_dir, "file-%d.jsonl.gz" % self.file_count)
104104

105105
if self.file_handler is not None: self.file_handler.close()
106106

107-
self.file_handler = open(file_path, "wb")
107+
self.file_handler = gzip.open(file_path, "wb")
108108
self.file_count += 1
109109
self.object_count = 0
110110

0 commit comments

Comments
 (0)