Skip to content

Commit

Permalink
fix generator call
Browse files Browse the repository at this point in the history
  • Loading branch information
haolin-nju committed Dec 27, 2024
1 parent 7c75953 commit 44b5544
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion chatlearn/utils/dist_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ def bucket_tensor_generator(tensor_generator, bucket_size_mb):
"""
size_limit = bucket_size_mb * 1024 * 1024
buf_dict = defaultdict(lambda: [[], 0])
for tensor in tensor_generator:
for tensor in tensor_generator():
if tensor.is_sparse:
yield tensor, False
continue
Expand Down

0 comments on commit 44b5544

Please sign in to comment.