File tree Expand file tree Collapse file tree 2 files changed +14
-5
lines changed
Expand file tree Collapse file tree 2 files changed +14
-5
lines changed Original file line number Diff line number Diff line change @@ -156,7 +156,7 @@ def dingo_demo(
156156 "executor" : {
157157 "result_save" : {
158158 "bad" : True ,
159- "good " : True
159+ # "raw ": True
160160 },
161161 "max_workers" : max_workers ,
162162 "batch_size" : batch_size ,
@@ -176,9 +176,12 @@ def dingo_demo(
176176 executor = Executor .exec_map ["local" ](input_args )
177177 summary = executor .execute ().to_dict ()
178178 detail = executor .get_bad_info_list ()
179+ dingo_id_set = set ()
179180 new_detail = []
180181 for item in detail :
181- new_detail .append (item )
182+ if item ['dingo_id' ] not in dingo_id_set :
183+ dingo_id_set .add (item ['dingo_id' ])
184+ new_detail .append (item )
182185 if summary ['output_path' ]:
183186 if remove_output == "true" :
184187 shutil .rmtree (summary ['output_path' ])
Original file line number Diff line number Diff line change @@ -33,7 +33,9 @@ def eval(cls, input_data: Data) -> EvalDetail:
3333 res .status = True
3434 # res.merge(tmp_res)
3535 res .label = [f"{ cls .metric_type } .{ cls .__name__ } " ]
36- res .reason = [] if res .reason is None else res .reason .extend (tmp_res .reason )
36+ if res .reason is None :
37+ res .reason = []
38+ res .reason .extend (tmp_res .reason )
3739 # Set QUALITY_GOOD when all checks pass
3840 if not res .status :
3941 res .label = [QualityLabel .QUALITY_GOOD ]
@@ -63,7 +65,9 @@ def eval(cls, input_data: Data) -> EvalDetail:
6365 res .status = True
6466 # res.merge(tmp_res)
6567 res .label = [f"{ cls .metric_type } .{ cls .__name__ } " ]
66- res .reason = [] if res .reason is None else res .reason .extend (tmp_res .reason )
68+ if res .reason is None :
69+ res .reason = []
70+ res .reason .extend (tmp_res .reason )
6771 # Set QUALITY_GOOD when all checks pass
6872 if not res .status :
6973 res .label = [QualityLabel .QUALITY_GOOD ]
@@ -647,7 +651,9 @@ def eval(cls, input_data: Data) -> EvalDetail:
647651 res .status = True
648652 # res.merge(tmp_res)
649653 res .label = [f"{ cls .metric_type } .{ cls .__name__ } " ]
650- res .reason = [] if res .reason is None else res .reason .extend (tmp_res .reason )
654+ if res .reason is None :
655+ res .reason = []
656+ res .reason .extend (tmp_res .reason )
651657 # Set QUALITY_GOOD when all checks pass
652658 if not res .status :
653659 res .label = [QualityLabel .QUALITY_GOOD ]
You can’t perform that action at this time.
0 commit comments