# Emotion Model: Additional inference parameter not processed in Sagemaker

**URL:** <https://discuss.huggingface.co/t/emotion-model-additional-inference-parameter-not-processed-in-sagemaker/18932>\
**Category:** Amazon SageMaker\
**Created:** [June 10, 2022, 6:22am UTC](https://discuss.huggingface.co/t/emotion-model-additional-inference-parameter-not-processed-in-sagemaker/18932 "2022-06-10T06:22:55Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![RomanEngeler1805](https://avatars.discourse-cdn.com/v4/letter/r/3e96dc/32.png) [@RomanEngeler1805](https://discuss.huggingface.co/u/RomanEngeler1805)\
**Post date:** [June 10, 2022, 6:22am UTC](https://discuss.huggingface.co/t/emotion-model-additional-inference-parameter-not-processed-in-sagemaker/18932/1 "2022-06-10T06:22:56Z")

</div>

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?

```auto
# 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)

```

---

<div class="post-metadata">

**Author:** ![philschmid](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/philschmid/32/38022_2.png) [@philschmid](https://discuss.huggingface.co/u/philschmid)\
**Post date:** [June 10, 2022, 6:50am UTC](https://discuss.huggingface.co/t/emotion-model-additional-inference-parameter-not-processed-in-sagemaker/18932/2 "2022-06-10T06:50:57Z")

</div>

@RomanEngeler1805 which `transformers_version` and `pytorch_version` did you use to create the endpoint? could you try the latest if you haven’t? You can find them here: [Reference](https://huggingface.co/docs/sagemaker/reference#inference-dlc-overview)

---

<div class="post-metadata">

**Author:** ![RomanEngeler1805](https://avatars.discourse-cdn.com/v4/letter/r/3e96dc/32.png) [@RomanEngeler1805](https://discuss.huggingface.co/u/RomanEngeler1805)\
**Post date:** [June 13, 2022, 2:47pm UTC](https://discuss.huggingface.co/t/emotion-model-additional-inference-parameter-not-processed-in-sagemaker/18932/3 "2022-06-13T14:47:41Z")

</div>

Hi @philschmid. I am using  
transformers\_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:

 ![image](https://us1.discourse-cdn.com/hellohellohello/original/2X/3/30326217be8ef9e71b8be2d40b6561016f80df5a.png)

---

<div class="post-metadata">

**Author:** ![philschmid](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/philschmid/32/38022_2.png) [@philschmid](https://discuss.huggingface.co/u/philschmid)\
**Post date:** [June 14, 2022, 7:34am UTC](https://discuss.huggingface.co/t/emotion-model-additional-inference-parameter-not-processed-in-sagemaker/18932/4 "2022-06-14T07:34:27Z")

</div>

Could you please update to `transformers_version` = `4.17` and PyTorch `1.10` and re-try? You can find all available DLCS here: [Reference](https://huggingface.co/docs/sagemaker/reference#inference-dlc-overview)

---

<div class="post-metadata">

**Author:** ![RomanEngeler1805](https://avatars.discourse-cdn.com/v4/letter/r/3e96dc/32.png) [@RomanEngeler1805](https://discuss.huggingface.co/u/RomanEngeler1805)\
**Post date:** [June 28, 2022, 6:55am UTC](https://discuss.huggingface.co/t/emotion-model-additional-inference-parameter-not-processed-in-sagemaker/18932/5 "2022-06-28T06:55:50Z")

</div>

Yes that worked @philschmid Thanks 🙏
