{'fraction_non_alphanumeric': 0.02532183628855963, 'fraction_numerical': 0.005404420694680593, 'mean_word_length': 5.158937920718025, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
On Continuous Integration / Continuous Delivery for Automated Deployment of Machine Learning Models using MLOps

Model deployment in machine learning has emerged as an intriguing field of research in recent years. It is comparable to the procedure defined for conventional software development. Continuous Integration and Continuous Delivery (CI/CD) have been shown to smooth down software advancement and speed up businesses when used in conjunction with development and operations (DevOps). Using CI/CD pipelines in an application that includes Machine Learning Operations (MLOps) components, on the other hand, has difficult difficulties, and pioneers in the area solve them by using unique tools, which is typically provided by cloud providers. This research provides a more in-depth look at the machine learning lifecycle and the key distinctions between DevOps and MLOps. In the MLOps approach, we discuss tools and approaches for executing the CI/CD pipeline of machine learning frameworks. Following that, we take a deep look into push and pull-based deployments in Github Operations (GitOps). Open exploration issues are also identified and added, which may guide future study.


I. INTRODUCTION
Artificial Intelligence (AI) is a field of study that has been on the ascent to develop applications fit for procuring information and providing models dependent on past knowledge [1]. For real-world applications, the data is so vast and made available in the production system only, which brings about the management of various tools, including libraries, and dependencies that can complicate model development [2]. Therefore, it has been valuable to incorporate the concepts of continuous training and continuous development (CI/CD) for automated deployment of AI models [3].
In real-world systems, machine learning (ML) models must be flexible according to changing input data. Once the model has been deployed to production, the performance of the model degrades due to frequent changes to the data [4]. Therefore, model monitoring is essential and responsible for adequately monitoring the pipeline that can trigger, retrain and ensure models are working as expected. However, tracking the performance of a model comes with several challenges throughout the machine learning lifecycle [5]. All of the these challenges can be solved using MLOps [6]. What is MLOps? In simple terms, MLOps is DevOps for machine learning. It enables developers to collaborate and increase the pace at which AI models can be developed, deployed, scaled, monitored, and retrained.
The idea behind presenting such a paper is to put together an investigation that gathers information on DevOps methodology for machine learning applications. On looking through research papers and interacting with experts in the field of CI/CD, we found a knowledge gap among machine learning developers in building automation pipelines [7] [8]. Our most significant commitment to this paper is not a methodology but an investigation of approaches. It covers using existing advances, for example, containerization tools such as docker [9], orchestration tools like Kubernetes [10], and MLOps platforms such as Amazon SageMaker [11], KubeFlow [12], and MLFlow [13] that are demanding and easy to implement. Subsequently, we provide a bird's eye view on the Github operations [14] related to model deployment to help guide new researchers.
The rest of the sections are organized as follows: Section 2 introduces the concepts of DevOps, including concepts of CI/CD, containerization, and orchestration. Section 3 involves MLOps levels and discusses the key differences between MLOps and DevOps. Section 4 provides information on Github operations for testing push and pull-based deployments. Section 5 explores open research challenges, and Section 6 discusses the related works. Section 7 concludes the paper.

II. DEVELOPMENT AND OPERATIONS
DevOps or development and operations can be termed as the practice used by an organization while developing software applications [3]. There are mainly two concepts in DevOps: • Continuous Integration (CI): CI helps in time management and enables an organization to have short and frequent release cycles for improving software quality and increase overall team productivity. • Continuous Deployment (CD): It helps automatically deploy software in production [15]. The main difference between CI and CD is mainly about ensuring an application availability in production ready condition after performing quality checks. Machine learning pipelines require components to be reusable, composable and potentially shareable across the pipeline. These components should ideally be containerized to decouple execution environment for custom code runtime and make the code reproducible between developers [16]. Docker [9] has been widely used for containerization. As shown in Figure 1, the docker platform provides the ability to package and run applications in a small isolated environment by using a client-server architecture, where the client communicate to docker daemon, for processes such as building, running, and distributing docker containers and performs essential functions. However, for large scale applications, thousands of containers need to be deployed which can be challenging to manage. Orchestration solves the problem of docker adoption by allowing developers to leverage the concepts of container automation, deployment, and networking [17]. In most of the cases, the docker containers are organized by kubernetes [10].

III. MACHINE LEARNING OPERATIONS
The task of deploying AI models to production requires processes after the business model has been determined to ascertain the success rate. These processes provide ML models for production and can be accomplished manually or with the aid of automated workflows. As a result, three different levels of MLOps are defined namely, MLOps Level 0, MLOps Level 1, MLOps Level 2 [18].

A. MLOps Level 0
The fundamental level of maturity, or MLOps level 0, refers to simple workflows that are manually script-driven at every stage of the machine learning lifecycle. This level of MLOps suffers from sparse release iterations because it expects the generated model to not change very often. The concepts of CI/CD are not needed as there is no automation, resulting in lack of active performance monitoring. When models are repeatedly changed or trained, the manual-driven process may persist, but in practice, models are regularly changed or trained, demanding regular iterations.

B. MLOps Level 1
The steps of machine learning experiments are orchestrated at MLOps level 1, to automate the ML pipeline solely to undertake continuous model training. This enables it to provide model prediction services continually and automates retraining models in production using new data. As a result, model deployment setups and continuous model delivery are automated, allowing to leverage trained and validated models as a prediction service for making the online predictions. However, in order to test new ideas and quickly release new implementations of ML components, the need for CI/CD solutions to automate the creation, testing and deployment of ML pipelines is critical.

C. MLOps Level 2
Level 2 of MLOps includes automation of a CI/CD pipeline for more rapid and reliable updating of pipelines in production, which requires a more robust automated system. As shown in Figure 2, a total of six CI/CD processes has been incorporated that includes development and experimentation, where staged experiment phases can be carried out iteratively for training new algorithms and models [18]. It results in the output of pipeline steps' source code, subsequently pushed into the source repository. Next step involves continuous integration (CI), where the source code is built and undergoes various run tests, resulting in package executables and artifacts being deployed later. Finally, in continuous delivery (CD), the artifacts created in CI phases are deployed to the target environment, resulting in the implementation of updated AI models through the generated pipeline. This pipeline is automated in production and runs according to a schedule or a trigger. The generated trained models are then uploaded to the model registry, and this stage is also known as automatic triggering. It also includes CD, which serves prediction as a service. So, once a model prediction service has been installed, the statistics on model performance based on real-time data are collected. The result of this stage is a trigger to execute pipelines and start a new trial cycle.

D. MLOps vs DevOps
MLOps is DevOps to ML, but only to a certain extent, and there are key differences that needs to be addressed by the MLOps platforms [19].
• In a typical software application, if an error needs to be fixed, the task is only to edit the code, test, and deploy it. Nonetheless, model training in ML is an experimental field that requires various efforts on alternative data parameters, algorithms, and feature engineering techniques. • Integration and unit testing are of central significance to guarantee the right execution of software ecosystems. In any case, the different testing procedures applied in software systems are not usually implemented in MLbased systems. • When a model is put into production, it begins to make predictions based on the knowledge gained from realtime data. As business goals adjust, this knowledge is modified which leads to model degradation. Different types of monitoring, such as covariate-shift and pre-shift [20] needs to be implemented, unlike traditional software applications, which in most cases involves monitoring latency.

E. MLOps Platform
Recent years have seen a plethora of MLOps platforms to provide standards for deploying enterprise level AI applications [11]- [13]. These platforms are open-source projects that contains curated set of compatible tools and frameworks for machine learning to ease the process of automated development. Kubeflow [12] introduces the concept of the namespaces that enables multi-user support to simplify collaboration and access management. In addition, it includes a built-in Jupiter notebook environment in the clusters which makes it simple to perform jobs with dynamically scaled resources. Katib, which can be utilized for automated hyperparameter adjustment, is another crucial component in kubeflow, responsible for determining and visualizing the best configuration for the model before it goes into production.
Amazon SageMaker [11] allows connecting and loading data from sources such as Amazon S3 bucket, Amazon Athena, and Amazon Redshift. that leverages data manager, which gives the function of combining and merging original data characteristics within a few seconds. It is essential to make sure that the data and features are well balanced and defined. For this, the SageMaker Clarify can be used to verify each prediction. Finally, the Sage Maker debugger can remove them from the model to identify the source of errors.
In MLflow [13], the MLflow tracking helps to recover and query experimental data and results. Tools like ML projects and MLflow models allow implementing ML models in the environment. A model registration feature helps to store and manage models in a central repository. In addition, it has builtin integration with TensorFlow, PyTorch, Keras, python, Kubernetes, docker, etc. Many organizations such as Databricks, Toyota, Accenture, Facebook, and Microsoft are employing and contributing to MLflow, which easily provides community support for resolving bugs.

IV. GITHUB OPERATIONS
GitOps or Github Operations has been considered as a continuous deployment method for cloud-native applications [21]. It can also be termed a delivery tool that uses a pullbased model, in contrast, employing a push-based model. The core idea of GitOps is to leverage the Git repository which contains the details of the infrastructure required in a production environment. It has an automated process to handle necessary steps required for deployment. For example, it can deploy a new application or update an existing application by simply updating the repository. It accesses a repository or an image registry, and users can give developers direct access to the environment. Tools such as ArgoCd, Flux and Fleet are developed to maintain the GitOps workflow.
GitOps supports the management of multiple pipelines by configuring different build pipelines to update the environment repository and helps to configure an operator or deployment pipeline to react to changes in a branch [22]. The deployment approach for GitOps can be implemented in two ways: pushbased and pull-based deployments. The difference between these two deployment types is how the deployment environment matches the desired infrastructure. Pull-based approaches should be chosen whenever possible because they are deemed more secure and better practices for implementing GitOps.

V. OPEN RESEARCH CHALLENGES
Over time organizations have noticed the significance of MLOps in executing a constructive production pipeline. However, MLOps has still in its infancy, and most firms are still working on the best way to adapt it for their specific projects [23].
• An issue that develops in the early stages is about monitoring the effectiveness of AI models and a poor understanding of solution needs can hurt solution performance. The changes in information are more frequent that can disrupt the entire model even though the collected data is free from errors. • The developers are still more inclined towards manually testing and deploying AI models in production as they are not assertive on automatically delivering each change. • To comprehend and port the code from one library to the next is regularly nontrivial. The ascent of numerous libraries for AI development and the distinctive foundation knowledge of the specialists produced challenges for coding. Libraries, for example, Tensorflow, Keras, and Pytorch have alternate spines which makes a similar application appear to be unique from each other. • In most of the cases, the development and production teams are out of sync and communicate only at the end of solution design. An approval is required in case someone on the team changes a requirement that has to be reflected on the production server making the whole process slow.
VI. RELATED WORKS The literature [24] describes an optimized approach to implement MLOps using various platforms and tools to automate the execution of AI models. The computer visionbased model has been adapted into manufacturing measures by incorporating the MLOps-based application lifecycle [25]. Also, the sudy paper in [19], suggests techniques for applying DevOps and CI/CD in AI applications. Some of the recent works features the issue of quality in AI software [26], [27]. It is also important to focus product quality assurance on the ML framework [28]. The authors in [29] investigates practices for using Jupyter notebooks and suggests to identify new methods to analyze these notebooks. The proposed literature [30] aims to repeatedly test the post-deployment quality of AI models on real-time data considering a black-box approach.
VII. CONCLUSION As part of this exploratory research, we gathered information about the current MLOps, and the key motivators behind having operational processes that can facilitate clear and efficient workflow for delivering machine learning solutions. We inherited ideas from traditional software development, specifically the CI/CD techniques and presented use-cases for when those practices could be valuable in the machine learning development lifecycle. We proposed 3 different levels of MLOps that vary in efficiency and the amount of resources required to set them up, because the understanding is that not every ML solution would require similar amount of provisioning. The level 3 of MLOps is the most sophisticated solution proposed and we recommend using it in any enterprise machine learning solution. This level of granularity would achieve the most efficient and automated development workflow as it leverages the industry standard tools and techniques that have successfully delivered enterprise level software solutions in the past decade. In future work, we plan to produce a demo using a proof of concept applications to compare all three approaches for different size of applications.