Why does my kernel keep restarting when I try to download pre-trained Hugging Face BERT models weights to Amazon SageMaker?

0

When I try to download the pre-trained Hugging Face BERT models weights to the conda_pytorch_p36 kernel of my Amazon SageMaker Notebook instance using the following command, the kernel always restarts:

PRE_TRAINED_MODEL_NAME2='sshleifer/distilbart-cnn-12-6'
model2 = BartForConditionalGeneration.from_pretrained(PRE_TRAINED_MODEL_NAME2, cache_dir='hf_cache_dir/')

Note I have installed following libraries using pip commands.

!pip install transformers==4.17.0

The result is the same for Hugging Face "facebook/bart-large-cnn" models.

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

  • maybe it is possible that you overrun memory?

已提問 2 年前檢視次數 564 次
1 個回答
0

This typically happens when there's high resource utilization on the notebook instance and increasing instance type may help. Additionally, I would suggest that you open a support case under SageMaker queue by providing Sagemaker notebook ARN and associated Cloudwatch logs recorded for this notebook so that a support engineer can further troubleshoot the issue.

AWS
已回答 2 年前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南