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

Function evolve

tools/humaneval/fix_v018.py:57–64  ·  view source on GitHub ↗
(src_file, tgt_file)

Source from the content-addressed store, hash-verified

55 TARGET_VERSION = "v0.1.9"
56
57 def evolve(src_file, tgt_file):
58 with open(src_file) as f:
59 data = [json.loads(line) for line in f.readlines() if line]
60
61 data = fix(data)
62 with open(tgt_file, "wb") as f:
63 for x in data:
64 f.write((json.dumps(x) + "\n").encode("utf-8"))
65
66 evolve(
67 f"HumanEvalPlus-{SOURCE_VERSION}.jsonl", f"HumanEvalPlus-{TARGET_VERSION}.jsonl"

Callers 1

fix_v018.pyFile · 0.70

Calls 2

readlinesMethod · 0.80
fixFunction · 0.70

Tested by

no test coverage detected