Code Monkey home page Code Monkey logo

model_build's Introduction

MLOps for SageMaker Endpoint Deployment

This is a sample code repository for demonstrating how you can organize your code for deploying an realtime inference Endpoint infrastructure. This code repository is created as part of creating a Project in SageMaker.

This code repository has the code to find the latest approved ModelPackage for the associated ModelPackageGroup and automaticaly deploy it to the Endpoint on detecting a change (build.py). This code repository also defines the CloudFormation template which defines the Endpoints as infrastructure. It also has configuration files associated with staging and prod stages.

Upon triggering a deployment, the CodePipeline pipeline will deploy 2 Endpoints - staging and prod. After the first deployment is completed, the CodePipeline waits for a manual approval step for promotion to the prod stage. You will need to go to CodePipeline AWS Managed Console to complete this step.

You own this code and you can modify this template to change as you need it, add additional tests for your custom validation.

A description of some of the artifacts is provided below:

Layout of the SageMaker ModelBuild Project Template

jenkins/seed_job.groovy

  • this file is used to create Jenkins pipeline using Jenkinsfile.

jenkins/Jenkinsfile

  • this file contains pipeline definition for stages in Jenkins pipeline, and you can modify it to add/delete/update stages in the pipeline.

build.py

  • this python file contains code to get the latest approve package arn and exports staging and configuration files. This is invoked from the Build stage.

endpoint-config-template.yml

  • this CloudFormation template file is packaged by the build step in the CodePipeline and is deployed in different stages.

staging-config.json

  • this configuration file is used to customize staging stage in the pipeline. You can configure the instance type, instance count here.

prod-config.json

  • this configuration file is used to customize prod stage in the pipeline. You can configure the instance type, instance count here.

test\buildspec.yml

  • this file is used by the CodePipeline's staging stage to run the test code of the following python file

test\test.py

  • this python file contains code to describe and invoke the staging endpoint. You can customize to add more tests here.

model_build's People

Contributors

snteks avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.