Hi everyone,
I try to do sentiment analysis on a bunch of data and follow the example notebook notebooks/sagemaker-notebook.ipynb at master · huggingface/notebooks · GitHub   and below is my code:
from sagemaker.huggingface.model import HuggingFaceModel


hub = {
 'HF_MODEL_ID':'cardiffnlp/twitter-roberta-base-sentiment',
 'HF_TASK':'text-classification'
}

# create Hugging Face Model Class
huggingface_model = HuggingFaceModel(
env=hub, 
role=role, 
transformers_version='4.6',
pytorch_version="1.7", 
py_version='py36', 
)

# create Transformer to run our batch job
batch_job = huggingface_model.transformer(
 instance_count=1,
 instance_type='ml.p3.2xlarge',
 output_path=output_s3_path,
 strategy='SingleRecord')

# starts batch transform job and uses s3 data as input
batch_job.transform(
 data=input_s3_path,
 content_type="application/json",    
 split_type="Line")


My input jsonl file is formatted as

image1485×231 19.8 KB

The model successfully infer when I feed with  first 10 rows  (totally this data is about 6k rows)
but it throw errors when I expand to 100 rows.
I’m super new to sagemaker and hugging face ,  can anyone tell me what I’m missing ? Thank you