Skip to main content

A library for configuring SageMaker pipelines using hierarchical configuration pattern.

Project description

SageRender


codecov Test PyPi Release Docker Build GitHub License Python Versions Docker Image Size Python Wheel

A library for configuring SageMaker pipelines using hierarchical configuration pattern. The purpose of this library is to isolate depdency on AWS SageMaker SDK and allow teams to create pipelines using configurations. The hierarchical configuration gives teams flexibility to use a lookups in configuration files to traverse through the hierarchy of configurations.

Table of Contents

Installation

From pypi:

pip install sagerender

From GitHub:

pip install git+https://github.com/nike-inc/sagerender#egg=sagerender

Changelog

See the changelog for a history of notable changes to SageRender.

Documentation

Commands

The most commonly used SageRender commands are:
run-pipeline		Run SageMaker Pipeline
upsert-pipeline		Configure and Upsert SageMaker Pipeline
version             Version of SageRender
Run Pipeline

Use this command to run an AWS SageMaker Pipeline

sagerender run-pipeline [-h] --pipeline-name PIPELINE_NAME
                               [--region-name REGION_NAME] [--verbose]

optional arguments:
  -h, --help            show this help message and exit
  --pipeline-name PIPELINE_NAME
                        Name of the SageMaker pipeline
  --region-name REGION_NAME
                        Name of the AWS Region
  --verbose, -v         Enable verbose logging
Upsert Pipeline

Use this command to create/update pipeline definition on AWS SageMaker.

usage: sagerender upsert-pipeline [-h] --pipeline-name PIPELINE_NAME [--max-parallel-execution-steps MAX_PARALLEL_EXECUTION_STEPS]
                                  [--default-bucket-prefix DEFAULT_BUCKET_PREFIX] [--dry-run] [--local] [--verbose]

options:
  -h, --help            show this help message and exit
  --pipeline-name PIPELINE_NAME
                        Name of the SageMaker pipeline
  --max-parallel-execution-steps MAX_PARALLEL_EXECUTION_STEPS
                        Set the max parallel execution steps for SageMaker pipeline
  --default-bucket-prefix DEFAULT_BUCKET_PREFIX
                        Default bucket prefix sets s3 path to be bucket-prefix/default-bucket-prefix/pipeline-name
  --dry-run             Skip upserting SageMaker pipeline definition. Used for debugging.
  --local, -l           Run in local pipeline mode
  --verbose, -v         Enable verbose logging

Getting Started

A notebook to help you get started with SageRender is available here.

Examples

  • A simple SageMaker Pipeline configuration with different environments can be found under examples/simple.
  • A complex SageMaker Pipeline configuration that defines different algorithms across different environments can be found under examples/complex.

Contribution

You can help by contributing to the project! Contribution guidelines can be found here. Instructions to easily set up your local development environment can be found here.

Unit Tests

Prerequisites

Setup

Install the package using poetry

poetry install

Run Tests

poetry run pytest

Run pre-commit checks

poetry run pre-commit run --all-files

Future Work

  • Add support for generating pipeline YAML templates
  • Add support for converting YAML to python code and vice versa.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

sagerender-2.1.1.tar.gz (23.8 kB view details)

Uploaded Source

Built Distribution

sagerender-2.1.1-py3-none-any.whl (28.5 kB view details)

Uploaded Python 3

File details

Details for the file sagerender-2.1.1.tar.gz.

File metadata

  • Download URL: sagerender-2.1.1.tar.gz
  • Upload date:
  • Size: 23.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.4.1 CPython/3.10.14 Linux/6.5.0-1025-azure

File hashes

Hashes for sagerender-2.1.1.tar.gz
Algorithm Hash digest
SHA256 c3e2edf466abae70a5d6fe0eacdb8adbc45cc764b92a9aac365264675a1eaa69
MD5 3a7dcd75ad69759e7c81c10f1ebbcc0a
BLAKE2b-256 64f5e080d2169255063b504f85d0934c744a8b3cf85c226c36ce5d83aeb3776f

See more details on using hashes here.

File details

Details for the file sagerender-2.1.1-py3-none-any.whl.

File metadata

  • Download URL: sagerender-2.1.1-py3-none-any.whl
  • Upload date:
  • Size: 28.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.4.1 CPython/3.10.14 Linux/6.5.0-1025-azure

File hashes

Hashes for sagerender-2.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 f8e83e3ff8e0816890060ada3bea186d8d274bb18a0a7ce54be067e9bbe654d4
MD5 f3895fecf2cf9aa3d6a40dd03261d16e
BLAKE2b-256 a318acf6615b0575c965e87208b489190ad824e5d26a2ebb84b754866efae2af

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page