Skip to content

Commit

Permalink
chore: revert changes from upstream/main
Browse files Browse the repository at this point in the history
reverted changes: pyproject.toml

Signed-off-by: Aaron Pham <29749331+aarnphm@users.noreply.github.com>
  • Loading branch information
aarnphm committed Jan 6, 2023
1 parent 3681b8f commit 518ebd6
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Expand Up @@ -183,7 +183,7 @@ omit = [
show_missing = true
precision = 2
omit = [
"src/bentoml/__main__.py",
'src/bentoml/__main__.py',
"src/bentoml/io.py",
"src/bentoml/serve.py",
"src/bentoml/start.py",
Expand Down
7 changes: 6 additions & 1 deletion src/bentoml/_internal/client/http.py
Expand Up @@ -17,6 +17,7 @@
from . import Client
from .. import io_descriptors as io
from ..service import Service
from ...exceptions import RemoteException
from ...exceptions import BentoMLException
from ..configuration import get_debug_mode
from ..service.inference_api import InferenceAPI
Expand Down Expand Up @@ -62,8 +63,12 @@ def from_url(cls, server_url: str, **kwargs: t.Any) -> HTTPClient:
# TODO: SSL and grpc support
conn = HTTPConnection(url_parts.netloc)
conn.set_debuglevel(logging.DEBUG if get_debug_mode() else 0)
conn.request("GET", "/docs.json")
conn.request("GET", url_parts.path + "/docs.json")
resp = conn.getresponse()
if resp.status != 200:
raise RemoteException(
f"Failed to get OpenAPI schema from the server: {resp.status} {resp.reason}:\n{resp.read()}"
)
openapi_spec = json.load(resp)
conn.close()

Expand Down
2 changes: 1 addition & 1 deletion src/bentoml/_internal/server/grpc/servicer/v1/__init__.py
Expand Up @@ -49,7 +49,7 @@ class BentoServiceImpl(services.BentoServiceServicer):
"""An asyncio implementation of BentoService servicer."""

async def Call( # type: ignore (no async types) # pylint: disable=invalid-overridden-method
self,
self: services.BentoServiceServicer,
request: pb.Request,
context: BentoServicerContext,
) -> pb.Response | None:
Expand Down

0 comments on commit 518ebd6

Please sign in to comment.