How to import python scripts in a preprocessor script


Like the individual who posted this question on the AWS forum, I am also looking to use create_monitoring_schedule. In a record_preprocessor_script file, I want to import various dependent Python scripts, also download and use .pkl files and CSVs from S3. Here's the link to the original question for reference: In my situation, the inference endpoint uses a custom container image. The data processed by this endpoint undergoes complex preprocessing before the actual inference takes place. As a result, the data that's captured for monitoring also reflects the post-preprocessing state. This means that I need to implement similarly complex preprocessing for model monitoring. I have explored the BYOC (Bring Your Own Container) sample codes. While I am keen on using the default model monitor code for handling data drift and model drift, apart from preprocessing, I attempted to extend the Dockerfile using the sagemaker-model-monitor-analyzer container image to see if implementation could be simplified. Unfortunately, it appears that this pre-built image is not publicly available, so I was unable to implement it. Starting from scratch to develop model and data drift monitoring in BYOC is quite challenging for me (as I have limited understanding in this area). How might I be able to fulfill my requirements?

demandé il y a 3 mois213 vues
1 réponse

Hi, given the level of customization required by your use case, looking at the BYOC scenario for SageMaker Model Monitor is a valid option ( I also understand that this is more complex to achieve compared to using a pre-built image, but hopefully the following resources can help.

BYOC examples for model monitor

Library used in the built-in Model Monitor container

Hope this helps.

répondu il y a 3 mois

Vous n'êtes pas connecté. Se connecter pour publier une réponse.

Une bonne réponse répond clairement à la question, contient des commentaires constructifs et encourage le développement professionnel de la personne qui pose la question.

Instructions pour répondre aux questions