新增 随机池种类递减(把新增的类型从随机池中剔除) 随机池中剔除Socks
This commit is contained in:
@@ -298,9 +298,11 @@ class AsyncStylistAgent:
|
||||
stylist_item = []
|
||||
stylist_item_ids = []
|
||||
|
||||
# 初始过滤类别
|
||||
filter_items = [
|
||||
{"item_group_id": {"$ne": "Clothing"}},
|
||||
{"item_group_id": {"$ne": "Shoes"}},
|
||||
{"category": {"$ne": "Socks"}},
|
||||
{"modality": "image"}
|
||||
]
|
||||
random_items = []
|
||||
@@ -324,12 +326,12 @@ class AsyncStylistAgent:
|
||||
logger.info(f"random_poll 数量: {len(random_poll)}")
|
||||
|
||||
item = self.local_db.random_get_accessories(random.choice(random_poll))
|
||||
# 如果随机选中了包类 则所有包类别都过滤掉
|
||||
if item['metadatas'][0]['category'] in ['Shopping Totes', 'Handbags', 'Backpacks', 'Briefcases']:
|
||||
filter_items.append({"category": {"$ne": "Shopping Totes"}})
|
||||
filter_items.append({"category": {"$ne": "Handbags"}})
|
||||
filter_items.append({"category": {"$ne": "Backpacks"}})
|
||||
filter_items.append({"category": {"$ne": "Briefcases"}})
|
||||
filter_items.append({"category": {"$ne": "Socks"}})
|
||||
else:
|
||||
filter_items.append({"category": {"$ne": item['metadatas'][0]['category']}})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user