Skip to content

Commit

Permalink
fix a small bug
Browse files Browse the repository at this point in the history
  • Loading branch information
peteryang1 committed Nov 7, 2024
1 parent 3b0d95f commit 9e317cc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion rdagent/scenarios/kaggle/proposal/proposal.py
Original file line number Diff line number Diff line change
Expand Up @@ -383,7 +383,7 @@ def convert_model_experiment(self, response: str, trace: Trace) -> KGModelExperi
response_dict = json.loads(response)
tasks = []
model_type = response_dict.get("model_type", "Model type not provided")
if model_type not in KG_SELECT_MAPPING:
if not isinstance(model_type, str) or model_type not in KG_SELECT_MAPPING:
raise ModelEmptyError(
f"Invalid model type '{model_type}'. Allowed model types are: {', '.join(KG_SELECT_MAPPING)}."
)
Expand Down

0 comments on commit 9e317cc

Please sign in to comment.