# HuggingFace with Sagemaker tutorial doesn't work

**URL:** <https://discuss.huggingface.co/t/huggingface-with-sagemaker-tutorial-doesnt-work/9468>\
**Category:** Amazon SageMaker\
**Created:** [August 25, 2021, 1:18pm UTC](https://discuss.huggingface.co/t/huggingface-with-sagemaker-tutorial-doesnt-work/9468 "2021-08-25T13:18:32Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Oigres](https://avatars.discourse-cdn.com/v4/letter/o/a8b319/32.png) [@Oigres](https://discuss.huggingface.co/u/Oigres)\
**Post date:** [August 25, 2021, 1:18pm UTC](https://discuss.huggingface.co/t/huggingface-with-sagemaker-tutorial-doesnt-work/9468/1 "2021-08-25T13:18:32Z")

</div>

Hi.

I am going through the HuggingFace - Sagemaker tutorial that you provide in github. I am working with the notebook 1 : 01\_getting\_started\_pytorch. I am using Sagemaker Studio with the image: _Python 3 (PyTorch 1.6 Python 3.6 CPU Optimized)_

When I try to download the imdb dataset I have this error:

 ![image](https://us1.discourse-cdn.com/hellohellohello/original/2X/6/68a7557ee164b8d7925c0f1b478308c0c08b746c.png)

Do someone know how to fix this issue?

Thanks in advance.

Sergio

---

<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:** [August 25, 2021, 2:15pm UTC](https://discuss.huggingface.co/t/huggingface-with-sagemaker-tutorial-doesnt-work/9468/2 "2021-08-25T14:15:01Z")

</div>

Hey @Oigres,

which datasets version have you installed?

---

<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:** [August 25, 2021, 2:44pm UTC](https://discuss.huggingface.co/t/huggingface-with-sagemaker-tutorial-doesnt-work/9468/3 "2021-08-25T14:44:51Z")

</div>

I tried to reproduce your error but for me it worked with the notebook.

 ![image](https://us1.discourse-cdn.com/hellohellohello/original/2X/6/61fb82ddd8ffb8a4e4272ebda1b3973d55b3cde2.png)

Could you try removing the cache at ` /root/.cache/huggingface`

---

<div class="post-metadata">

**Author:** ![Oigres](https://avatars.discourse-cdn.com/v4/letter/o/a8b319/32.png) [@Oigres](https://discuss.huggingface.co/u/Oigres)\
**Post date:** [August 25, 2021, 2:49pm UTC](https://discuss.huggingface.co/t/huggingface-with-sagemaker-tutorial-doesnt-work/9468/4 "2021-08-25T14:49:59Z")

</div>

Hi.

Thank you for you attention. I tried with these versions:

1. Using the “pip install” that come already with the notebook:

`!pip install "sagemaker>=2.48.0" "transformers==4.6.1" "datasets[s3]==1.6.2" --upgrade`

I this case the version installed are: `dataset 1.6.2` and `transformers 4.6.1`

1. Using the “pip install” that is used in the youtube video related to this tutorial:  
!pip install transformers “datasets[s3]” --upgrade

I this case the version installed are: `dataset 4.9.2` and `transformers 1.11.0`

In both cases I got the same error.

---

<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:** [August 25, 2021, 3:12pm UTC](https://discuss.huggingface.co/t/huggingface-with-sagemaker-tutorial-doesnt-work/9468/6 "2021-08-25T15:12:57Z")

</div>

I used the notebook as it is with

```auto
!pip install "sagemaker>=2.48.0" "transformers==4.6.1" "datasets[s3]==1.6.2" --upgrade

```

Have you tried restarting the kernel?  
And you might need to use `sudo rm -rf`

---

<div class="post-metadata">

**Author:** ![Oigres](https://avatars.discourse-cdn.com/v4/letter/o/a8b319/32.png) [@Oigres](https://discuss.huggingface.co/u/Oigres)\
**Post date:** [August 25, 2021, 4:13pm UTC](https://discuss.huggingface.co/t/huggingface-with-sagemaker-tutorial-doesnt-work/9468/7 "2021-08-25T16:13:28Z")

</div>

Hey.

Thank you very much. You did help me a lot. It was kind of these errors that you can’t find easily over there.

Just a thing: in order to help others, can you edit your answer…? I’m sure that where you wrote: `~/.cache/huggingface` you meant `/root/.cache/huggingface`

MANY THANKS again.

Oigres.
