I have a pretrained custom model with the model.tar.gz file located in S3. I want to create the HuggingFaceModel and the endpoint configuration in Sagemaker. My local machine (where I am running this) does not have a GPU, but the model will be deployed on a GPU instance in Sagemaker. When I try:
create Hugging Face Model Class
huggingface_model = HuggingFaceModel(
model_data=s3_location, # path to your model and script
role=role, # iam role with permissions to create an Endpoint
transformers_version=â4.37â, # transformers version used
pytorch_version=â2.1â, # pytorch version used
py_version=âpy310â, # python version used
name=âcjk-model-1â,
}
I get an error this error,
None of PyTorch, TensorFlow >= 2.0, or Flax have been found. Models wonât be available and only tokenizers, configuration and file/data utilities can be used.
but I donât understand why I should need pytorch since the model is already trained and it will run on Sagemaker?
but Pytorch is used by the model/inference code, which is already wrapped into the model, and the huggingface image on sagemaker includes it, so why does the machine Iâm deploying from require it?