amazon-sagemaker-examples icon indicating copy to clipboard operation
amazon-sagemaker-examples copied to clipboard

Store model from script mode in S3

Open csetzkorn opened this issue 2 years ago • 0 comments

Hi all,

I followed the script mode example here , specificaly this. 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.

csetzkorn avatar Jun 02 '22 13:06 csetzkorn