Skip to content

Commit 70fcd76

Browse files
committed
Update score_chain.jinja2
1 parent 9c87d72 commit 70fcd76

File tree

1 file changed

+2
-18
lines changed

1 file changed

+2
-18
lines changed

ads/llm/templates/score_chain.jinja2

Lines changed: 2 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -132,22 +132,6 @@ def pre_inference(data, input_schema_path):
132132
"""
133133
return deserialize(data, input_schema_path)
134134

135-
136-
def post_inference(yhat):
137-
"""
138-
Post-process the model results
139-
140-
Parameters
141-
----------
142-
yhat: Data format after calling model.predict.
143-
144-
Returns
145-
-------
146-
yhat: Data format after any processing.
147-
148-
"""
149-
return yhat
150-
151135
def predict(data, model=load_model(), input_schema_path=os.path.join(os.path.dirname(os.path.realpath(__file__)), "input_schema.json")):
152136
"""
153137
Returns prediction given the model and data to predict
@@ -165,5 +149,5 @@ def predict(data, model=load_model(), input_schema_path=os.path.join(os.path.dir
165149

166150
"""
167151
features = pre_inference(data, input_schema_path)
168-
yhat = post_inference(model.invoke(features))
169-
return {'prediction': yhat}
152+
output = model.invoke(features)
153+
return {'output': output}

0 commit comments

Comments
 (0)