Skip to content
This repository has been archived by the owner on Aug 25, 2023. It is now read-only.

Commit

Permalink
Bump pillow from 8.1.1 to 8.2.0 in /tests/tf-vision/model-server (#101)
Browse files Browse the repository at this point in the history
* Bump pillow from 8.1.1 to 8.2.0 in /tests/tf-vision/model-server

Bumps [pillow](https://github.com/python-pillow/Pillow) from 8.1.1 to 8.2.0.
- [Release notes](https://github.com/python-pillow/Pillow/releases)
- [Changelog](https://github.com/python-pillow/Pillow/blob/master/CHANGES.rst)
- [Commits](python-pillow/Pillow@8.1.1...8.2.0)

---
updated-dependencies:
- dependency-name: pillow
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>

* Fix style check

* Update bdrk in tests

* Add missing type hint

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Han Qiao <qiao@basis-ai.com>
  • Loading branch information
dependabot[bot] and Han Qiao authored Jun 16, 2021
1 parent 8ee6698 commit 921814e
Show file tree
Hide file tree
Showing 8 changed files with 15 additions and 22 deletions.
5 changes: 2 additions & 3 deletions fastapi-gunicorn/serve_http.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
from datetime import datetime
from importlib import import_module
from logging import getLogger
from typing import Optional
from os import getenv
from typing import Optional
from uuid import UUID

from bedrock_client.bedrock.model import BaseModel
Expand Down Expand Up @@ -108,7 +108,6 @@ async def get_metrics(request: Request):
await middleware(request)

body, content_type = request.app.monitor.export_http(
params=dict(request.query_params),
headers=request.headers,
params=dict(request.query_params), headers=request.headers
)
return Response(body, media_type=content_type)
9 changes: 3 additions & 6 deletions flask-gunicorn-gpu/serve_http.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,18 +101,15 @@ def predict():
def explain(target):
if not callable(getattr(current_app.model, "explain", None)):
return "Model does not implement 'explain' method", 501
features = current_app.model.pre_process(
http_body=request.data, files=request.files
)
features = current_app.model.pre_process(http_body=request.data, files=request.files)
return current_app.model.explain(features=features, target=target)[0]


@app.route("/metrics", methods=["GET"])
def get_metrics():
"""Returns real time feature values recorded by Prometheus
"""
"""Returns real time feature values recorded by Prometheus"""
body, content_type = current_app.monitor.export_http(
params=request.args.to_dict(flat=False), headers=request.headers,
params=request.args.to_dict(flat=False), headers=request.headers
)
return Response(body, content_type=content_type)

Expand Down
9 changes: 3 additions & 6 deletions flask-gunicorn/serve_http.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,18 +101,15 @@ def predict():
def explain(target):
if not callable(getattr(current_app.model, "explain", None)):
return "Model does not implement 'explain' method", 501
features = current_app.model.pre_process(
http_body=request.data, files=request.files
)
features = current_app.model.pre_process(http_body=request.data, files=request.files)
return current_app.model.explain(features=features, target=target)[0]


@app.route("/metrics", methods=["GET"])
def get_metrics():
"""Returns real time feature values recorded by Prometheus
"""
"""Returns real time feature values recorded by Prometheus"""
body, content_type = current_app.monitor.export_http(
params=request.args.to_dict(flat=False), headers=request.headers,
params=request.args.to_dict(flat=False), headers=request.headers
)
return Response(body, content_type=content_type)

Expand Down
2 changes: 2 additions & 0 deletions requirements-dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,5 @@ black
flake8
isort
mypy
types-Flask
types-Werkzeug
4 changes: 2 additions & 2 deletions style.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ while getopts 'cf:' flag; do
done

if [ -z "$check" ]; then
isort "$files" --check --diff
isort --profile black "$files" --check-only --diff
black "$files" --check
else
isort "$files"
isort --profile black "$files"
black "$files"
fi

Expand Down
2 changes: 1 addition & 1 deletion tests/lightgbm/model-server/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
bdrk==0.7.2
bdrk==0.8.2
boxkite==0.0.4
lightgbm==2.3.1
4 changes: 1 addition & 3 deletions tests/test_e2e.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,9 +81,7 @@ def test_sentiment(self):
after = get_inference_count(resp.text)
self.assertEqual(after - before, 4)

@skipIf(
getenv("MODEL", None) not in MODELS["churn"], "post body for churn prediction models",
)
@skipIf(getenv("MODEL", None) not in MODELS["churn"], "post body for churn prediction models")
def test_post(self):
with Session() as s:
resp = s.get(f"{self.url}/metrics")
Expand Down
2 changes: 1 addition & 1 deletion tests/tf-vision/model-server/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
tensorflow_hub==0.6.0
tensorflow==2.5.0
Pillow==8.1.1
Pillow==8.2.0

0 comments on commit 921814e

Please sign in to comment.