Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

121
Vistas
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 Respuestas
Responde la pregunta

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 Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda