Skip to content

Commit

Permalink
Forwards rest parameters to model
Browse files Browse the repository at this point in the history
Fixes #1660
  • Loading branch information
idlefella committed Oct 8, 2024
1 parent 35f975b commit 662d7fb
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion runtimes/mlflow/mlserver_mlflow/runtime.py
Original file line number Diff line number Diff line change
Expand Up @@ -196,5 +196,8 @@ def _sync_metadata(self) -> None:

async def predict(self, payload: InferenceRequest) -> InferenceResponse:
decoded_payload = self.decode_request(payload)
model_output = self._model.predict(decoded_payload)
params = None
if payload.parameters and payload.parameters.model_extra:
params = payload.parameters.model_extra
model_output = self._model.predict(decoded_payload, params=params)
return self.encode_response(model_output, default_codec=TensorDictCodec)

0 comments on commit 662d7fb

Please sign in to comment.