Skip to content

Commit

Permalink
test(huggingface): Use correct content type
Browse files Browse the repository at this point in the history
  • Loading branch information
jesse-c committed May 10, 2024
1 parent b009cd0 commit 3b7d222
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions runtimes/huggingface/tests/test_codecs.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ def test_decode_request(inference_request, expected):
{"foo": ["bar1", "bar2"], "foo2": ["var1"]},
True,
InferenceRequest(
parameters=Parameters(content_type="str"),
parameters=Parameters(content_type="hf"),
inputs=[
RequestInput(
name="foo",
Expand All @@ -68,7 +68,7 @@ def test_decode_request(inference_request, expected):
False,
InferenceRequest(
model_name="my-model",
parameters=Parameters(content_type="str"),
parameters=Parameters(content_type="hf"),
inputs=[
RequestInput(
name="foo",
Expand Down Expand Up @@ -135,10 +135,10 @@ def test_decode_response(inference_response, expected):
model_name="my-model",
outputs=[
ResponseOutput(
name="output_0",
shape=[1],
name="output",
shape=[1, 1],
datatype="BYTES",
parameters=Parameters(content_type="hg_json"),
parameters=Parameters(content_type="hg_jsonlist"),
data=[b'{"foo": ["bar1", "bar2"], "foo2": ["var1"]}'],
)
],
Expand All @@ -151,11 +151,11 @@ def test_decode_response(inference_response, expected):
model_name="my-model",
outputs=[
ResponseOutput(
name="output_0",
shape=[1],
name="output",
shape=[1, 1],
datatype="BYTES",
parameters=Parameters(content_type="hg_json"),
data=['{"foo": ["bar1", "bar2"], "foo2": ["var1"]}'],
parameters=Parameters(content_type="hg_jsonlist"),
data=[b'{"foo": ["bar1", "bar2"], "foo2": ["var1"]}'],
)
],
),
Expand Down

0 comments on commit 3b7d222

Please sign in to comment.