Skip to content

Commit

Permalink
remove ml module dependency from application module
Browse files Browse the repository at this point in the history
  • Loading branch information
thigm85 committed Jun 2, 2022
1 parent 3caa7b9 commit 7361065
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions vespa/application.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
from time import sleep

from vespa.io import VespaQueryResponse, VespaResponse
from vespa.ml import TextTask
from vespa.query import QueryModel
from vespa.evaluation import EvalMetric
from vespa.package import ApplicationPackage
Expand Down Expand Up @@ -1166,7 +1165,7 @@ def predict(self, x, model_id, function_name="output_0"):
model = self.get_model_from_application_package(model_id)
encoded_tokens = model.create_url_encoded_tokens(x=x)
with VespaSync(self) as sync_app:
return TextTask.parse_vespa_prediction(
return model.parse_vespa_prediction(
sync_app.predict(
model_id=model_id,
function_name=function_name,
Expand Down

0 comments on commit 7361065

Please sign in to comment.