Skip to content

Commit 04bff14

Browse files
rllinmary-lau
authored andcommitted
Smaller shards for sharded tensors (#20)
Summary: google cloud storage seems to prefer files closer to 100 MB than 1 GB and has less errors like googleapis/google-cloud-ruby#2516 `BrokenPipeError` is not caught by `google-cloud-storage`'s native retry capabilities. Pull Request resolved: #20 Reviewed By: edward-io Differential Revision: D37273001 Pulled By: yifuwang fbshipit-source-id: d7bbf8c796fcdc3d2afea558295bf449cac08682
1 parent c66eb9b commit 04bff14

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

torchsnapshot/io_preparer.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535

3636

3737
class ShardedTensorIOPreparer:
38-
DEFAULT_MAX_SHARD_SIZE_BYTES: int = 1 * 1024 * 1024 * 1024
38+
DEFAULT_MAX_SHARD_SIZE_BYTES: int = 512 * 1024 * 1024
3939

4040
@staticmethod
4141
def subdivide_shard(

0 commit comments

Comments
 (0)