Skip to content

Commit

Permalink
fix: fix context parameter for multi-input IO descriptors (#2948)
Browse files Browse the repository at this point in the history
I should probably write a test for the multipart descriptor...

Co-authored-by: Sean Sheng <s3sheng@gmail.com>
  • Loading branch information
sauyon and ssheng committed Aug 31, 2022
1 parent 83d8a30 commit 43c4eae
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions bentoml/_internal/service/inference_api.py
Expand Up @@ -57,8 +57,8 @@ def __init__(
if isinstance(input_type, dict):
# note: in python 3.6 kwarg order was not guaranteed to be preserved,
# though it is in practice.
for key in input_type:
if key not in sig.parameters:
for key in sig.parameters:
if key not in input_type:
if (
key in ["context", "ctx"]
or sig.parameters[key].annotation == Context
Expand Down

0 comments on commit 43c4eae

Please sign in to comment.