MCPcopy Create free account
hub / github.com/ZinYY/TreeLoRA / postprocess

Function postprocess

evaluations/eval_Py150.py:6–12  ·  view source on GitHub ↗
(code)

Source from the content-addressed store, hash-verified

4
5
6def postprocess(code):
7 code = code.replace("<NUM_LIT>", "0").replace("<STR_LIT>", "").replace("<CHAR_LIT>", "")
8 pattern = re.compile(r"<(STR|NUM|CHAR)_LIT:(.*?)>", re.S)
9 lits = re.findall(pattern, code)
10 for lit in lits:
11 code = code.replace(f"<{lit[0]}_LIT:{lit[1]}>", lit[1])
12 return code
13
14
15def eval(predicted_sequences, ground_truths):

Callers 1

evalFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected