Skip to main content

Salomon

Sage mAker modeL cOpy froM One account to aNother

Solves everlasting issues with Amazon SageMaker:

  1. Make copy of a SageMaker model from one account to another (or from one environment to another)
  2. Freeze SageMaker model, so that model used for SageMaker endpoints is immutable and safe from incidental modifications by data scientists
  3. Single-command operation for model copy (fills gaps present in Terraform, CloudFormation, etc.)

(currently works only with SageMaker Model Package. TODO: add SageMaker Model support.)

Installation

pip install salomon

Make a copy of SageMaker Model Package

Use copy_model_package() function. It makes a copy of SageMaker Model Package.

1. Reads source_arn SageMaker Model Package
2. Replaces paths for data files with `dst_s3_path`
3. Replaces docker image URIs with `dst_ecr`
4. Makes a copy of data files to `dst_s3_path`
5. Pulls docker images and then pushes to `dst_ecr`
6. Creates new SageMaker Model Package in current AWS account.

Example:

  1. Prepare IAM role that can access both source and destination SageMaker resources, ECRs and S3 files
  2. Authenticate to all source docker registries, for example:
aws ecr get-login-password --region eu-central-1 | docker login --username AWS --password-stdin 492215442770.dkr.ecr.eu-central-1.amazonaws.com
# all other ECRs ...
  1. Execute below code with IAM role created in point 1.
from salomon import copy_model_package

copy_model_package(
    source_arn="arn:aws:sagemaker:eu-central-1:1111111111:model-package/source-model-package/1",
    dst_group_name="copy-of-model-package",
    dst_s3_path="s3://bucket-in-22222222222/copy-of-model-package",
    dst_ecr="22222222222.dkr.ecr.eu-central-1.amazonaws.com/copy-of-model-package"   
)

Release files for salomon 0.0.8

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for salomon 0.0.8
File Size Uploaded
salomon-0.0.8.tar.gz 7.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for salomon 0.0.8
File Interpreter ABI Platform
salomon-0.0.8-py3-none-any.whl Python 3 none any Details

Total release size: 14.5 kB

Release files / salomon-0.0.8.tar.gz

Download URL salomon-0.0.8.tar.gz
Size 7.2 kB
Tags Source
SHA-256 checksum
How to use checksums
7e74c94d225c788141b109b097642dbfde5f8f63df83355fa4d3298d693ab07f
BLAKE2b-256 checksum
How to use checksums
2700d313ced6fbceb09533c809e2b2857cef6d9fd089671e5533ced625b9ca2a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.9.6

Release files / salomon-0.0.8-py3-none-any.whl

Download URL salomon-0.0.8-py3-none-any.whl
Size 7.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6d12a54e19f695d99171227f8ad139f9ae1791e1b4044f2de254c36e25c53ac7
BLAKE2b-256 checksum
How to use checksums
bb727422b576c7a4d0ee8d0c240e6082e369170dd5fac414c2aee8d50fe7fdc5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.9.6

Release history Release notifications | RSS feed

This release

0.0.8 This release

2 release files

0.0.7

2 release files

0.0.6

2 release files

0.0.5

2 release files

0.0.4

2 release files

0.0.3

2 release files

0.0.2

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page