MCPcopy Index your code
hub / github.com/evalplus/evalplus / evolve

Function evolve

tools/humaneval/fix_v017.py:39–46  ·  view source on GitHub ↗
(src_file, tgt_file)

Source from the content-addressed store, hash-verified

37 TARGET_VERSION = "v0.1.8"
38
39 def evolve(src_file, tgt_file):
40 with open(src_file) as f:
41 data = [json.loads(line) for line in f.readlines() if line]
42
43 data = fix(data)
44 with open(tgt_file, "wb") as f:
45 for x in data:
46 f.write((json.dumps(x) + "\n").encode("utf-8"))
47
48 evolve(
49 f"HumanEvalPlus-{SOURCE_VERSION}.jsonl", f"HumanEvalPlus-{TARGET_VERSION}.jsonl"

Callers 1

fix_v017.pyFile · 0.70

Calls 2

readlinesMethod · 0.80
fixFunction · 0.70

Tested by

no test coverage detected