Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

123
Visualizações
How to load trained model in amazon sagemaker?

I am following this example on how to train a machine learning model in Amazon-sagemaker.

data_location = 's3://{}/kmeans_highlevel_example/data'.format(bucket)
output_location = 's3://{}/kmeans_highlevel_example/output'.format(bucket)

print('training data will be uploaded to: {}'.format(data_location))
print('training artifacts will be uploaded to: {}'.format(output_location))

kmeans = KMeans(role=role,
                train_instance_count=2,
                train_instance_type='ml.c4.8xlarge',
                output_path=output_location,
                k=10,
                epochs=100,
                data_location=data_location)

So after calling the fit function the model should be saved in the S3 bucket?? How can you load this model next time?

over 4 years ago · Santiago Trujillo
1 Respostas
Responde à pergunta

0

This can be done by using the sagemaker library combined with the Inference Model.

model = sagemaker.model.Model(
    image=image
    model_data='s3://bucket/model.tar.gz',
    role=role_arn)

The options you're passing in are:

  • image - This is the ECR image you're using for inference (which should be for the algorithm you're trying to use). Paths are available here.
  • model_data - This is the path of where your model is stored (in a tar.gz compressed archive).
  • role - This is the arn of a role that is capable of both pulling the image from ECR and getting the s3 archive.

Once you've successfully done this you will need to setup an endpoint, this can be done by performing the following in your notebook through the deploy function.

model.deploy(
   initial_instance_count=1,
   instance_type='ml.p2.xlarge'
)
over 4 years ago · Santiago Trujillo Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda