aws / aws/amazon-sagemaker-examples

Store model from script mode in S3

Open
#3,440 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Jupyter Notebook
Stars
11k
Forks
7k
Avg merge
8h 29m
Merged PRs (30d)
8

Description

Hi all,

I followed the script mode example [here](https://github.com/aws/amazon-sagemaker-examples/blob/c391082711d4297d157e3a546be29ef422a5974b/sagemaker-script-mode/sagemaker-script-mode.ipynb
) , specificaly [this](https://github.com/aws/amazon-sagemaker-examples/blob/c391082711d4297d157e3a546be29ef422a5974b/sagemaker-script-mode/xgboost_script/train_deploy_xgboost_with_dependencies.py). The model fitted model is fitted like this:

```
model_location = args.model_dir + "/xgboost-model"
pickle.dump(model, open(model_location, "wb"))
```
so I think it is safed in the Docker container. How can I also perist it in S3 (like model.tar.gz what usually happens)? Maybe I can add some lines of code to push to S3 or is there an easier way? Thanks.

Contributor guide

Open the contributing guide

Research direction

Start by reading the referenced sagemaker-script-mode/sagemaker-script-mode.ipynb example and sagemaker-script-mode/xgboost_script/train_deploy_xgboost_with_dependencies.py script. Determine how the fitted model should be persisted in S3 within this example; done means the example clearly demonstrates that persistence and remains usable for deployment.

Written by the indexing model from the issue text.

Assessment

Tech stack
aws, jupyter-notebook, python
Domain
cloud, machine-learning
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.