@jiaoja@Replace usage of list() with []

This commit is contained in:
jiaoja 2024-03-19 17:26:36 +08:00
parent d6d9447e2d
commit a54c53b059

View File

@ -83,7 +83,7 @@ def fast_pickle(obj: Any, path: str) -> None:
def load_tensors(shaped_arrays, directory, mesh_config, tensor_indices=None): def load_tensors(shaped_arrays, directory, mesh_config, tensor_indices=None):
"""Loads a set of arrays.""" """Loads a set of arrays."""
pool = ThreadPoolExecutor(max_workers=32) pool = ThreadPoolExecutor(max_workers=32)
fs = list() fs = []
num_tensors = 0 num_tensors = 0
num_replicas = 1 num_replicas = 1
data_model_shards = math.prod(mesh_config) data_model_shards = math.prod(mesh_config)