fix: Update prompts.yaml to constrain only one model type (#341)

* Update prompts.yaml

* Update prompts.yaml

* fix a bug

---------

Co-authored-by: WinstonLiyt <104308117+WinstonLiyt@users.noreply.github.com>
Co-authored-by: WinstonLiye <1957922024@qq.com>
This commit is contained in:
Way2Learn
2024-09-25 23:25:14 +08:00
committed by GitHub
parent 5c92bb0456
commit 77e4d4b850
4 changed files with 6 additions and 6 deletions
+2 -2
View File
@@ -97,8 +97,8 @@ class KGModelRunner(KGCachedRunner[KGModelExperiment]):
self.build_from_SOTA(exp)
sub_ws = exp.sub_workspace_list[0]
# TODO: There's a possibility of generating a hybrid model (lightgbm + xgboost), which results in having two items in the model_type list. Hardcoded now.
model_type = sub_ws.target_task.model_type[0]
# TODO: There's a possibility of generating a hybrid model (lightgbm + xgboost), which results in having two items in the model_type list.
model_type = sub_ws.target_task.model_type
if sub_ws.code_dict == {}:
raise ModelEmptyError("No model is implemented.")
@@ -51,4 +51,4 @@ def predict(model, X):
y_pred_prob = model.predict_proba(X_selected)[:, 1]
# Apply threshold to get boolean predictions
return y_pred_prob
return y_pred_prob.reshape(-1, 1)
@@ -37,4 +37,4 @@ def predict(model, X):
X = select(X)
dtest = xgb.DMatrix(X)
y_pred_prob = model.predict(dtest)
return y_pred_prob
return y_pred_prob.reshape(-1, 1)
+2 -2
View File
@@ -95,7 +95,7 @@ feature_experiment_output_format: |-
model_experiment_output_format: |-
According to the hypothesis, please help user design one model task.
Since we only build one model from four model types: ["XGBoost", "RandomForest", "LightGBM", "NN"].
We only build one model from four main model types: ["XGBoost", "RandomForest", "LightGBM", "NN"].
The output should follow JSON format. The schema is as follows:
{
"model_name": "model_name",
@@ -106,7 +106,7 @@ model_experiment_output_format: |-
"hyperparameter_name_2": "value of hyperparameter 2",
"hyperparameter_name_3": "value of hyperparameter 3"
},
"model_type": "model type"
"model_type": "Select only one model type: XGBoost, RandomForest, LightGBM, or NN. The primary model must be unique, but you may use auxiliary models for support if you think it can have a good result like choosing A model as the main model, with B Model used for auxiliary support or optimization on specific details."
}
Usually, a larger model works better than a smaller one. Hence, the parameters should be larger.