From 5768c86aaf35e3beed866ec32eac6b81aeb14456 Mon Sep 17 00:00:00 2001 From: hsafaei Date: Thu, 2 Jul 2026 10:32:59 +0330 Subject: [PATCH] v3 ... --- app/majles/majles_conflict_ranks_v3.py | 68 +++++++++----------------- app/majles/majles_conflict_works_v3.py | 18 +++++++ 2 files changed, 42 insertions(+), 44 deletions(-) diff --git a/app/majles/majles_conflict_ranks_v3.py b/app/majles/majles_conflict_ranks_v3.py index e59a443..19ba5d8 100644 --- a/app/majles/majles_conflict_ranks_v3.py +++ b/app/majles/majles_conflict_ranks_v3.py @@ -246,7 +246,7 @@ def re_compute_conflict_ranks(elastic, index_name, C_avg_su, C_avg_cd, C_avg_rt, dict_main_type_weight={ "yes" : 1, "no" : -1, - "yes_under_assumptions" : 1, + "yes_under_assumptions" : 0.8, "true" : 1, "false" : -1, @@ -272,59 +272,29 @@ dict_version_weight = { "subject_unitys" : { "oss120": 0.8, "gemma4": 1, - "oss120-v2": 1, - "gemma4-v3": 1.5, - "Magistral-Small-p3": 1, - "DeepSeek-R1-32B-p3": 1, - "Qwen3-80B-p3": 1.2, - "Qwen3.6-35B-p3": 1.2, - "gemma-4-p3": 1.5, - "gpt-oss-120b-p3": 1, - "gpt-oss-20b-p3": 0.8, - "openyourmind": 1, "qwen3-6": 1, - "gemma4-p2": 1, - "oss120-p2": 1, - "qwen3-6-p2": 1.2, - "yourmind-p3": 1 + "deepseek": 1, + "qwopus4_6": 1, + "qwen3_5_122B": 1, + "openyourmind": 1, }, "conflict_detections" : { "oss120": 0.8, "gemma4": 1, - "oss120-v2": 1, - "gemma4-v3": 1.2, - "Magistral-Small-p3": 1.2, - "DeepSeek-R1-32B-p3": 1, - "Qwen3-80B-p3": 1.4, - "Qwen3.6-35B-p3": 1.4, - "gemma-4-p3": 1.2, - "gpt-oss-120b-p3": 1, - "gpt-oss-20b-p3": 0.8, - "openyourmind": 1.2, "qwen3-6": 1, - "gemma4-p2": 1, - "oss120-p2": 1, - "qwen3-6-p2": 1, - "yourmind-p3": 1.2 + "deepseek": 1, + "qwopus4_6": 1, + "qwen3_5_122B": 1, + "openyourmind": 1.2, }, "relation_identifications" : { "oss120": 0.8, "gemma4": 1, - "oss120-v2": 0.8, - "gemma4-v3": 1, - "Magistral-Small-p3": 1, - "DeepSeek-R1-32B-p3": 1, - "Qwen3-80B-p3": 1.2, - "Qwen3.6-35B-p3": 1.2, - "gemma-4-p3": 1, - "gpt-oss-120b-p3": 1, - "gpt-oss-20b-p3": 0.5, - "openyourmind": 1, "qwen3-6": 1, - "gemma4-p2": 1, - "oss120-p2": 1, - "qwen3-6-p2": 1, - "yourmind-p3": 1 + "deepseek": 1, + "qwopus4_6": 1, + "qwen3_5_122B": 1, + "openyourmind": 1, } } @@ -377,7 +347,7 @@ body={ } } -# C_avg_su, C_avg_cd, C_avg_rt = compute_avg_all(elastic, "mj_qa_conflict", body) +C_avg_su, C_avg_cd, C_avg_rt = compute_avg_all(elastic, "mj_qa_conflict", body) # #-------------------------------------------------- # #-------------------------------------------------- C_avg_su = 1 @@ -394,7 +364,17 @@ body={ "terms": { "version_key": version_keys_v3 } + }, + { + "nested": { + "path": "conflict_evaluations", + "query": { + "exists": { + "field": "conflict_evaluations.main_type" + } + } } + } ], "must_not": [ { diff --git a/app/majles/majles_conflict_works_v3.py b/app/majles/majles_conflict_works_v3.py index 852464c..5b3a1f5 100644 --- a/app/majles/majles_conflict_works_v3.py +++ b/app/majles/majles_conflict_works_v3.py @@ -981,6 +981,24 @@ elastic = ElasticHelper(host, password, "elastic", path_base_map) # ref_key="oss120", # fields=["conflict_evaluation"]) +# append_conflict_to_elastic( elastic, +# input_path=r"G:\Project2\102_gpu\v3_conflict\17K_ev_DeepSeek\finall_data_finall_DeepSeek.json", +# out_put_index_name="mj_qa_conflict", +# ref_key="deepseek", +# fields=["conflict_evaluation"]) + +# append_conflict_to_elastic( elastic, +# input_path=r"G:\Project2\102_gpu\v3_conflict\17k_ev_Qwen3_5_122B\finall_data_finall_Qwen3_5_122B.json", +# out_put_index_name="mj_qa_conflict", +# ref_key="qwen3_5_122B", +# fields=["conflict_evaluation"]) + +# append_conflict_to_elastic( elastic, +# input_path=r"G:\Project2\102_gpu\v3_conflict\17k_ev_Qwopus4_6\finall_data_finall_Qwopus4_6.json", +# out_put_index_name="mj_qa_conflict", +# ref_key="qwopus4_6", +# fields=["conflict_evaluation"]) + ## ----------------------------------------------------------------------- ## ----------------------------------------------------------------------- ## -----------------------------------------------------------------------