Well I am using a Jupyter Notebook in Sagemaker with this kernel:
4 vCPU + 16 GiB + 1 GPU Python 3 (PyTorch 1.4 Python 3.6 GPU Optimized)
and install all needed packages like torch or transformers with the first line of code. If I go with my classical way like creating a dataset object, defining the model and training with Trainer() it raises the error I explained.
Meanwhile, I tried to work with the Huggingface platform and followed your tutorial:

  
      

      github.com
  

  
    SageMaker-HuggingFace-Workshop/training at main ·... 1

  main/training

  SageMaker-HuggingFace-Workshop. Contribute to marlon19894/SageMaker-HuggingFace-Workshop development by creating an account on GitHub.

  

  
    
    
  

  


Therefore, I transformed my dataset to .json but get this error:
UnexpectedStatusException: Error for Training job operations-email-classification-2021-11-2021-11-03-14-40-49-703: Failed. Reason: AlgorithmError: framework error:
Traceback (most recent call last):
File “/opt/conda/lib/python3.6/site-packages/sagemaker_training/trainer.py”, line 85, in train
entrypoint()
File “/opt/conda/lib/python3.6/site-packages/sagemaker_pytorch_container/training.py”, line 121, in main
train(environment.Environment())
File “/opt/conda/lib/python3.6/site-packages/sagemaker_pytorch_container/training.py”, line 73, in train
runner_type=runner_type)
File “/opt/conda/lib/python3.6/site-packages/sagemaker_training/entry_point.py”, line 92, in run
files.download_and_extract(uri=uri, path=environment.code_dir)
File “/opt/conda/lib/python3.6/site-packages/sagemaker_training/files.py”, line 131, in download_and_extract
s3_download(uri, dst)
File “/opt/conda/lib/python3.6/site-packages/sagemaker_training/files.py”, line 167, in s3_download
s3.Bucket(bucket).download_file(key, dst)
File “/opt/conda/lib/python3.6/site-packages/boto3/s3/inject.py”, line 246, in bucket_download_file
Extr