By using AWS re:Post, you agree to the Terms of Use

Why does my kernal keep dying when I try to import Hugging Face BERT models to Amazon SageMaker?

0

When I try to import Hugging Face BERT models to the conda_pytorch_p36 kernal of my Amazon SageMaker Notebook instance using the following pip command, the kernal always dies:

! pip install transformers

The result is the same for Hugging Face BERT, RoBERTa, and GPT2 models on ml.c5.2xlarge and ml.c5d.4xlarge Amazon SageMaker instances.

Why is this happening, and how do I resolve the issue?

1 Answer
0
Accepted Answer

This issue occurs when the latest sentence piece breaks. The workaround is to force install sentencepiece==0.1.91.

pip install sentencepiece==0.1.91

EXPERT
answered 2 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions