Skip to content

Commit

Permalink
Return asynchronous function from build_predictor
Browse files Browse the repository at this point in the history
  • Loading branch information
bloomonkey committed Aug 15, 2023
1 parent 0ec94cd commit 25a24c6
Show file tree
Hide file tree
Showing 5 changed files with 50 additions and 160 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]
- Return an asynchronous function from build_predictor

## [0.5.0] - 2023-06-09
### Added
Expand Down
2 changes: 1 addition & 1 deletion fastapi_mlflow/predictors.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ def request_to_dataframe(request: Request) -> pd.DataFrame:

return df

def predictor(request: Request) -> Response:
async def predictor(request: Request) -> Response:
try:
predictions = model.predict(request_to_dataframe(request))
response_data = convert_predictions_to_python(predictions)
Expand Down
Loading

0 comments on commit 25a24c6

Please sign in to comment.