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

Function evolve

tools/mbpp/fix_v010.py:203–210  ·  view source on GitHub ↗
(src_file, tgt_file)

Source from the content-addressed store, hash-verified

201 TARGET_VERSION = "v0.2.0"
202
203 def evolve(src_file, tgt_file):
204 with open(src_file) as f:
205 data = [json.loads(line) for line in f.readlines() if line]
206
207 data = fix(data)
208 with open(tgt_file, "wb") as f:
209 for x in data:
210 f.write((json.dumps(x) + "\n").encode("utf-8"))
211
212 evolve(f"MbppPlus-{SOURCE_VERSION}.jsonl", f"MbppPlus-{TARGET_VERSION}.jsonl")
213

Callers 1

fix_v010.pyFile · 0.70

Calls 2

readlinesMethod · 0.80
fixFunction · 0.70

Tested by

no test coverage detected