Skip to content

Commit fc69164

Browse files
committed
use bytes instead of BytesIO for xet
1 parent 5ce5749 commit fc69164

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

pyspark_huggingface/huggingface_sink.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -213,10 +213,9 @@ def flush(writer: pq.ParquetWriter):
213213
f"{self.prefix}-{self.uuid}-part-{partition_id}-{num_files}.parquet"
214214
)
215215
num_files += 1
216-
parquet.seek(0)
217216

218217
addition = CommitOperationAdd(
219-
path_in_repo=name, path_or_fileobj=parquet
218+
path_in_repo=name, path_or_fileobj=parquet.getvalue()
220219
)
221220
api.preupload_lfs_files(
222221
repo_id=self.repo_id,

0 commit comments

Comments
 (0)