I have python script.py, which is a KNN machine learning algorithm writer from scratch.
Just using pandas and numpy libraries.
Script contains all the functions.
It takes some arguments such as train_data, test_data, k_val etc. And I want to run this in the sagemaker.
Looking for a solution how I can put this script in docker image and invoke it in sagemaker from ECR container.
How to run python script (which has some functions written in it) in sagemaker?
1.4k Views Asked by Harsh Patel At
1
There are 1 best solutions below
Related Questions in PYTHON
- new thread blocks main thread
- Extracting viewCount & SubscriberCount from YouTube API V3 for a given channel, where channelID does not equal userID
- Display images on Django Template Site
- Difference between list() and dict() with generators
- How can I serialize a numpy array while preserving matrix dimensions?
- Protractor did not run properly when using browser.wait, msg: "Wait timed out after XXXms"
- Why is my program adding int as string (4+7 = 47)?
- store numpy array in mysql
- how to omit the less frequent words from a dictionary in python?
- Update a text file with ( new words+ \n ) after the words is appended into a list
- python how to write list of lists to file
- Removing URL features from tokens in NLTK
- Optimizing for Social Leaderboards
- Python : Get size of string in bytes
- What is the code of the sorted function?
Related Questions in DOCKER
- Docker, redirecting to virtualbox port
- Collect only from STDERR when using Docker syslog logging driver
- How can I create a docker image from the current system?
- Moving Docker Containers Around
- How can I test with serverspec that Jenkins is running in a jenkins docker container?
- How to deploy django 1.8 on Elastic Beanstalk using Docker
- Emulating `docker run` using the golang docker API
- Where are docker images and containers stored when we use it with Windows?
- docker compose, vagrant and insecure Repository
- Commit data in a mysql container
- oh-my-zsh installation returns non zero code
- Use custom docker binary in CoreOS
- Can I use docker image ubuntu 14.04 if my host is 12.04?
- Hide/obfuscate environmental parameters in docker
- How to add initial users when starting a RabbitMQ Docker container?
Related Questions in MACHINE-LEARNING
- How to cluster a set of strings?
- Enforcing that inputs sum to 1 and are contained in the unit interval in scikit-learn
- scikit-learn preperation
- Spark MLLib How to ignore features when training a classifier
- Increasing the efficiency of equipment using Amazon Machine Learning
- How to interpret scikit's learn confusion matrix and classification report?
- Amazon Machine Learning for sentiment analysis
- What Machine Learning algorithm would be appropriate?
- LDA generated topics
- Spectral clustering with Similarity matrix constructed by jaccard coefficient
- Speeding up Viterbi execution
- Memory Error with Classifier fit and partial_fit
- How to find algo type(regression,classification) in Caret in R for all algos at once?
- Difference between weka tool's correlation coefficient and scikit learn's coefficient of determination score
- What are the approaches to the Big-Data problems?
Related Questions in KNN
- Why k and l for LSH used for approximate nearest neighbours?
- knn predictions with Clustering
- Hadoop - a reducer is not being initiated
- training and testing image data with neural network tool in MATLAB
- Hadoop kNN join algorithm stuck at map 100% reduce 0%
- Knn search- after classification how to retrieve the image ? how to find the right value for that index?
- Recreating decision-boundary plot in python with scikit-learn and matplotlib
- How to copy training data n times during classification?
- No missing values are allows kNN in R
- How to split an array for KNN?
- K value vs Accuracy in KNN
- OPEN CV c++ person Recognition K-nn
- Hierarchical Classification (on R)
- Error in using knn for multidimensional data
- Masking 2d arrays using boolean array
Related Questions in AMAZON-ECR
- ECR - What is the registry and what is a repository
- How to autoscale Servers in ECS?
- Storing images in AWS ECR using namespaces
- Build Docker image from manifest
- How to run python script (which has some functions written in it) in sagemaker?
- How to tag ECR Docker Images as prod and non-prod
- Remove auto trigger from ECR as Source in AWS CodePipeline
- Deploying multi-container docker application to AWS ECS Fargate using ECS-CLI
- Cloudformation - ECS service. How to manage pipeline-deployed image updates without stack conflicts
- Can AWS Fargate task pull the image from ECR on another account without creating a repository policy?
- AWS Fargate Cluster unable to access Internet with NAT and Internet Gateways in place
- AWS ECR Login with podman
- Spinnaker build does not trigger on a re-push of an existing tag (like latest)
- Openshift copy image to another image repository
- Error when logging into ECR with Docker login: "Error saving credentials... not implemented"
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
What you need is called SageMaker BYOC (Bring Your Own Container).
SageMaker has pre-built containers for most of the ML algorithms, however for custom algorithms and custom code it provides support for creating custom containers.
They are basically of 2 types: If your goal is to train a model, run validation & save the model file.
-Training ContainerIf your goal is to use an existing model for inference, with SageMaker Endpoint Hosting or Batch Transform.
-Serving ContainerRefer to this repository for detailed steps. The files
predictor.py&serveare the most important, which contain your custom code.References: Link1 Link2