mirror of
https://github.com/NicolasBohn/NexQuant.git
synced 2026-08-04 10:47:43 +00:00
update all (#530)
This commit is contained in:
@@ -64,12 +64,22 @@ class EnsembleCoSTEEREvaluator(CoSTEEREvaluator):
|
||||
implementation.inject_files(**{fname: test_code})
|
||||
stdout = implementation.execute(env=de, entry=f"python {fname}")
|
||||
|
||||
if "main.py" in implementation.file_dict:
|
||||
workflow_stdout = implementation.execute(env=de, entry="python main.py")
|
||||
else:
|
||||
workflow_stdout = None
|
||||
|
||||
system_prompt = T(".prompts:ensemble_eval.system").r(
|
||||
task_desc=target_task_information,
|
||||
test_code=test_code,
|
||||
code=implementation.file_dict["ensemble.py"],
|
||||
workflow_stdout=workflow_stdout,
|
||||
workflow_code=implementation.all_codes,
|
||||
)
|
||||
user_prompt = T(".prompts:ensemble_eval.user").r(
|
||||
stdout=stdout,
|
||||
workflow_stdout=workflow_stdout,
|
||||
)
|
||||
user_prompt = T(".prompts:ensemble_eval.user").r(stdout=stdout)
|
||||
|
||||
resp = APIBackend().build_messages_and_create_chat_completion(user_prompt, system_prompt, json_mode=True)
|
||||
return EnsembleEvalFeedback(**json.loads(resp))
|
||||
|
||||
@@ -67,6 +67,13 @@ ensemble_eval:
|
||||
{{test_code}}
|
||||
```
|
||||
|
||||
{% if workflow_stdout is not none %}
|
||||
Your ensemble code is also part of the whole workflow, the user also tested the whole workflow and provided you the stdout.
|
||||
The whole workflow code is:
|
||||
{{workflow_code}}
|
||||
Please consider both stdout and approve the code when both the ensemble test and the whole workflow test pass.
|
||||
{% endif %}
|
||||
|
||||
You'll be given the stdout of your testing scripts.
|
||||
Please respond with your feedback in the following JSON format:
|
||||
{
|
||||
@@ -76,4 +83,9 @@ ensemble_eval:
|
||||
"final_decision": <true/false>
|
||||
}
|
||||
user: |-
|
||||
Ensemble test stdout:
|
||||
{{stdout}}
|
||||
{% if workflow_stdout is not none %}
|
||||
Whole workflow test stdout:
|
||||
{{workflow_stdout}}
|
||||
{% endif %}
|
||||
|
||||
Reference in New Issue
Block a user