OpenNMT

Read model by loading it from s3 aws

Hi, I am new to aws and ctranslate2. This maybe a very stupid question.
Basically I had my models stored locally and accessed it with

translator = ctranslate2.Translator(model)

But now I need to deploy my program to AWS Lambda, and to minimize the folder size, I uploaded my models to S3 AWS. I am confused here about how to load my model from S3 and access it with ctranslate2.

Thank you for your help.

Hi,

You should search how to download files from S3 with Python. See for example:

https://boto3.amazonaws.com/v1/documentation/api/latest/guide/s3-examples.html

This is not related to CTranslate2 specifically.

Hi,
Thanks you for the reply.
So do I have to download the file locally, or can I input url of my model as a parameter?
Thanks.

You have to download the files locally.