jbuddy_13
jbuddy_13

Reputation: 1250

SageMaker Pipelines: Bring your own model

I'm reading through SageMaker pipeline documentation and see that "frameworks" can be retrieved as such

image_uri = sagemaker.image_uris.retrieve(
    framework="xgboost",
    region=region,
    version="1.0-1",
    py_version="py3",
    instance_type="ml.m5.xlarge"
)

However, I'm curious what's the process of bringing your own model? In example, suppose that I want to use JAX, PyMC3 or some other framework that isn't "out of the box" as is the case for xgboost.

I imagine that there is some base class that SageMaker offers and I can inherit from it and pass in a package as an iniT argument (or otherwise register the model with SageMaker.)

What's the accepted practiced to bring an external model to SageMaker for purposes of integrating with SageMaker pipelines?

Note: The purpose would be integrating such model/frameworks into the pipeline for steps like preprocessing training, etc. This is in contrast to hosting a model that was trained outside the training pipeline.

Upvotes: 0

Views: 360

Answers (1)

Marc Karp
Marc Karp

Reputation: 1314

For a Bring Your Own Model see this link: https://github.com/aws/amazon-sagemaker-examples/blob/main/advanced_functionality/scikit_bring_your_own/scikit_bring_your_own.ipynb

SageMaker Pipelines is agnostic to the type of model you are using. The code snippet you shared just automatically picks up the Image URI. You could use your own ECR image when you are creating your SageMaker Pipeline steps.

Upvotes: 1

Related Questions