Skip to content

Commit ead6366

Browse files
committed
fix: param dict vs none
1 parent dbbc05e commit ead6366

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

app/evaluation.py

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -113,16 +113,15 @@ def evaluation_function(response, answer, param=None):
113113

114114
# Ensure config is provided
115115
if param is None:
116-
print("param is None, set default...") #TODO: debugging
116+
print("param is None, setting default...") # TODO: debugging
117117
param = Param()
118-
elif type(param) is dict:
119-
if "param" in param:
120-
param = param["param"]
118+
elif isinstance(param, dict):
119+
param = param.get("param", None)
121120
if param is None:
122-
print("param is None, set default...") #TODO: debugging
121+
print("param is None, setting default...") # TODO: debugging
123122
param = Param()
124123
else:
125-
print("param is dict, load param: ", param) #TODO: debugging
124+
print("param is dict, loading param: ", param) # TODO: debugging
126125
param = Param(**param)
127126
print("param: ", param) #TODO: debugging
128127

0 commit comments

Comments
 (0)