dev #10

Merged
李衍志523370910113 merged 238 commits from dev into master 2025-03-05 16:20:39 +08:00
3 changed files with 25 additions and 26 deletions
Showing only changes of commit 7e58220d2f - Show all commits

View File

@ -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

What is the conclusion?

What is the conclusion?

should be already solved.

should be already solved.
copy_out_cached: List[str] = Field([], serialization_alias="copyOutCached")
copy_out_max: int = Field(0, serialization_alias="copyOutMax")

View File

@ -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

do not use getattr, visit the field explictly

do not use `getattr`, visit the field explictly

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

is there a conclusion now? or it should have a prefix TODO: ?

is there a conclusion now? or it should have a prefix `TODO: `?

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.

ok, then add that prefix

ok, then add that prefix
jon-lee marked this conversation as resolved Outdated

is it in the correct unit?
Give all the fields in Limit a default value and make it non optional in task_stage.limit

is it in the correct unit? Give all the fields in `Limit` a default value and make it non optional in task_stage.limit

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

When will it be None?

When will it be None?
continue

View File

@ -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": [