amazon-sagemaker-examples
amazon-sagemaker-examples copied to clipboard
Store model from script mode in S3
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.