Batch transform inference job - downloading model from the Hugging Face Hub on start up

I try to run

However I get this error:

requests.exceptions.HTTPError: 403 Client Error: Forbidden for url: [https://huggingface.co/api/models/cardiffnlp/twitter-roberta-base-sentiment]

It looks like an instance created by AWS SageMaker (client) is not allowed to download the model. Something specific I need to add in the role I use with AWS Sagemaker?

or there is an issue with a token in
model_info = _api.model_info(repo_id=model_id, revision=revision, token=use_auth_token)

Thanks,
Kate

I rerun the notebook: notebooks/sagemaker/12_batch_transform_inference at master · huggingface/notebooks · GitHub
and for me it worked. Can you please test again.

I did with the same result.

Well, I started it from my own local environment with installed all need packages. (I run a lot of different kind SageMaker related code from my local environment and it worked.)

What I did not try is to run from Sage Maker Studio.