I am using the j-hartmann/emotion-english-distilroberta-base via AWS Sagemaker.
The model card specifies an additional parameter return_all_scores which should return the scores for all seven emotions. This works out of the box with the huggingface transformer library, the Inference API but it does not work when hosted on AWS Sagemaker.
Do you know what might be the problem?
# deploy the serverless endpoint
predictor = huggingface_model.deploy(
serverless_inference_config=serverless_config
)
data = {
"inputs": "i am happy today",
"parameters": {"return_all_scores": True}
}
# request
result = predictor.predict(data)