<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Viktor Sjölind on Medium]]></title>
        <description><![CDATA[Stories by Viktor Sjölind on Medium]]></description>
        <link>https://medium.com/@viktor.sjolind_70884?source=rss-d10894cd4f7b------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*Bdg3t1GORSnLnHEi6INBRg.jpeg</url>
            <title>Stories by Viktor Sjölind on Medium</title>
            <link>https://medium.com/@viktor.sjolind_70884?source=rss-d10894cd4f7b------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 28 Nov 2026 05:03:28 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@viktor.sjolind_70884/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[AI-Enhanced Automation]]></title>
            <link>https://medium.com/if-tech/ai-enhanced-automation-2b21601f0405?source=rss-d10894cd4f7b------2</link>
            <guid isPermaLink="false">https://medium.com/p/2b21601f0405</guid>
            <category><![CDATA[insurance]]></category>
            <category><![CDATA[automation]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[technology]]></category>
            <dc:creator><![CDATA[Viktor Sjölind]]></dc:creator>
            <pubDate>Thu, 12 Jun 2025 06:57:57 GMT</pubDate>
            <atom:updated>2025-06-12T07:12:44.145Z</atom:updated>
            <content:encoded><![CDATA[<p><a href="https://www.if-insurance.com/about-if">If P&amp;C Insurance</a> handles 1,4 million claims annually — half of them are handled within 24 hours from reporting [1], demonstrating the dedication of the company to provide a good level of service to customers. This is made possible by well-designed business processes and automations.</p><p>Recent advancements in AI, raises interest in applying such technologies to further improve insurances processes. This article will describe one success story that pushes AI usage, we will see together how we could improve the insurance claims handling process by using AI in a real scenario.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*kbdup4E6NOBrOu0tH2PrXw.jpeg" /></figure><h3>Business context</h3><p>Before diving into details, let’s look at the business context in which the AI helped us to improve process automation.</p><blockquote><a href="https://www.if-insurance.com/about-if">If P&amp;C Insurance </a>operates in the Nordics and Baltic regions and handles a substantial volume of claims. Any tweaks to the processes could have significant impacts.</blockquote><p>We selected a particular process where claim handlers manually identify specific claims, which requires specialized knowledge. Scaling human expertise in this process posed challenges as it was time consuming to educate everyone to do the task, human capacity could neither handle the huge volume of claims that needs to be processed in an efficient way.</p><p>Therefore, a project was launched to integrate AI into the workflow, creating a “human-in-the-loop” system where AI assists humans in identifying claims. Introducing AI into existing workflows raises questions: How can we understand the change? What side effects occur? These questions are not easy to answer considering that both humans and AI will work in parallel, which needs to be taken into account when analysing the impact.</p><p>To gain insights into these questions, an AI-enhanced workflow was developed and run side-by-side to a traditional human only process. For analysing such complex setup, the workflows were analysed using Object-Centric Process Mining (OCPM) [2]. Unlike traditional process mining, which focuses on a sequence of activities from a single perspective e.g. one insurance claim handled by a human, OCPM offers a broader perspective that allows the analysis from multiple perspectives, both human and AI in this case. By using OCPM, connections can be revealed between claims, AI tasks, employees, data points and the whole ecosystem surrounding both the AI-enhanced and traditional workflows. An abstract visualization of the concepts is shown in Figure 1.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/405/1*HBKMmAJDnyTpHI5i6_G3_g.png" /><figcaption>Figure 1: Conceptual visualization of traditional process mining with separate perspectives and models per process, compared to OCPM with a single model offering multiple perspectives.</figcaption></figure><h3>Our analysis strategy</h3><p>Analysis is an interesting yet complex topic.</p><p>While intuition can offer initial insights, modern analysis mostly relies on data-driven analysis techniques, which requires a rigorous setup to make a sound conclusion. We setup a strategy to develop and employ AI in our process and analyse its impact to make sure how it contributed to overall process.</p><blockquote>We did not reinvent the wheel, which is not wise in modern process improvement landscape. Instead, we tried to use previously built frameworks and adjust them to define our analysis foundation.</blockquote><p>Those frameworks are Business Process Reengineering (BPR) [3] for the overall structure when redesigning processes, CRoss-Industry Standard Process for Data Mining (CRISP-DM) [4] methodology for the AI model development, and OCPM2 [5] for analysing the impact of the AI-enhanced workflow. The overall strategy is shown in Figure 2.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/469/1*S10LKqeZYUuuwW3MoRZL5w.png" /><figcaption>Figure 2: Research methodology.</figcaption></figure><h3>Applying AI</h3><p>For utilizing the AI, we used pretrained large language models (LLMs) with prompting techniques and in-context learning without any traditional task-specific finetuning of the models. Instead, the techniques such as chain-of-thought and few-shot learning were applied by collaborators from the technical team and domain experts to understand the business problem and the technical tools at disposal. Chain-of-thought is a technique where the problem statement is built up step-by-step and few-shot learning is about providing positive and negative example pairs of input and output of the AI model. As LLMs provides output in free-text format by default, it is also necessary to ensure the output was in a consistent format that could easily be read by other IT systems. To achieve a consistent output format, techniques such as structured output provided by OpenAI were applied.</p><p>To be able to evaluate the models, a dataset with the correct results for the claims were created by business specialists, which acted as a ground truth for evaluating the AI through different iterations. Throughout the project, different models were tested, including a small language model (SLM) Phi-3 by Microsoft and the LLMs Mistral Large and gpt-4o. As the company operates in the Nordic and Baltic regions, some data points were free-text data in the local language. For that reason, the AI was run with input data and prompts, both in the local language and a translated to English version, in parallel to identify differences between how the models handle different languages.</p><h3>Architecture</h3><p>To achieve the business goal, the implementation consisted of the following high-level components built on top of Microsoft Azure cloud, as shown in Figure 3:</p><p><strong>Data storage:</strong> we leverage a combination of analytical data lakes and operational data APIs to gather the essential data points. The input data is a combination of unstructured and structured data.</p><p><strong>Data transformation and evaluation:</strong> Databricks is a cloud-based data processing and analysis platform. It is used for extracting data, transforming data to an optimal format for consumption by AI, and queuing data for AI predictions. The platform also facilitates the evaluation of the results and process analysis, enabling continuous data-driven follow-up.</p><p><strong>Operational service:</strong> Azure Function is a serverless hosting solution, combined with Azure Storage they provide an operational service that manages a queue of prediction requests, different prompts, and stores the results.</p><p><strong>AI:</strong> Azure AI provides access to e.g. OpenAI models, and it is used for managing and deploying state of the art LLMs. It provides data protection mechanisms and models hosted in Europe by Microsoft.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/605/1*smf-HnCVK8oAoDTeVPV8lQ.png" /><figcaption>Figure 3: Infrastructure components and data flow.</figcaption></figure><h3>Process Analysis</h3><p>During the evaluation phase, both the AI-enhanced and human process were run in parallel and both processes analysed the same claims. Introducing AI in the workflow did scale the identification task, which enables managing a significantly larger volume of claims. The identification rate was measured to increase tenfold after introducing AI in the workflow. That increase was also confirmed by business specialists to be within the range of expected results.</p><p>As AI scales the identification task that was traditionally performed by humans, it was observed that entirety of the workflow throughput did not increase, i.e. scaling the identification creates bottlenecks in downstream tasks. After the claims have been identified, further downstream processing is required, which includes work by human specialists. It was assessed that slightly more claims originating from AI than humans, were chosen for further processing. An OCPM example of that is shown in Figure 4.</p><p>The company is now working to scale this aspect of the process to fully leverage the benefits of AI-enhanced claims identification by enabling the processing of a greater volume.</p><blockquote>Our findings highlight the importance of process reengineering holistically to ensure that the enhancements add value to the organization.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/605/1*6xH7qkHMBcpy9YJZaAhvVA.png" /><figcaption>Figure 4: An example of a customized object-centric directly-follows graph showing how many claims are handled by human but missed by AI.</figcaption></figure><h3>Conclusions</h3><p>This project and related material, demonstrates applying AI-enhanced automations in scaling business processes in the insurance sector. By leveraging LLMs and OCPM, we were able to systematically evaluate how AI enhances process scalability. OCPM revealed valuable in-depth insights into the AI transformation, helping us analyse processes and track performance in detail. However, challenges were uncovered in communicating OCPM models to stakeholders.</p><blockquote>Our findings indicate that AI significantly improved identifying claims, however, it also introduced new bottlenecks, highlighting the need for a holistic process redesign when integrating AI solutions.</blockquote><h3>Read More</h3><p>If you are interested in more information and diving deeper into the topic, a <a href="https://arxiv.org/abs/2504.17295">paper is available at arXiv</a>.</p><h3>References</h3><p>[1] “About us,” If P&amp;C Insurance, [Online]. Available: <a href="https://www.if-insurance.com/about-if/about-us">https://www.if-insurance.com/about-if/about-us</a>. [Accessed 30 05 2025].<br>[2] W. M. van der Aalst, “Object-centric process mining: dealing with divergence and convergence in event data,” in Software Engineering and Formal Methods, Springer, 2019, pp. 3–25.<br>[3] J. Motwani, A. Kumar, J. Jiang, M. Youssef and e. al, in Business process reengineering: A theoretical framework and an integrated model, International Journal of Operations &amp; Production Management 18(9/10), 1998, p. 964–977.<br>[4] P. Chapman, J. Clinton, R. Kerber, T. Khabaza, T. Reinartz, C. Shearer and R. Wirth, in CRISP-DM 1.0: Step-by-step data mining guide, SPSS inc, 9(13), 2000, pp. 1–73.<br><a href="https://arxiv.org/abs/2503.10735">[5] N. Miri, S. Khayatbashi, J. Zdravkovic and A. Jalali, “OCPM²: Extending the Process Mining Methodology for Object-Centric Event Data Extraction,” in BPMDS, Vienna, 2025.</a> <br><a href="https://arxiv.org/abs/2504.17295">[6] S. Khayatbashi, V. Sjölind, A. Granåker and A. Jalali, “AI-Enhanced Business Process Automation: A Case Study in the Insurance Domain Using Object-Centric Process Mining,” in BPMDS, Vienna, 2025.</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2b21601f0405" width="1" height="1" alt=""><hr><p><a href="https://medium.com/if-tech/ai-enhanced-automation-2b21601f0405">AI-Enhanced Automation</a> was originally published in <a href="https://medium.com/if-tech">If Technology</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[End-to-End Machine Learning from Databricks to Containerized API Hosting]]></title>
            <link>https://medium.com/if-tech/end-to-end-machine-learning-from-databricks-to-containerized-api-hosting-30724316812e?source=rss-d10894cd4f7b------2</link>
            <guid isPermaLink="false">https://medium.com/p/30724316812e</guid>
            <category><![CDATA[mlops]]></category>
            <category><![CDATA[azure]]></category>
            <category><![CDATA[databricks]]></category>
            <category><![CDATA[docker]]></category>
            <category><![CDATA[machine-learning]]></category>
            <dc:creator><![CDATA[Viktor Sjölind]]></dc:creator>
            <pubDate>Wed, 21 Dec 2022 07:30:36 GMT</pubDate>
            <atom:updated>2022-12-21T07:32:18.528Z</atom:updated>
            <content:encoded><![CDATA[<h4>This article will describe an end-to-end machine learning example involving Databricks and containerized model hosting with Azure Container Apps or in simpler terms, bringing MLOps to the people.</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*LRmwdSwmi_64DJE8YvtMDw.png" /></figure><p><strong>Introduction</strong></p><p>Machine Learning Operations (MLOps) is a set of practices that aim to improve the efficiency and reliability of deploying machine learning models. Some of the focus areas for these practices are automations, reproducibility, scalability, deployments, and collaboration between people involved in the processes. The aim of this article is to demonstrate a technical implementation of MLOps practices where a machine learning model is trained in Databricks, packaging of the model and a REST API into a Docker image, and finally deploying everything to a container orchestration service for online inference.</p><p>Worth noting is that this article is not intended to demonstrate e.g. extensive access management and network security mechanisms that would be required for a production grade solution. It is, however, possible for the eager reader to further develop this example implementation.</p><p><strong>Overview</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*VPL-1LwRx7rQu8RGNfFAIA.png" /><figcaption>Components of the project</figcaption></figure><p>The components of this project will consist of:</p><ul><li>Data for training and evaluating the model.</li><li>Data analysis, data preparation, model training, model evaluation, and model storage inside Databricks.</li><li>REST API developed with Python and the FastAPI framework.</li><li>Azure DevOps Git Repositories for version control of the code bases.</li><li>Azure DevOps Pipelines for packaging and deploying the model and REST API into a container image.</li><li>Azure Container Registry for storing the container images.</li><li>Azure Container Apps for hosting containers.</li></ul><p><strong>Model Development</strong></p><p>Databricks is a platform that provides tools for data analysis and model development among other data related usage areas. Databricks provides a managed MLflow service and collaborative Python platform, which will be used for data preparation, model training, and model evaluation.</p><p>The data we will work with is from Capital Bikeshare and we will develop a model that predicts the number of bike rentals. The first step is to load the data and start analyzing the different columns. The value we want to predict (label) is the rentals column. We also have numeric columns related to e.g., temperature and categorical columns such as the weather situation.</p><pre># Explore and analyze the data, understand what are the important features<br># that correlate to the label<br>import pandas as pd <br><br>data = pd.read_csv(&#39;../daily-bike-share.csv&#39;)<br>data.head()</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/761/1*9KrZO8teY5T-47a4Mc0zUg.png" /><figcaption>Daily biking data set</figcaption></figure><p>The goal of the analysis is to find features that are useful for the prediction. The Pandas framework can be used to calculate a correlation value between columns. We can also create a scatter plot to visually confirm that to some extent there is a correlation between e.g. higher temperature and higher number of bike rentals.</p><pre>import matplotlib.pyplot as plt<br><br>fig = plt.figure()<br>ax = fig.gca()<br>correlation = data[&#39;temp&#39;].corr(data[&#39;rentals&#39;])<br>ax.set_title(f&#39;Correlation: {correlation}&#39;)<br>plt.scatter(x=data[&#39;temp&#39;], y=data[&#39;rentals&#39;])<br>plt.xlabel(&#39;Temperature&#39;)<br>plt.ylabel(&#39;Rentals&#39;)<br>plt.show()</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/376/1*MHB7V_zBOGb2SC_nwzi8lg.png" /><figcaption>Correlation between temperature and rentals</figcaption></figure><p>Performing a similar analysis on one of the categorical features; the weather situation, we can draw a conclusion that clear weather also correlates with higher number of bike rentals.</p><pre># Weathersit: 1 = clear, 2= mist/cloud, 3 = light rain/snow<br>fig = plt.figure(figsize=(10, 6))<br>ax = fig.gca()<br>bike_data.boxplot(column = &#39;rentals&#39;, by = &#39;weathersit&#39;, ax = ax)<br>ax.set_title(&#39;Label by Weather situation&#39;)<br>ax.set_ylabel(&quot;Bike Rentals&quot;)<br>plt.show()</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/581/1*VcWcJ9fo0LILpb7f61Xs4g.png" /></figure><p>Some of the columns have different ranges and could therefore cause unnecessary skewness to the predictions. This can be avoided by performing e.g. normalization of the numeric values using the scikit-learn framework.</p><p>After exploring and modifying the data set, we can start training a model. MLflow can be used to log metrics and files (e.g., plots of metrics) related to the model performance to an MLflow Experiment, where different model training runs can be compared to see which, one performs better. Once we are happy with a model, it can be registered to the Databricks Model Registry.</p><pre>from sklearn.linear_model import LinearRegression<br>from sklearn.ensemble import RandomForestRegressor<br>from sklearn.metrics import mean_absolute_error, r2_score<br>import mlflow<br><br># Train Linear Regression Model<br>def train_linear_regression_model(df_train_x, df_train_y, fit_intercept=True):<br>    model = LinearRegression(fit_intercept=fit_intercept)<br>    model.fit(X = df_train_x, y = df_train_y)<br>    return model<br><br># Train Random Forest Regressor<br>def train_random_forest_regressor_model(df_train_x, df_train_y):<br>    model = RandomForestRegressor()<br>    model.fit(X = df_train_x, y = df_train_y)<br>    return model<br><br># Log Model Performance<br>def log_model_performance(model, X_test, y_test, run_name):<br>    with mlflow.start_run(run_name = run_name):<br>        mlflow.sklearn.log_model(model, &quot;Bike Rentals&quot;)<br>        y_pred = model.predict(X_test)<br><br>        mse = mean_absolute_error(y_test, y_pred)<br>        r2 = r2_score(y_test, y_pred)<br><br>        plt.scatter(y_test, y_pred)<br>        plt.xlabel(&#39;y_test&#39;)<br>        plt.ylabel(&#39;y_pred&#39;)<br>        plt.title(&#39;Bike Rentals&#39;)<br>        plt.show()                <br><br>        mlflow.log_metrics({<br>            &quot;r2&quot;:r2,<br>            &quot;mse&quot;:mse<br>        }) <br><br>lr_model = train_linear_regression_model(X_train, y_train)<br>log_model_performance(lr_model, X_test, y_test, &quot;Linear Regression&quot;)<br><br>rfr_model = train_random_forest_regressor_model(X_train, y_train)<br>log_model_performance(rfr_model, X_test, y_test, &quot;Random Forest Regressor&quot;)</pre><p>The visualization below describes a machine learning lifecycle and the building blocks that make up the flow between the different components such as Experiments and Model Registry when working with the described setup.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/940/1*ee0aTRWlZuxiNX33s-D6cA.png" /><figcaption>Machine Learning lifecycle</figcaption></figure><p>It is important to note the difference between the model and the model code. The model is registered in the model registry and will be downloaded to the API as a standalone component, while the code for the model development is stored in a git repository and referenced in Databricks for further model development.</p><p><strong>REST API Development</strong></p><p>After preparing the model, we can start developing a REST API to serve a prediction endpoint that will perform predictions of the number of rentals given an input. The Python programming language and FastAPI framework will be used for developing the REST API. FastAPI provides both good performance and ease of use to make the development phase quick.</p><p>The model will be downloaded and loaded on startup of the REST API. A prediction endpoint is defined alongside a data model for the input. The data model is simply a wrapper and definition of what features that are expected. The endpoint will accept an input that is converted to a Pandas DataFrame which is accepted as input to the MLflow predict method for scikit-learn models.</p><pre># Data model representing features/input<br>class Record(BaseModel):<br>    season: int<br>    mnth: int<br>    holiday: int<br>    weekday: int<br>    workingday: int<br>    weathersit: int<br>    temp: float<br>    atemp: float<br>    hum: float<br>    windspeed: float<br><br><br>@app.on_event(&quot;startup&quot;)<br>async def startup_load_model():<br>    global MODEL<br>    MODEL = mlflow.sklearn.load_model(&quot;./model&quot;)<br><br><br>@app.post(&quot;/predict&quot;)<br>async def predict(data: List[Record]):  <br>    input_df = pd.DataFrame(jsonable_encoder(data))<br><br>    model_output = MODEL.predict(input_df)<br><br>    response = int(model_output)<br><br>    return {&quot;prediction&quot;: response}</pre><p>For downloading the model, a Powershell script will be used for running Databricks-CLI, which provides an abstraction layer for the Databricks REST API. The dbfs command can be used for downloading an artifact of the model since models registered in Databricks Model Registry are stored as artifacts in the Databricks File System (DBFS).</p><pre>$URI = &quot;.../model-versions/get-download-uri&quot;<br><br>$parameters = @{<br>    name = $env:MODEL_NAME<br>    version = $env:MODEL_VERSION<br>}<br><br>$response = Invoke-RestMethod -Uri $URI -Body $parameters -Authentication Bearer -Token $TOKEN<br>dbfs cp -r $response.artifact_uri &quot;./model&quot;</pre><p>To avoid a situation where code only runs on a specific machine configuration, Docker can be used for packaging applications and all their dependencies as container images. An image act as a template to run a container consistently in any environment. A basic image for this case would fetch Python, install the Python dependencies, copy the model, copy the source code, and lastly start the asynchronous uvicorn web server that FastAPI runs on. An example Docker file for this purpose is shown below.</p><pre>FROM python:3.9<br><br>WORKDIR /code<br><br>COPY ./requirements.txt /code/requirements.txt<br><br>RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt<br><br>COPY ./app /code/app<br><br>COPY ./model /code/model<br><br>CMD [&quot;uvicorn&quot;, &quot;app.main:app&quot;, &quot;--host&quot;, &quot;0.0.0.0&quot;, &quot;--port&quot;, &quot;80&quot;]</pre><p><strong>Deployment Pipeline</strong></p><p>The REST API source code will be combined with the model artifact into one container image, which can be deployed to the Azure Container Registry and referenced from the Azure Container Apps. To perform these steps automatically, they will be run in an Azure DevOps pipeline. The pipeline will run towards the repository of the REST API for the model hosting. The pipeline will consist of two stages:</p><p>Build:</p><ul><li>Run a Powershell script that downloads the model from Databricks.</li><li>Build and push the Docker image with all dependencies to Azure Container Registry.</li></ul><p>Update:</p><ul><li>Communicate to Azure Container Apps that the new image should be used.</li></ul><p>Azure DevOps Pipelines support Powershell and Docker tasks, which makes it easy to run the download script, build an image, and upload it to a container registry. Azure Container Apps is still a relatively new service without its own pipeline task, but it is possible to use Azure CLI to perform an update to the service and reference a new version of the image.</p><pre>stages:<br>- stage: Build<br>  displayName: Build<br>  jobs:<br>  - job: BuildImage<br>    displayName: Build Image<br>    pool:<br>      vmImage: $(vmImageName)<br>    steps:<br>    - task: Powershell@2<br>      displayName: Download model<br>      inputs: <br>        targetType: filePath<br>        filePath: scripts/downloadModel.ps1<br>        pwsh: true<br>      env:<br>        DATABRICKS_TOKEN: $(DATABRICKS_TOKEN)<br>        DATABRICKS_HOST: $(DATABRICKS_HOST)<br>        MODEL_NAME: $(MODEL_NAME)<br>        MODEL_VERSION: $(MODEL_VERSION)<br>    - task: Docker@2<br>      displayName: Build and push an image to container registry<br>      inputs:<br>        command: buildAndPush<br>        repository: $(imageRepository)<br>        dockerfile: $(dockerfilePath)<br>        containerRegistry: $(registryServiceConnection)<br>        tags: |<br>          $(tag)<br>- stage: Update<br>  displayName: Update Container Apps<br>  jobs:<br>  - job: Update<br>    displayName: Update Container Apps with New Image<br>    pool:<br>      vmImage: $(vmImageName)<br>    steps:<br>    - task: AzureCLI@2<br>      displayName: &#39;Update Container Apps&#39;<br>      inputs:<br>        azureSubscription: $(azureServiceConnection)<br>        scriptType: pscore<br>        scriptLocation: inlineScript<br>        inlineScript: |<br>          az config set extension.use_dynamic_install=yes_without_prompt<br>          az containerapp update -n $(CONTAINER_APP) -g $(RESOURCE_GROUP) --image &quot;$(CONTAINER_REGISTRY)/$(imageRepository):$(Build.BuildId)&quot;</pre><p><strong>Container Orchestration</strong></p><p>Azure Container Apps is a new platform by Microsoft that provides a fully managed serverless container service for deploying applications at scale. Container Apps enables executing application code packaged in any container and provides a near plug and play experience for containers. It does not, however, provide direct access to the underlying Kubernetes API.</p><p>At the time of writing, Azure Container Apps are not fully supported by the popular Infrastructure as Code tool Terraform. It is possible to use a REST API wrapper for Azure ARM REST API as a Terraform provider, which would enable the usage of Terraform for managing the infrastructure of this project. However, to make the infrastructure deployment simpler for the purpose of this article, Azure CLI comes to the rescue again. The four commands below are used for deploying a resource group, Azure Container App Environment where Azure Container Apps are run, and an Azure Container Registry for storing the images.</p><pre>az group create --name $RESOURCE_GROUP --location $LOCATION<br><br>az containerapp env create --name $CONTAINER_APPS_ENVIRONMENT \<br>    --resource-group $RESOURCE_GROUP --location $LOCATION<br><br>az containerapp create --name $CONTAINER_APPS --resource-group $RESOURCE_GROUP \<br>    --environment $CONTAINER_APPS_ENVIRONMENT \<br>    --image mcr.microsoft.com/azuredocs/containerapps-helloworld:latest \<br>    --target-port 80 --ingress &#39;external&#39; --query properties.configuration.ingress.fqdn<br><br>az acr create --resource-group $RESOURCE_GROUP --name $CONTAINER_REGISTRY --sku Basic</pre><p><strong>Result</strong></p><p>With everything in place, it is possible to run a request against the prediction endpoint and receive a response 😊.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/616/1*dYmIPPS50r3_EPtxaQd_mA.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=30724316812e" width="1" height="1" alt=""><hr><p><a href="https://medium.com/if-tech/end-to-end-machine-learning-from-databricks-to-containerized-api-hosting-30724316812e">End-to-End Machine Learning from Databricks to Containerized API Hosting</a> was originally published in <a href="https://medium.com/if-tech">If Technology</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>