dev #10
|  | @ -58,7 +58,6 @@ class Cmd(BaseModel): | |||
|     copy_in: Dict[str, InputFile] = Field({}, serialization_alias="copyIn") | ||||
|     copy_in_cached: Dict[str, str] = Field({}, serialization_alias="copyInCached") | ||||
|     copy_in_dir: str = Field(".", serialization_alias="copyInDir") | ||||
|     # reconsider this default situation | ||||
|     copy_out: List[str] = Field(["stdout", "stderr"], serialization_alias="copyOut") | ||||
| 
					
					jon-lee marked this conversation as resolved
					
						
						
							Outdated
						
					
				 | ||||
|     copy_out_cached: List[str] = Field([], serialization_alias="copyOutCached") | ||||
|     copy_out_max: int = Field(0, serialization_alias="copyOutMax") | ||||
|  |  | |||
|  | @ -73,16 +73,16 @@ def fix_keyword( | |||
|         if parser in keyword_parser: | ||||
|             keyword_parser_ = next(p for p in conf_stage.parsers if p.name == parser) | ||||
|             keyword_weight = [] | ||||
|             if getattr(task_stage, parser, None) is not None: | ||||
|                 unique_weight = list(set(getattr(task_stage, parser).weight)) | ||||
|             if parser in task_stage.__dict__: | ||||
| 
					
					jon-lee marked this conversation as resolved
					
						
						
							Outdated
						
					
				 
				
					
						张泊明518370910136
						commented  do not use  do not use `getattr`, visit the field explictly 
				
					
						李衍志523370910113
						commented  resolved. resolved. | ||||
|                 unique_weight = list(set(task_stage.__dict__[parser].weight)) | ||||
|                 for score in unique_weight: | ||||
|                     keyword_weight.append({"keywords": [], "score": score}) | ||||
| 
					
					jon-lee marked this conversation as resolved
					
						
						
							Outdated
						
					
				 
				
					
						张泊明518370910136
						commented  is there a conclusion now? or it should have a prefix  is there a conclusion now? or it should have a prefix `TODO: `? 
				
					
						李衍志523370910113
						commented  so far works fine on 280 sides, indicating that pbs in 151 can be resolved with proper guidelines I think. so far works fine on 280 sides, indicating that pbs in 151 can be resolved with proper guidelines I think. 
				
					
						张泊明518370910136
						commented  ok, then add that prefix ok, then add that prefix | ||||
| 
 | ||||
| 
					
					jon-lee marked this conversation as resolved
					
						
						
							Outdated
						
					
				 
				
					
						张泊明518370910136
						commented  is it in the correct unit? is it in the correct unit?
Give all the fields in `Limit` a default value and make it non optional in task_stage.limit 
				
					
						李衍志523370910113
						commented  resolved resolved | ||||
|                 for idx, score in enumerate(unique_weight): | ||||
|                     for idx_, score_ in enumerate(getattr(task_stage, parser).weight): | ||||
|                     for idx_, score_ in enumerate(task_stage.__dict__[parser].weight): | ||||
|                         if score == score_: | ||||
|                             keyword_weight[idx]["keywords"].append( | ||||
|                                 getattr(task_stage, parser).keyword[idx_] | ||||
|                                 task_stage.__dict__[parser].keyword[idx_] | ||||
|                             ) | ||||
|                         else: | ||||
|                             continue | ||||
|  | @ -135,7 +135,7 @@ def fix_dummy( | |||
|         if parser not in dummy_parser: | ||||
|             continue | ||||
|         dummy_parser_ = next(p for p in conf_stage.parsers if p.name == parser) | ||||
|         if getattr(task_stage, parser.replace("-", "_"), None) is None: | ||||
|         if parser.replace("-", "_") not in task_stage.__dict__: | ||||
|             continue | ||||
|         if task_stage.result_status is None: | ||||
| 
					
					jon-lee marked this conversation as resolved
					
						
						
							Outdated
						
					
				 
				
					
						张泊明518370910136
						commented  When will it be None? When will it be None? | ||||
|             continue | ||||
|  |  | |||
|  | @ -222,11 +222,11 @@ | |||
|                                 } | ||||
|                             }, | ||||
|                             "copyInCached": { | ||||
|                                 "h7/build/ex2-msan": "h7/build/ex2-msan", | ||||
|                                 "h7/build/ex2-asan": "h7/build/ex2-asan", | ||||
|                                 "h7/build/ex2-ubsan": "h7/build/ex2-ubsan", | ||||
|                                 "h7/build/compile_commands.json": "h7/build/compile_commands.json", | ||||
|                                 "h7/build/ex2": "h7/build/ex2", | ||||
|                                 "h7/build/ex2-ubsan": "h7/build/ex2-ubsan" | ||||
|                                 "h7/build/ex2-asan": "h7/build/ex2-asan", | ||||
|                                 "h7/build/ex2-msan": "h7/build/ex2-msan", | ||||
|                                 "h7/build/ex2": "h7/build/ex2" | ||||
|                             }, | ||||
|                             "copyInDir": ".", | ||||
|                             "copyOut": [ | ||||
|  | @ -322,11 +322,11 @@ | |||
|                                 } | ||||
|                             }, | ||||
|                             "copyInCached": { | ||||
|                                 "h7/build/ex2-msan": "h7/build/ex2-msan", | ||||
|                                 "h7/build/ex2-asan": "h7/build/ex2-asan", | ||||
|                                 "h7/build/ex2-ubsan": "h7/build/ex2-ubsan", | ||||
|                                 "h7/build/compile_commands.json": "h7/build/compile_commands.json", | ||||
|                                 "h7/build/ex2": "h7/build/ex2", | ||||
|                                 "h7/build/ex2-ubsan": "h7/build/ex2-ubsan" | ||||
|                                 "h7/build/ex2-asan": "h7/build/ex2-asan", | ||||
|                                 "h7/build/ex2-msan": "h7/build/ex2-msan", | ||||
|                                 "h7/build/ex2": "h7/build/ex2" | ||||
|                             }, | ||||
|                             "copyInDir": ".", | ||||
|                             "copyOut": [ | ||||
|  | @ -444,11 +444,11 @@ | |||
|                             "cpuSetLimit": "", | ||||
|                             "copyIn": {}, | ||||
|                             "copyInCached": { | ||||
|                                 "h7/build/ex2-msan": "h7/build/ex2-msan", | ||||
|                                 "h7/build/ex2-asan": "h7/build/ex2-asan", | ||||
|                                 "h7/build/ex2-ubsan": "h7/build/ex2-ubsan", | ||||
|                                 "h7/build/compile_commands.json": "h7/build/compile_commands.json", | ||||
|                                 "h7/build/ex2": "h7/build/ex2", | ||||
|                                 "h7/build/ex2-ubsan": "h7/build/ex2-ubsan" | ||||
|                                 "h7/build/ex2-asan": "h7/build/ex2-asan", | ||||
|                                 "h7/build/ex2-msan": "h7/build/ex2-msan", | ||||
|                                 "h7/build/ex2": "h7/build/ex2" | ||||
|                             }, | ||||
|                             "copyInDir": ".", | ||||
|                             "copyOut": [ | ||||
|  | @ -542,11 +542,11 @@ | |||
|                             "cpuSetLimit": "", | ||||
|                             "copyIn": {}, | ||||
|                             "copyInCached": { | ||||
|                                 "h7/build/ex2-msan": "h7/build/ex2-msan", | ||||
|                                 "h7/build/ex2-asan": "h7/build/ex2-asan", | ||||
|                                 "h7/build/ex2-ubsan": "h7/build/ex2-ubsan", | ||||
|                                 "h7/build/compile_commands.json": "h7/build/compile_commands.json", | ||||
|                                 "h7/build/ex2": "h7/build/ex2", | ||||
|                                 "h7/build/ex2-ubsan": "h7/build/ex2-ubsan" | ||||
|                                 "h7/build/ex2-asan": "h7/build/ex2-asan", | ||||
|                                 "h7/build/ex2-msan": "h7/build/ex2-msan", | ||||
|                                 "h7/build/ex2": "h7/build/ex2" | ||||
|                             }, | ||||
|                             "copyInDir": ".", | ||||
|                             "copyOut": [ | ||||
|  | @ -639,11 +639,11 @@ | |||
|                             "cpuSetLimit": "", | ||||
|                             "copyIn": {}, | ||||
|                             "copyInCached": { | ||||
|                                 "h7/build/ex2-msan": "h7/build/ex2-msan", | ||||
|                                 "h7/build/ex2-asan": "h7/build/ex2-asan", | ||||
|                                 "h7/build/ex2-ubsan": "h7/build/ex2-ubsan", | ||||
|                                 "h7/build/compile_commands.json": "h7/build/compile_commands.json", | ||||
|                                 "h7/build/ex2": "h7/build/ex2", | ||||
|                                 "h7/build/ex2-ubsan": "h7/build/ex2-ubsan" | ||||
|                                 "h7/build/ex2-asan": "h7/build/ex2-asan", | ||||
|                                 "h7/build/ex2-msan": "h7/build/ex2-msan", | ||||
|                                 "h7/build/ex2": "h7/build/ex2" | ||||
|                             }, | ||||
|                             "copyInDir": ".", | ||||
|                             "copyOut": [ | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue
	
	Block a user
	
What is the conclusion?
should be already solved.