Skip to content

Commit 2c7a77f

Browse files
committed
Update score_chain.jinja2 to return output as is if it is already a dictionary.
1 parent e31bc07 commit 2c7a77f

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

ads/llm/templates/score_chain.jinja2

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,4 +150,7 @@ def predict(data, model=load_model(), input_schema_path=os.path.join(os.path.dir
150150
"""
151151
features = pre_inference(data, input_schema_path)
152152
output = model.invoke(features)
153+
# Return the output as is if the output is a dictionary
154+
if isinstance(output, dict):
155+
return output
153156
return {'output': output}

0 commit comments

Comments
 (0)