A crucial aspect to scientific research is building new tools / methods along the way to making new discoveries. For machine learning problems the code that implements a specialized algorithm could be quite complex, or special framework additions are needed. Amazon SageMaker provides the flexibility to bring your own algorithms and models and train and host them in the same way as built-in algorithms. In this lab, we'll explore how to integrate a decision tree algorithm written using the https://scikit-learn.org machine learning package for Python into SageMaker.
Follow these steps:
- In your notebook instance, click on the top level folder.
- Navigate to
sample-notebooks / advanced_functionality / scikit_bring_your_own
- Open the
scikit_bring_your_own.ipynb
notebook, the follow the directions in the notebook.
There are two main parts in this example:
-
building the container for a custom algorithm
- Modify your current SageMakerExecution Role to have full access to Amazon ECR by adding the managed policy
AmazonEC2ContainerRegistryFullAccess
- The container build step takes about 1-2min to finish
- Modify your current SageMakerExecution Role to have full access to Amazon ECR by adding the managed policy
-
training and hosting the algorithm
- Training for this algorithm typicall takes about 5 minutes