Azure ML online endpoint hugging face model zero shot

I deployed this model facebook/bart-large-mnli · Hugging Face in Azure ML using online endpoint but when I try to ping the model I always get the same error 'Internal Server Error . I tried using the “test” in the UI and I place the same example that it’s suggested {
“inputs”: “I have a problem with my iphone that needs to be resolved asap”,
“candidate_labels”: “phone, tablet, computer”
}
error still continues.
SKUStandard_E4s_v3

Instance count2

This is the error I have in the “deployment status”

INFO: 10.66.0.1:41342 - “POST /score HTTP/1.1” 500 Internal Server Error
ERROR: Exception in ASGI application
Traceback (most recent call last):
File “/opt/miniconda/lib/python3.8/site-packages/uvicorn/protocols/http/httptools_impl.py”, line 435, in run_asgi
result = await app( # type: ignore[func-returns-value]
File “/opt/miniconda/lib/python3.8/site-packages/uvicorn/middleware/proxy_headers.py”, line 78, in call
return await self.app(scope, receive, send)
File “/opt/miniconda/lib/python3.8/site-packages/fastapi/applications.py”, line 276, in call
await super().call(scope, receive, send)
File “/opt/miniconda/lib/python3.8/site-packages/starlette/applications.py”, line 122, in call
await self.middleware_stack(scope, receive, send)
File “/opt/miniconda/lib/python3.8/site-packages/starlette/middleware/errors.py”, line 184, in call
raise exc
File “/opt/miniconda/lib/python3.8/site-packages/starlette/middleware/errors.py”, line 162, in call
await self.app(scope, receive, _send)
File “/opt/miniconda/lib/python3.8/site-packages/starlette/middleware/cors.py”, line 83, in call
await self.app(scope, receive, send)
File “/opt/miniconda/lib/python3.8/site-packages/starlette/middleware/exceptions.py”, line 79, in call
raise exc
File “/opt/miniconda/lib/python3.8/site-packages/starlette/middleware/exceptions.py”, line 68, in call
await self.app(scope, receive, sender)
File “/opt/miniconda/lib/python3.8/site-packages/fastapi/middleware/asyncexitstack.py”, line 21, in call
raise e
File “/opt/miniconda/lib/python3.8/site-packages/fastapi/middleware/asyncexitstack.py”, line 18, in call
await self.app(scope, receive, send)
File “/opt/miniconda/lib/python3.8/site-packages/starlette/routing.py”, line 718, in call
await route.handle(scope, receive, send)
File “/opt/miniconda/lib/python3.8/site-packages/starlette/routing.py”, line 276, in handle
await self.app(scope, receive, send)
File “/opt/miniconda/lib/python3.8/site-packages/starlette/routing.py”, line 66, in app
response = await func(request)
File “/opt/miniconda/lib/python3.8/site-packages/fastapi/routing.py”, line 237, in app
raw_response = await run_endpoint_function(
File “/opt/miniconda/lib/python3.8/site-packages/fastapi/routing.py”, line 163, in run_endpoint_function
return await dependant.call(**values)
File “/code/main.py”, line 63, in create_item
pred = inference_handler.handle(payload)
File “/code/handler.py”, line 180, in handle
prediction = self.model(data.inputs)
File “/opt/miniconda/lib/python3.8/site-packages/transformers/pipelines/zero_shot_classification.py”, line 205, in call
return super().call(sequences, **kwargs)
File “/opt/miniconda/lib/python3.8/site-packages/transformers/pipelines/base.py”, line 1101, in call
return next(
File “/opt/miniconda/lib/python3.8/site-packages/transformers/pipelines/pt_utils.py”, line 124, in next
item = next(self.iterator)
File “/opt/miniconda/lib/python3.8/site-packages/transformers/pipelines/pt_utils.py”, line 266, in next
processed = self.infer(next(self.iterator), **self.params)
File “/opt/miniconda/lib/python3.8/site-packages/torch/utils/data/dataloader.py”, line 633, in next
data = self._next_data()
File “/opt/miniconda/lib/python3.8/site-packages/torch/utils/data/dataloader.py”, line 677, in _next_data
data = self._dataset_fetcher.fetch(index) # may raise StopIteration
File “/opt/miniconda/lib/python3.8/site-packages/torch/utils/data/_utils/fetch.py”, line 32, in fetch
data.append(next(self.dataset_iter))
File “/opt/miniconda/lib/python3.8/site-packages/transformers/pipelines/pt_utils.py”, line 183, in next
processed = next(self.subiterator)
File “/opt/miniconda/lib/python3.8/site-packages/transformers/pipelines/zero_shot_classification.py”, line 208, in preprocess
sequence_pairs, sequences = self._args_parser(inputs, candidate_labels, hypothesis_template)
File “/opt/miniconda/lib/python3.8/site-packages/transformers/pipelines/zero_shot_classification.py”, line 25, in call
if len(labels) == 0 or len(sequences) == 0:
TypeError: object of type ‘NoneType’ has no len()

Hi there,

I’m facing the same issue. Did you find a solve?