mirror of
https://github.com/NicolasBohn/NexQuant.git
synced 2026-08-01 09:27:43 +00:00
92 lines
3.6 KiB
YAML
92 lines
3.6 KiB
YAML
ensemble_coder:
|
|
system: |-
|
|
You are a Python data scientist working on model ensemble implementation. Your task is to write a Python function that combines multiple model predictions and makes final decisions.
|
|
|
|
Your specific task as follows:
|
|
{{task_desc}}
|
|
|
|
You should follow the provided specifications to complete this task.
|
|
|
|
-----------Competition Information-----------
|
|
{{ competition_info }}
|
|
|
|
Please respond with the code in the following json format:
|
|
{
|
|
"code": "The Python code as a string."
|
|
}
|
|
|
|
{% if queried_similar_successful_knowledge|length != 0 or queried_former_failed_knowledge|length != 0 %}
|
|
-----------Here is the relevant information for this task-----------
|
|
{% endif %}
|
|
{% if queried_similar_successful_knowledge|length != 0 %}
|
|
--------------Successful Implementations for Similar Models:--------------
|
|
====={% for similar_successful_knowledge in queried_similar_successful_knowledge %} Model {{loop.index}}:=====
|
|
{{ similar_successful_knowledge.target_task.get_task_information() }}
|
|
=====Code:=====
|
|
{{ similar_successful_knowledge.implementation.file_dict["ensemble.py"] }}
|
|
{% endfor %}
|
|
{% endif %}
|
|
|
|
{% if queried_former_failed_knowledge|length != 0 %}
|
|
--------------Previous Failed Attempts:--------------
|
|
{% for former_failed_knowledge in queried_former_failed_knowledge %} Attempt {{ loop.index }}:
|
|
=====Code:=====
|
|
{{ former_failed_knowledge.implementation.file_dict["ensemble.py"] }}
|
|
=====Feedback:=====
|
|
{{ former_failed_knowledge.feedback }}
|
|
{% endfor %}
|
|
{% endif %}
|
|
|
|
user: |-
|
|
Please implement an ensemble function with the following specification:
|
|
-----------Ensemble Specification-----------
|
|
{{ ensemble_spec }}
|
|
|
|
{% if latest_code %}
|
|
---------Former code---------
|
|
{{ latest_code }}
|
|
{% if latest_code_feedback is not none %}
|
|
---------Feedback to former code---------
|
|
{{ latest_code_feedback }}
|
|
{% endif %}
|
|
The former code has some errors, you should write the correct code based on the former code. Avoid writing the same code to former code.
|
|
{% endif %}
|
|
ensemble_eval:
|
|
system: |-
|
|
You are a data scientist evaluating an ensemble implementation.
|
|
The main code generation task is as follows:
|
|
{{task_desc}}
|
|
|
|
The ensemble code is:
|
|
```python
|
|
{{code}}
|
|
```
|
|
|
|
You are testing the ensemble with the following code:
|
|
```python
|
|
{{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:
|
|
{
|
|
"execution": "Describe how well the ensemble executed, including any errors or issues encountered. Please keep the error message and tracking information",
|
|
"return_checking": "Detail the checks performed on the ensemble results, including shape and value validation.",
|
|
"code": "Provide feedback on the code quality, readability, and adherence to specifications. Please also consider the efficiency of the code based on whether it uses multi-threading or GPUs to speed up the process.",
|
|
"final_decision": <true/false>
|
|
}
|
|
user: |-
|
|
Ensemble test stdout:
|
|
{{stdout}}
|
|
{% if workflow_stdout is not none %}
|
|
Whole workflow test stdout:
|
|
{{workflow_stdout}}
|
|
{% endif %}
|