Reputation: 1844
I'm trying out the sample notebooks in AWS Sagemaker, currently in the mxnet mnist example which demonstrates bringing your own code. The entry point parameter passed in when instantiating an estimator instance, only mentions the source file (mnist.py) and not a method name or any other point inside the source file.
So how does aws sagemaker figure out which method to send the training data to?
Upvotes: 1
Views: 5958
Reputation: 673
Your python script should implement a few methods like train, model_fn, transform_fn, input_fn etc. SagaMaker would call appropriate method when needed.
https://docs.aws.amazon.com/sagemaker/latest/dg/mxnet-training-inference-code-template.html
Upvotes: 1
Reputation: 1844
Here's the answer I found. For the bring-your-own-algorithm use case, SageMaker will look to run an executable program named "train" for training and "serve" for hosting. This example provides more detail on that. Or, alternatively, you can specify any ENTRYPOINT in your Dockerfile which has train() and serve() functions defined within.
Upvotes: 0