Emotion Model: Additional inference parameter not processed in Sagemaker
I am using thej-hartmann/emotion-english-distilroberta-basevia AWS Sagemaker.The model card specifies an additional parameterreturn_all_scoreswhich 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)
2022-06-10T06:50:57Z
@RomanEngeler1805whichtransformers_versionandpytorch_versiondid you use to create the endpoint? could you try the latest if you haven’t? You can find them here:Reference
2022-06-13T14:47:41Z
Hi@philschmid. I am usingtransformers_version=“4.6.1”pytorch_version=“1.7.1”which are the latest according to the reference.Here the screenshot of the complete script that I am using:image2194×1784 465 KB
2022-06-14T07:34:27Z
Could you please update totransformers_version=4.17and PyTorch1.10and re-try? You can find all available DLCS here:Reference
2022-06-28T06:55:50Z
Yes that worked@philschmidThanks