Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jmoney/sagemaker-utilities
A set of utilities, and a serverless proxy, to help manage and use sagemaker endpoints
https://github.com/jmoney/sagemaker-utilities
aws github-site homebrew-formula license-management mkdocs
Last synced: about 1 month ago
JSON representation
A set of utilities, and a serverless proxy, to help manage and use sagemaker endpoints
- Host: GitHub
- URL: https://github.com/jmoney/sagemaker-utilities
- Owner: jmoney
- License: apache-2.0
- Created: 2023-09-09T00:36:25.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-01-01T03:04:25.000Z (about 1 year ago)
- Last Synced: 2024-11-24T20:07:29.998Z (about 2 months ago)
- Topics: aws, github-site, homebrew-formula, license-management, mkdocs
- Language: Go
- Homepage: https://www.jmoney.dev/sagemaker-utilities
- Size: 54.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Sagemaker Utilities
## CLI
There are some command line utilities to help manage sagemaker endpoints.
### sagemaker-endpoint-management
#### Overview
| Argument | Description |
|---|---|
| action | The action to take. Valid values are `create` or `delete` |
| endpoint-name | The name of the endpoint to create or delete |
| endpoint-config | The name of the endpoint config to use |#### Installation
```bash
brew tap jmoney/aws
brew install sagemaker-endpoint-management
```#### Run locally
```bash
go run cmd/cli/endpoint/main.go --action create --endpoint-name --endpoint-config
```## Sagemaker Lambda Proxy
A proxy that runs as a Lambda to sagemaker to testing certain sagemaker models. This is a proof of concept and not meant for production use.
### Prerequisites
```bash
brew bundle --file Brewfile
tfenv use
```### Deploy
```bash
make build
terraform init
AWS_PROFILE= terraform plan -out=plan.out -var endpoint_name=
AWS_PROFILE= terraform apply plan.out
```### Destroy
```bash
AWS_PROFILE= terraform destroy -var endpoint_name=
```### Testing
```bash
curl --silent --http1.1 --request POST --header "Content-Type: application/json" --header "X-NONCE: $(terraform output -json | jq -r .nonce.value)" "$(terraform output -json | jq -r .url.value)" -d @data.json | jq -r '.[].generation.content'
```There is a `data.json` file at the root of this repo with a question you can use.
### Docker
There is a dockerfile built to be used with lambda for the container image package type. It has not been tested for local runs but in theory it should work. Lambda does not allow images pulled from ghcr and only AWS ECR registries so the docker image would need to be mirrored from ghcr to ecr in some way.