Error invoking inference endpoint
endpoint error1367×847 47.6 KBThe model i’ve used to deploy ishuggingface.cotomaarsen/span-marker-roberta-large-ontonotes5 · Hugging FaceWe’re on a journey to advance and democratize artificial intelligence through open source and open science.I’ve also tried downloading spanmarkerimport requestsurl = “GitHub - tomaarsen/SpanMarkerNER: SpanMarker for Named Entity Recognition”response = requests.get(url)with open(“requirements.txt”, “wb”) as f:f.write(response.content)and putting it into a “model creation”hub = {‘HF_MODEL_ID’:‘tomaarsen/span-marker-roberta-large-ontonotes5’,‘HF_TASK’:‘span-marker’}huggingface_model = HuggingFaceModel(transformers_version = ‘4.28.1’,pytorch_version=‘2.0.0’,py_version=‘py310’,role=‘arn:aws:iam::026588382219:role/service-role/AmazonSageMaker-ExecutionRole-20230920T145199’,env=hub,dependencies=[‘requirements.txt’])
2023-09-22T07:32:04Z
Spanmaker models are not supported by default you would need to write a custom inference.py script.
2023-09-22T08:23:21Z
Can you provide any content for creating a custom container image? Thanks
2023-09-22T09:01:19Z
Here is an example for sentence transformers you can follow the same stepsCreating document embeddings with Hugging Face's Transformers & Amazon SageMaker