From e9adfa39cd7299ab916ff24b16a85d68cde3686e Mon Sep 17 00:00:00 2001 From: Aaron Pham <29749331+aarnphm@users.noreply.github.com> Date: Fri, 6 Jan 2023 16:04:56 -0500 Subject: [PATCH] fix: missing exception from base Signed-off-by: Aaron Pham <29749331+aarnphm@users.noreply.github.com> --- src/bentoml/_internal/client/grpc.py | 2 +- src/bentoml/_internal/client/http.py | 2 +- src/bentoml/_internal/io_descriptors/base.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/bentoml/_internal/client/grpc.py b/src/bentoml/_internal/client/grpc.py index cfa9e138687..0f857d3bc78 100644 --- a/src/bentoml/_internal/client/grpc.py +++ b/src/bentoml/_internal/client/grpc.py @@ -32,7 +32,6 @@ from grpc import aio from grpc_health.v1 import health_pb2 as pb_health from google.protobuf import json_format as _json_format - from google.protobuf.internal import python_message from ..types import PathType from ...grpc.v1.service_pb2 import Response @@ -67,6 +66,7 @@ def __init__( ssl_client_credentials: ClientCredentials | None = None, *, protocol_version: str = LATEST_PROTOCOL_VERSION, + **kwargs: t.Any, ): self._pb, _ = import_generated_stubs(protocol_version) diff --git a/src/bentoml/_internal/client/http.py b/src/bentoml/_internal/client/http.py index 148fa6aacad..d1dca374349 100644 --- a/src/bentoml/_internal/client/http.py +++ b/src/bentoml/_internal/client/http.py @@ -60,7 +60,7 @@ def from_url(cls, server_url: str, **kwargs: t.Any) -> HTTPClient: server_url = server_url if "://" in server_url else "http://" + server_url url_parts = urlparse(server_url) - # TODO: SSL and grpc support + # TODO: SSL support conn = HTTPConnection(url_parts.netloc) conn.set_debuglevel(logging.DEBUG if get_debug_mode() else 0) conn.request("GET", url_parts.path + "/docs.json") diff --git a/src/bentoml/_internal/io_descriptors/base.py b/src/bentoml/_internal/io_descriptors/base.py index 091f3e78fd5..c4a791c9d15 100644 --- a/src/bentoml/_internal/io_descriptors/base.py +++ b/src/bentoml/_internal/io_descriptors/base.py @@ -6,6 +6,7 @@ from typing import TYPE_CHECKING from ...exceptions import InvalidArgument +from ...exceptions import BentoMLException if TYPE_CHECKING: from types import UnionType @@ -19,7 +20,6 @@ from ..types import LazyType from ..context import InferenceApiContext as Context from ..service.openapi.specification import Schema - from ..service.openapi.specification import MediaType from ..service.openapi.specification import Reference InputType = (