I’m currently trying to display some images using AWS SageMaker making use of its Jupyter Notebook app. However, all I’m trying to do is show the loaded images. I have written a function to do this but all I’m left with is the images index and image name on calling the function. The function: Calling the function: Example result: I’ve
Tag: amazon-sagemaker
How to integrate two models in sequential order in one endpoint?
I want to create an API using one endpoint but in my app, the first model output is the second model output. Is it possible to implement using SageMaker? From my understanding model_fn, prediction_fn, output_fn can only use one model at a time. Answer Pipeline Model (sequential models) There is a specific mode in SageMaker: Look at PipelineModel. You can
entry_point file using XGBoost as a framework in sagemaker
Looking at the following source code taken from here (SDK v2): I wonder where the your_xgboost_abalone_script.py file has to be placed please? So far I used XGBoost as a built-in algorithm from my local machine with similar code (i.e. I span up a training job remotely). Thanks! PS: Looking at this, and source_dir, I wonder if one can upload Python
cannot load pickle files for xgboost images of version > 1.2-2 in sagemaker – UnpicklingError
I can train a XGBoost model using Sagemaker images like so: This work for all versions 1.2-2, 1.3-1 and 1.5-1. Unfortunately the following code only works for version 1.2-2: Otherwise I get a: Am I missing something? Is my “pickle loading code wrong”? The version of xgboost is 1.6.0 where I run the pickle code. Answer I found the solution
AWS SageMaker Deployment for Batch Transform
I am trying to use a XGBoost model in Sage Maker and use it to score for a large data stored in S3 using Batch Transform. I build the model using existing Sagemaker Container as follows: The following code is used to do Batch Transform The above code works fine in Development environment (Jupyter notebook) when the model is built
Pyathena is super slow compared to querying from Athena
I run a query from AWS Athena console and takes 10s. The same query run from Sagemaker using PyAthena takes 155s. Is PyAthena slowing it down or is the data transfer from Athena to sagemaker so time consuming? What could I do to speed this up? Answer Just figure out a way of boosting the queries: Before I was trying:
Isolation Forest vs Robust Random Cut Forest in outlier detection
I am examining different methods in outlier detection. I came across sklearn’s implementation of Isolation Forest and Amazon sagemaker’s implementation of RRCF (Robust Random Cut Forest). Both are ensemble methods based on decision trees, aiming to isolate every single point. The more isolation steps there are, the more likely the point is to be an inlier, and the opposite is
Why package is not updated even the lifecycle script has been executed successfully in SageMaker?
I wanted to update pandas version in ‘conda-python3’ in SageMaker, I’ve followed the steps in this page, and linked the new configuration to my instance, CloudWatch log shows me the script has been executed successfully, but when I restart my instance and print out the panda version, it’s still showing the old version 0.24.2, I don’t understand why? This is
Sagemaker lifecycle configuration for installing pandas not working
I am trying to update pandas within a lifecycle configuration, and following the example of AWS I have the next code: Then I attach it to a notebook and when I enter the notebook and open a notebook file, I see that pandas have not been updated. Using !pip show pandas I get: So we can see that I am
How to use a pretrained model from s3 to predict some data?
I have trained a semantic segmentation model using the sagemaker and the out has been saved to a s3 bucket. I want to load this model from the s3 to predict some images in sagemaker. I know how to predict if I leave the notebook instance running after the training as its just an easy deploy but doesn’t really help