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 8a24913
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 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

0 comments on commit 8a24913

Please sign in to comment.