mirror of
https://github.com/hpcaitech/ColossalAI.git
synced 2025-06-20 12:43:55 +00:00
* Add ColossalEval * Delete evaluate in Chat --------- Co-authored-by: Xu Yuanchen <yuanchen.xu00@gmail.com> Co-authored-by: Tong Li <tong.li352711588@gmail.com>
9 lines
287 B
Python
9 lines
287 B
Python
def get_data_per_category(data, categories):
|
|
data_per_category = {category: [] for category in categories}
|
|
for item in data:
|
|
category = item["category"]
|
|
if category in categories:
|
|
data_per_category[category].append(item)
|
|
|
|
return data_per_category
|