[checkpointio] fix async io (#6155)

This commit is contained in:
flybird11111
2024-12-16 10:36:28 +08:00
committed by GitHub
parent de3d371f65
commit e994c64568
2 changed files with 2 additions and 3 deletions

View File

@@ -19,7 +19,6 @@ from colossalai.tensor.d_tensor import (
to_global,
to_global_for_customized_distributed_tensor,
)
from colossalai.utils.safetensors import move_and_save
SAFE_WEIGHTS_NAME = "model.safetensors"
WEIGHTS_NAME = "pytorch_model.bin"
@@ -289,6 +288,7 @@ def async_save_state_dict_shards(
Returns:
int: the total size of shards
"""
from colossalai.utils.safetensors import move_and_save
total_size = 0
shard_filenames = []