The Influence of Environmental Conditions in Arctic Regions.

Leveraging Snowflake compute to train ML model using Snowpark

entry image

A few days ago, our team of Data Engineers was analyzing large amounts of data on cardiovascular parameters stored in Snowflake. The requirement was to do predictive analysis on data to identify the risk score and the health status of the person depending on the cardiovascular parameters data and store the predicted results back Snowflake. As they were using SQL for their data analysis, they quickly realized that there were many limitations to using only SQL, predictive analysis, and decision-making is not possible.

 

The team made the decision to develop a Machine learning (ML) model that will do a predictive analysis to determine the risk score and the health status of the individual. But, setting up a separate environment like cloud-based platforms, or Containers for training and deployment of ML model will increase project costs, and the stakeholders are unwilling to invest more money on this.

After some in-depth research and brainstorming, the team found that there is a powerful and effective approach to using our snowflake's current environment to train and test ML model on the Snowflake itself by leveraging Snowpark's built-in computing power. This compute power can be easily scale up or scale down as per the model requirement without need of any additional resource, This not only enhances ML model scalability but also bypasses the need for a dedicated environment.

The team created a Snowpark procedure using Python to train the ML model. After completion of model training the client wants a user-friendly interface for the model, allowing users to easily input and view the model's results in real time.

As the team was working on Snowflake they decided to use the Snowflake-owned Python library Streamlit. which offers a simple and efficient way to build and deploy interactive web apps to interact with our ML model

The team established a connection between Snowflake and Streamlit using the Snowflake-connector and interacted with the Ml model by simply calling Snowpark procedures from Streamlit.

Final words:

ML model can be trained on Snowflake without configuring the external environment by using Snowflake's inbuilt computation power. Organizations can leverage the user-friendly interface of Streamlit and the cloud-based architecture of Snowflake to interact with the ML model and make wise decisions. Snowpark and Streamlit can provide a robust and efficient solution for data analysis and Machine learning solutions that can benefit a wide range of industries and applications.