Skip to content

Commit b8f6028

Browse files
committed
fix chunck size
1 parent 7ced22d commit b8f6028

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

fastchat/serve/monitor/clean_chat_data.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -146,13 +146,13 @@ def clean_chat_data(log_files, action_type, num_parallel):
146146
raw_data = []
147147
for data in file_data:
148148
raw_data.extend(data)
149-
raw_data = [r for r in raw_data if r is not None]
149+
raw_data = [r for r in raw_data if not (r is None)]
150150

151151
# Use the multiprocessing Pool
152152
with mp.Pool(num_parallel) as pool:
153153
func = partial(process_data, action_type=action_type)
154154
results = pool.map(
155-
func, raw_data, chunksize=ceil(len(log_files) / len(pool._pool))
155+
func, raw_data, chunksize=ceil(len(raw_data) / len(pool._pool))
156156
)
157157

158158
# Aggregate results from child processes

0 commit comments

Comments
 (0)