Quantcast
Channel: Active questions tagged python - Stack Overflow
Viewing all articles
Browse latest Browse all 14331

Why i am getting error when deploying a model from my S3 bucket to sagemaker? Help Please

$
0
0

I am getting an error while deploying the model from S3 bucket using sagemaker notebook. My model that is upload on S3 is "https://huggingface.co/openchat/openchat-3.5-0106". The error:

ClientError: An error occurred (InternalFailure) when calling the CreateModel operation (reached max retries: 4):

import jsonimport sagemakerimport boto3from sagemaker.huggingface import HuggingFaceModelfrom botocore.config import Configsm_boto = boto3.client('sagemaker',                        config=Config(connect_timeout=5, read_timeout=60, retries={'max_attempts': 20}))sagemaker_session = sagemaker.Session(sagemaker_client=sm_boto)role = sagemaker.get_execution_role(sagemaker_session=sagemaker_session)>! model path is working fine and i have checked it.model_path = "s3://arn:aws:s3:us-east-1:******:****/******"huggingface_model = HuggingFaceModel(    model_data = model_path,    role=role,    transformers_version="4.6", # transformers version used    pytorch_version="1.7", # pytorch version used    py_version='py36',)predictor = huggingface_model.deploy(    initial_instance_count=1,    instance_type="ml.m5.2xlarge",)

I tried to extend the timeout and retries but it's still 4 retries. i want to identify the error in my code or in my environment.


Viewing all articles
Browse latest Browse all 14331

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>