Machine Learning in 5 Minutes - How to deploy a ML model (SurveyMonkey Engineer explains)

The Importance of Machine Learning Model Engineering: A Comprehensive Approach

As machine learning (ML) models become increasingly integral to modern products, the need for effective ML model engineering has never been more pressing. An ML engineer's role is multifaceted, requiring them to balance various technical and business considerations. At the heart of this complexity lies a single ML model, which can be likened to a small island in an ocean of intricate relationships.

When building an ML model that will be used by millions of users or run in real-time, there are numerous requirements an ML engineer must consider. One key consideration is whether the model will be used in batch mode, where it runs overnight and results are seen later, or in real-time, where it processes requests instantly. This distinction affects everything from data wrangling to API design.

Data wrangling, a critical component of any ML pipeline, involves transforming data into a format suitable for training and prediction. However, this process is not one-time; it must be repeated for every batch of new data. Moreover, the data used for training and testing may come from different sources, necessitating additional transformations to ensure consistency across datasets. This reality underscores the complexity of ML model engineering.

Storage is another crucial aspect to consider when deploying an ML model. The size of the model can impact storage limits, particularly in containerized environments where storage space is a finite resource. Effective data reduction techniques are essential to minimize storage requirements while maintaining performance.

API design plays a critical role in ensuring seamless integration with downstream systems and users. In many cases, APIs are used to fetch predictions from an ML model in real-time, processing millions of requests. This demands careful consideration of API architecture to ensure scalability, security, and responsiveness. Moreover, scheduling is vital for training or retraining models as data evolves or performance wanes.

Logging and monitoring are indispensable tools for understanding how an ML model performs over time. A comprehensive logging pipeline allows engineers to identify issues, optimize model performance, and ensure user satisfaction. This aspect of ML model engineering highlights the importance of proactive maintenance and continuous improvement.

Security is another vital consideration in ML model engineering. As models handle sensitive data, it's essential to implement robust security measures to safeguard against unauthorized access or misuse. Data input and output validation, as well as protecting against potential biases, are crucial components of this effort.

Visualizations and user interface (UI) design also play a significant role in showcasing the results of an ML model. Effective visualizations can facilitate user understanding and engagement, while UI considerations ensure that models integrate seamlessly into larger systems.

The intricate relationships between these various aspects of ML model engineering underscore the complexity of this field. As an engineer, one must navigate multiple disciplines, from software development to data science, to successfully deploy and maintain ML models. By acknowledging the importance of each component, engineers can create robust, scalable, and secure models that deliver value to users.

The interplay between these factors requires collaboration with a diverse range of professionals, including software engineers, scientists, data engineers, UI/UX designers, and others. As an ML engineer, one serves as a facilitator, ensuring that the various components work together in harmony to create a cohesive product.

In conclusion, machine learning model engineering is a multifaceted field that demands careful consideration of numerous technical and business aspects. By understanding the intricacies of data wrangling, storage, API design, scheduling, logging, security, visualizations, and UI design, engineers can create robust, scalable, and secure models that deliver value to users.

"WEBVTTKind: captionsLanguage: enan m/l engineer has a lot of things to take care of when they're looking to release an ml model to production hi I'm sue B Jane and I'm a machine learning engineer at Survey Monkey in this video I'm going to be talking about going beyond an ml model this is important because after an ml model was created from a data scientist or otherwise there are a lot of steps that an ml engineer needs to take before this ml model can really be used and leveraged by the consumers in this diagram over here we have an ml model that's in the center of all these components and you can see that there are a lot of them in comparison to this the single ml model and while I haven't really delved into the intricacies of this ml model itself we can see very easily that an ml engineer has a lot of things to take care of when they're looking to release an ml model to production when an ml model runs there are a couple of requirements they have to think about one is is this ml model going to be used real time or something that runs you know in the background that takes a few hours and the user ends up seeing it later on and around this ml model we have things like data wrangling storage the API that's just on top of the model a you why that might be leveraging the model visualizations of the model results themselves security of the data input and data output of the model logging and monitoring to make sure that the models staying relatively consistent and accurate and lastly storage of the model of where it's being stored and where the results themselves are being stored I want to talk first about data wrangling within data wrangling there are a lot of different transformations that have to take place within the prediction pipeline of an ml model so even though you might have applied some feature transformations like one hot encoding to your training data when training your model you have to make sure that those exact same feature transformations take place when you're predicting using your model and sometimes the data is coming from different sources where your training data comes from one source and your prediction data from another source second I want to talk about storage it's really important to understand how your model is going to be stored when it's being used within your prediction pipeline for example if your container izing your ml model sometimes there are storage limits on how large your model can really get and I've dealt with models that take up several gigabytes in storage and in those cases we have to work from an engineering perspective to cut down the storage of the model while making sure that it remains performant next I want to talk about the API oftentimes we like to use or think about our machine learning models to be used in real time and in order to do that we might build an API that has a certain input calls the model and then returns a certain output but in a lot of cases we might have to deal with a bowl gay penis in real time or millions of predictions have to be made overnight and that's where your API design really needs to fit well with your machine learning model closely-related is scheduling scheduling is related more to when you might want to train or retrain your model as time goes on your mo model becomes less performant as your training data might actually change and so you might want to determine when am I going to reschedule this machine learning model is it going to be done on a time series based or is it going to be done when the model performance which can be measured day over day decreases over time next I'm also really concerned about logging and monitoring this is what really lets me know how well my machine learning model is doing in production when it's being used by the users of my product and if I don't have a proper logging pipeline or monitoring pipeline to view how well my male model is performing we won't know at what day or time or what really causes this ml model to become less performant next I want to talk about security and this is because in today's day and age with all the new government regulations regarding data security it's also really important to be aware of ML model security because you don't want the ml model that you're creating to be creating any risks for the product or your users as well and this could be in terms of data input and data sanity checks but also in terms of data output or telling the user something that they probably shouldn't be hearing about next I want to talk about visualizations and closely related UI which is I need to be able to showcase the results of my model sometimes that's through some sort of graph that users might see but sometimes the model is only one input into a larger diagram that the user is seeing and you might work with a design engineer in order to work on creating a model that fits that UI or visualization that they have in mind as you can tell all these different components require you to work with a lot of different people from different backgrounds software engineers state of scientists data engineers UI and UX people and so as an ml engineer you're really the glue that allows this machine learning model to grow and be used and utilized by your product and by your users that's all for today if you like this video please give us a like below and as always comment below if you have any questions thank you for watching and I'll see you next time youan m/l engineer has a lot of things to take care of when they're looking to release an ml model to production hi I'm sue B Jane and I'm a machine learning engineer at Survey Monkey in this video I'm going to be talking about going beyond an ml model this is important because after an ml model was created from a data scientist or otherwise there are a lot of steps that an ml engineer needs to take before this ml model can really be used and leveraged by the consumers in this diagram over here we have an ml model that's in the center of all these components and you can see that there are a lot of them in comparison to this the single ml model and while I haven't really delved into the intricacies of this ml model itself we can see very easily that an ml engineer has a lot of things to take care of when they're looking to release an ml model to production when an ml model runs there are a couple of requirements they have to think about one is is this ml model going to be used real time or something that runs you know in the background that takes a few hours and the user ends up seeing it later on and around this ml model we have things like data wrangling storage the API that's just on top of the model a you why that might be leveraging the model visualizations of the model results themselves security of the data input and data output of the model logging and monitoring to make sure that the models staying relatively consistent and accurate and lastly storage of the model of where it's being stored and where the results themselves are being stored I want to talk first about data wrangling within data wrangling there are a lot of different transformations that have to take place within the prediction pipeline of an ml model so even though you might have applied some feature transformations like one hot encoding to your training data when training your model you have to make sure that those exact same feature transformations take place when you're predicting using your model and sometimes the data is coming from different sources where your training data comes from one source and your prediction data from another source second I want to talk about storage it's really important to understand how your model is going to be stored when it's being used within your prediction pipeline for example if your container izing your ml model sometimes there are storage limits on how large your model can really get and I've dealt with models that take up several gigabytes in storage and in those cases we have to work from an engineering perspective to cut down the storage of the model while making sure that it remains performant next I want to talk about the API oftentimes we like to use or think about our machine learning models to be used in real time and in order to do that we might build an API that has a certain input calls the model and then returns a certain output but in a lot of cases we might have to deal with a bowl gay penis in real time or millions of predictions have to be made overnight and that's where your API design really needs to fit well with your machine learning model closely-related is scheduling scheduling is related more to when you might want to train or retrain your model as time goes on your mo model becomes less performant as your training data might actually change and so you might want to determine when am I going to reschedule this machine learning model is it going to be done on a time series based or is it going to be done when the model performance which can be measured day over day decreases over time next I'm also really concerned about logging and monitoring this is what really lets me know how well my machine learning model is doing in production when it's being used by the users of my product and if I don't have a proper logging pipeline or monitoring pipeline to view how well my male model is performing we won't know at what day or time or what really causes this ml model to become less performant next I want to talk about security and this is because in today's day and age with all the new government regulations regarding data security it's also really important to be aware of ML model security because you don't want the ml model that you're creating to be creating any risks for the product or your users as well and this could be in terms of data input and data sanity checks but also in terms of data output or telling the user something that they probably shouldn't be hearing about next I want to talk about visualizations and closely related UI which is I need to be able to showcase the results of my model sometimes that's through some sort of graph that users might see but sometimes the model is only one input into a larger diagram that the user is seeing and you might work with a design engineer in order to work on creating a model that fits that UI or visualization that they have in mind as you can tell all these different components require you to work with a lot of different people from different backgrounds software engineers state of scientists data engineers UI and UX people and so as an ml engineer you're really the glue that allows this machine learning model to grow and be used and utilized by your product and by your users that's all for today if you like this video please give us a like below and as always comment below if you have any questions thank you for watching and I'll see you next time you\n"