MCPcopy Create free account
hub / github.com/SalesforceAIResearch/perfcodegen / test

Function test

src/inference.py:1089–1099  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1087 batch_infer_local_model_prompts(model, rd, output_path, inputs_file, sample_num, context_length = 2048 if "codegen25" in model.name else 8192)
1088
1089def test():
1090 data = json.load(open("prompt_chat_results/gpt-3.5-turbo/time/rd0_batch_outputs.json", "r"))
1091 for i in range(0, 5):
1092 print(f"in {i}")
1093 input_file = f"prompt_chat_results/gpt-3.5-turbo/time/rd0_batch_inputs_{i}.jsonl"
1094 with open(input_file, "r") as f:
1095 for line in f.readlines():
1096 input_data = json.loads(line)
1097 print(input_data["custom_id"])
1098 if "time_simple_execution_feedback" in input_data["custom_id"] or "time_execution_feedback_with_testcase" in input_data["custom_id"]:
1099 print("!!!!")
1100
1101
1102def upload_file(model, prefix, num):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected