@@ -273,31 +273,26 @@ def remap_pedigree_hash(remap_path: str, pedigree_path: str) -> hl.Int32Expressi
273
273
274
274
def checkpoint (
275
275
t : hl .Table | hl .MatrixTable ,
276
- repartition_factor : int = 1 ,
277
276
) -> tuple [hl .Table | hl .MatrixTable , str ]:
278
277
suffix = 'mt' if isinstance (t , hl .MatrixTable ) else 'ht'
279
278
read_fn = hl .read_matrix_table if isinstance (t , hl .MatrixTable ) else hl .read_table
280
279
checkpoint_path = os .path .join (
281
280
Env .HAIL_TMP_DIR ,
282
281
f'{ uuid .uuid4 ()} .{ suffix } ' ,
283
282
)
284
- t .write (checkpoint_path , repartition_factor = repartition_factor )
283
+ t .write (checkpoint_path )
285
284
return read_fn (checkpoint_path ), checkpoint_path
286
285
287
286
288
287
def write (
289
288
t : hl .Table | hl .MatrixTable ,
290
289
destination_path : str ,
291
290
repartition : bool = True ,
292
- # May be used to increase the number of partitions beyond
293
- # the optimally computed number. A higher number will
294
- # shard the table into more partitions.
295
- repartition_factor : int = 1 ,
296
291
) -> hl .Table | hl .MatrixTable :
297
292
t , path = checkpoint (t )
298
293
if repartition :
299
294
t = t .repartition (
300
- ( compute_hail_n_partitions (file_size_bytes (path )) * repartition_factor ),
295
+ compute_hail_n_partitions (file_size_bytes (path )),
301
296
shuffle = False ,
302
297
)
303
298
return t .write (destination_path , overwrite = True )
0 commit comments