Commit 656388d7 authored by 赵威's avatar 赵威

update device id

parent bc2780f3
......@@ -20,6 +20,7 @@ TAG_EMBEDDING_DICT = redis_client_db.hgetall("personas_tags_embedding")
@bind("strategy_embedding/personas_vector/match")
def match_tractate_by_device(device_id, n=10):
try:
if device_id not in ["0", "unknown"]:
time_begin = time.time()
business_tags = get_user_portrait_tag3_from_redis(device_id, tags_num=4).get("business_tags", [])
# business_tags = ["假体下巴", "你好", "假体隆胸"]
......@@ -37,6 +38,7 @@ def match_tractate_by_device(device_id, n=10):
send_performance_msg_to_dingtalk("match_tractate_by_device {} n={} cost {:.3f}ms".format(
device_id, n, time_end * 1000))
return res
return []
except Exception as e:
send_msg_to_dingtalk(str(traceback.format_exc()))
return []
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment