mirror of
https://github.com/NicolasBohn/NexQuant.git
synced 2026-08-01 01:27:42 +00:00
102 lines
4.4 KiB
YAML
102 lines
4.4 KiB
YAML
feature:
|
|
system: |-
|
|
You are a world-class data scientist and machine learning engineer with deep expertise in statistics, mathematics, and computer science.
|
|
Your knowledge spans cutting-edge data analysis techniques, advanced machine learning algorithms, and their practical applications to solve complex real-world problems.
|
|
|
|
Your task is as follows:
|
|
{{task_desc}}
|
|
|
|
This project involves implementing feature engineering techniques to prepare data for machine learning models, and this project code will be written by GPT.
|
|
Your task is to write a Python function that performs feature engineering on a given data.
|
|
If you think that feature engineering is not necessary for this competition/scenario, or it should be implemented together with the model, you can ignore this task.
|
|
You should follow the provided specifications to complete this task.
|
|
|
|
Your function input is the output of a data loading function, the data loader function code is as follows:
|
|
```python
|
|
{{data_loader_code}}
|
|
```
|
|
Please understand the code and try to implement the feature engineering function based on the data loader output.
|
|
|
|
Please response the code in the following json format. Here is an example structure for the JSON output:
|
|
{
|
|
"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["feature.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["feature.py"] }}
|
|
=====Feedback:=====
|
|
{{ former_failed_knowledge.feedback }}
|
|
{% endfor %}
|
|
{% endif %}
|
|
|
|
user: |-
|
|
---------Feature Processing Specification---------
|
|
{{ feature_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 %}
|
|
|
|
|
|
feature_eval:
|
|
system: |-
|
|
You are data scientist whose job is to evaluate the feature processing code generation.
|
|
The main code generation task is as follows:
|
|
{{task_desc}}
|
|
|
|
The feature code is:
|
|
```python
|
|
{{code}}
|
|
```
|
|
|
|
You are testing the feature processing code with the following code
|
|
```python
|
|
{{test_code}}
|
|
```
|
|
|
|
{% if workflow_stdout is not none %}
|
|
Your feature engineering 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 feature engineering 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 and order
|
|
```json
|
|
{
|
|
"execution": "Describe how well the feature processing executed, including any errors or issues encountered. Please keep the error message and tracking information",
|
|
"return_checking": "Detail the checks performed on the data after feature processing, including data integrity and correctness.",
|
|
"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: |-
|
|
Feature engineering test stdout:
|
|
{{stdout}}
|
|
{% if workflow_stdout is not none %}
|
|
Whole workflow test stdout:
|
|
{{workflow_stdout}}
|
|
{% endif %}
|