Build intelligent serverless applications - BRK3352

Build intelligent serverless applications - BRK3352

Show Video

Before we get started I'm gonna give you a brief introduction to serverless technology, I'm, just an overview of what we're going to do today first. I'll introduce server, lists tell you all about what server list is then, I'll do a brief introduction to Azure functions, then. I'll go through a demo. Of. Doing. Out-of-the-box. Intelligent. Applications. So Ashur, provides a lot of technology. That helps you get started very easily building. Applications. And particularly, intelligent, applications so, we're gonna go through a cool demo there then. We're, going to go into a more detailed example. Of what you can do when the problems a little more complex may be custom, to your company, and, we'll. Go through how a juror can help you there as well so without, further ado what, is serverless. In. Order to tell the story I'm going to go through kind of the history of the, evolution of cloud. Development so. Before. The cloud everything, was on premise we, had to deal with a lot, of things ourselves we had to buy machines we, had to, physically. Operate. On them we had to upload. Our code we had to manage, the physical security of our data centers with. The advent of the cloud all of these things went away. So. That was on premise and then all these things were, supposed to go away, with. Aya's however what we got was actually management. Of our logical infrastructure, instead of management of our physical infrastructure, so, you still have to think about all of these questions how, do i patch, security. Vulnerabilities. How do I deploy. My code how many VMS do i want to run on all of these are things that you still have to think about as an application developer. So. That was the move to infrastructure. Of the service one. More step in that direction is, platform as a service so, with platform as a service user developer, you have to think much less about the infrastructure, we handle all of the underlying things for you so for instance rather than saying I. Have. Full control over this virtual, machine I do everything on it you say I, would, like two VMs please and then azor handles the rest a really, great past, service that azor has is a giraffe service. Shot. Up to Gen picking if a great session yesterday on Azure have service, anyway. The. The, section here is that a juror. Is managing the platform level for you and, since Azure functions is built on top of better servus we get a lot of really robust platform features from there as well and. Moving. One further, step in the direction of abstraction, is serverless so, server lists you, don't even have to worry about the scale of your application at all so rather than even saying I would like to VMs you say here's my code here's my application I would, like it to run and whenever. It runs. It. Runs you don't need to worry about anything further than that you don't have to manage any of the infrastructure, yourself so, that brings us to our kind, of core definition of server lists in three pieces one. It is a full abstraction, of servers so you as a developer don't have to think about any of it you as a developer focus only on what's unique to your business you write your code that is business. Logic you, don't worry about infrastructure, management. Next. It, is the event-driven, instance. Scale aspect, of serverless so. Everything. With serverless is based on events I have an event come in if triggers something that something. Happens and when, many more events come in many. More things happen and. All, of its scales dynamically, on the fly for. You. Last. Is a paper, use so, as you can imagine if we have a system that scales dynamically, it's. Impossible. For us to bill you based on a flat rate for the infrastructure, because the infrastructure, is changing all the time so we. Bill you based on what you actually use and, what this means is that you haven't if you have an outer function or a natural logic app or any. Of our other server those technologies, that isn't being executed, it. Just sits there you don't pay. For anything when it's not, being executed, which. Is really really powerful. And a, lot of people a, lot of our customers really really appreciate that for. Instance if you have something that's executing, once every say once every hour you pay once every hour, so. I think the value proposition there is pretty clear.

So. It wouldn't be Microsoft if we didn't have a really robust. Platform fleshed, out around all of the. Service. Components, at the core of our service platform here in Azure we have three main services event. Grid functions, and launch gaps so, I talked, a little bit about eventing I talked about how all of the, the kind of core of server lists in Azure and elsewhere. Is reacting. To events so, if M good is the solution that lets you. Those events it's kind of the eventing backbone to our service platform. Functions. Is compute. So functions lets you run one small piece of code that will, react to events do. Whatever you need to do expressed, in code so the, possibilities, are endless and then logic apps lets you do visual workflows and, orchestrate, processes, and the really cool part of a logic apps is that it integrates out-of-the-box, with over 200 first party and third party services. That. Being said, other. Than those three services we have many other Azure services as well that play very nicely with the rest of the server list platform so, while, these services, like stream, analytics aad. Might not necessarily be considered serverless, themselves, it's very easy to layer them with other parts of your application to build a service application. One. Of our other things that we're really proud of and I think we do very well here and Azure is the local development support, and the, kind of just entire developer ecosystem. We. Have out-of-the-box, support for Azure functions with visual studio and Visual Studio code we have a command-line interface called the other functions, core tools which lets you very easily use. Azure functions in whatever idea, you'd like you can develop anywhere and then via the command line deploy, and, kind. Of do your management operations and then. Yeah. We go from there also, we, have really great DevOps. Integration, with Azure, DevOps, which is recently, rebranded from VSDs, so I think I'm still allowed to say the STS but. Also one. Other thing I'd like to highlight is with application, insights and some other technologies, in Azure we have really great robust monitoring solutions as well so. You can know exactly what's happening with your code even, though we're managing it. So. Let's. Get a little bit more in depth into what actually Azure functions is, because. We'll. Be introducing it later on and it builds on some core concepts that you should be familiar with first. We have events so, events are the source it's what triggers your application, this.

Can Be many many different services, in Azure and some, outside of Azure as well but the the main things you would need to worry about are. The. Main things you can build your applications with are these. Triggers. So the first thing you need to think about is what's triggering my function and. Once once, you have that figured out you can build the rest so. Example. Triggers are HTTP, you can have a web hook call your call your function you can have a timer you can have many different asher services such as if you say, upload a blob. To blob storage and. From. There. Your. Code executes, so. Your code is whatever, you express you can write your as your functions in a c-sharp, Java, scripts and. Some. Other languages as well we'll. Get onto that later. Then. We have this really great model. This programming model that we're really proud of bindings. So with. Your function you have one trigger and then, you can also have input and output bindings so what this does for you is it lets you, worry about in your code only the actual piece of logic that you need to write so we'll go and handle negotiating. With other SDKs, we'll go and fetch resources, for you and then we'll go place them elsewhere as well it, makes it very easy for you to write code because, the only thing you have to worry about is what's actually, happening. What's actually unique to your business you don't have to worry about, say. Fetching, a blob, from blob storage because we handle that for you. So. Let's. Move on to intelligent, applications, that's why you're all here. What's. The definition of an intelligent application. Very. Broadly speaking it. Is any application, which. Takes. Advantage of machine learning or artificial. Intelligence now that's an incredibly broad definition, and. I keep it very broad intentionally, because really. The scope of what you can do here is pretty limit list anything. Which takes advantage of machine learning or a I is. An intelligent, application which means that, with the help of a lot of different services that we have here in Azure you can build some of these yourself so. First I want to highlight two examples, of intelligent, applications just to give you some inspiration, I guess the, first is this picture here on the left which is a, woman, using Cortana so, Cortana is. Microsoft's. Speech, recognition software you, can call out to. The. Microsoft graph you can basically ask. It questions in, real time it'll go and figure, out things, about what, you're doing later in the day for instance or. Do, a search for you and it's, a really really powerful, powerful. Technology, and, as you can imagine it's, completely, built on artificial, intelligence and machine learning so, that is, obviously. An example, of an enterprise-grade like, very large-scale intelligent. Application, but, the other example I have here is something, that's much less. Much. Less large. I guess III think that. Using. These big examples, of really powerful machine learning algorithms, makes, it seem infeasible. For you and your company to unless. Your say like Microsoft. Or Google or something to actually make intelligent applications, but that's not that's not the case because there are many places that, you. Can introduce intelligence, into your applications, without actually. Having the entire core purpose of the application be intelligent, so, for instance I have on the right someone using PowerPoint this is a presentation, I am giving in PowerPoint, in PowerPoint they recently introduced. Something in the design tab called design ideas and I think it's a really fantastic feature, if you haven't checked it out so. What it does is you take. A slide you, add pictures. Or words. Or whatever you'd like to say you click design ideas and then it automatically, will format your slide it'll give you some suggestions to make your slide more visually, appealing for the presentation. This. Is this is this was super powerful because when I was foreseeing.

It It was well anyone, can do this it's you can, have a designer go look through your deck or you can spend, a ton of time making things look good or you can click this button and it will happen for you so. I think this is a really good example of a small feature within an otherwise it's not necessarily, intelligence. Application, that, makes people's, lives way easier and is a really good way to extend a piece of existing functionality. So. Let's, now move into how Asscher can help you with this. So. I have here listed many, many of the different out-of-the-box services, that you can stitch together so, up on the top row. We have all of the different cognitive services ApS cognitive. Services provides. Api's for, a lot of your. Let's. Call them solved problems things that people, do many many different times like facial recognition or, OCR, things. Like that. The. Thing is with. These services we need something to consume them we need something that can actually, call the API we need something that can in. The example of the other two logos, call-out at her machine learning or the bot service so, as. Your functions and logic apps are a really nice fit here logic. Apps particularly, benefits. Very, nicely from these connectors that I mentioned earlier it. Has. Again. Out of the box over 200 different connections and I'll show off a few of them today. Functions. Also is a great fit here because, again. You can call out really anything as you're in code we don't necessarily integrate. Directly with men as many of these services but since you can call a function from a logic app you, can do pretty much anything you want there as well so even, if you keep even if even if we don't integrate directly with this in functions you can call out to it yourself or, additionally. Call out to it by integrating, with logic apps. So. Without with that I'll, do a demo of this. System, I set up here so let's flip over to my laptop. So. A sovery, and i recently. That's. Here is, me this is me. There. We go. It's. Gonna be hard I'm just gonna do okay. There. We go, cool. So. Stephanie sovery, and I recently started a company it's called contoso, mobile or c mobile. We. As, you, can imagine it's a very large telecommunications, company so we have many different things we have to worry about and, one of the things I first took on as a part of my work, at C Mobile was, this support. System so in, C. Mobile we have we use freshdesk, this, ticketing, system that, helps us figure, out what's wrong and kind of address customer issues. So. As, you can see we have these two issues here and, what I've done is I've set up an application using as your logic apps that integrates directly with this freshdesk, to, parse. My tickets so when a new ticket comes in it, will parse. The, sentiment, of the, ticket and depending, on whether the person was very upset or very satisfied. It, will increase, or decrease the priority of the ticket and then send me a notification. Via Microsoft teams either way. So. Let's. Go into and let's. Go into logic apps and show you just how that works. So. This is the logic apps designer. It's, a visual workflow designer, that lets you very easily integrate, with many other services, so, first we, have our trigger. The. Trigger. As. You can see here it, connects, with freshdesk, I didn't. Need to do anything other than enter my credentials for freshdesk, and it automatically, connected and maintains that connection through the duration of my development, with logic apps. Well. The only thing I had to specify here was how often I want it to check for new items so I check every 5 seconds. Next. We, have a call-out to the cognitive services text, analytics API, so. I get from the previous step the description, of the text that was in the ticket, call-out. To the cognitive services API and it returns as a results, a, bunch. Of different things and what, I do is, I. Have. A conditional, based on that first. Thing I have to do for that conditional, is actually. Change. The. The. String to a float so, logic caps makes that very easy I'll go ahead and do it again on the fly by.

Going, Down to expression and I'll have to scroll down to, I, could have just typed this but floats then. I go to back to dynamic content and I find the thing that I actually wants to make a float of so let's say the, score, so I want the float of this score, and then, what I do is check whether that's above or below 0.5. So. It's if it's less than 0.5 that means someone was upset I know that my API returns a result between 0 and 1 so if it's closer to 0 then it's someone that is more negative right now it's a pretty simple, binary classification, but, we could make this more complicated if we'd like later on and, what, I do is then. I go to. Here. Which will, if it is true if someone's upset I will update the ticket with the same ticket ID with, a high priority now so, I changed this from whatever it was to high and, keep. Everything else the same and then after I do this I post a message the team's again it was very easy to integrate with teams all I had to do was provide my connection information and. Then I will. Post, a message to this high priority, it's channel with, the sentiment, and the ID of the ticket so I know which one to go look at or. I know that a new ticket is there in the, false branch of the tree I do the same exact thing except, I set the priority too low and send it to a different teams channel one that says low, priority tickets. So. Let's, actually see this in action, so. I'm going to go over here create a new ticket and. I. First have to enter contact information I, will. Give. You all my email Oh. Oops. There. We go now. I find me and our. Subject is going to be so do we want this alright let's do a show of hands who wants this to be a positive query. Positive. Ticket. All. Right negative ticket. So. - terrible. Presentation. And. This I'm going to keep it low priority because it'll, get updated and this. Was bad. Do. Better. So, I'll create that ticket and then we wait just a few seconds and I. Nice. I. Go. Over logic apps and we can see here an overview or activity, log I'm not going to save my changes because it's exactly the same and. I go into overview, and overview, will tell me my runs, so, here's the run that just happened it succeeded so let's go ahead and look at that and. Just, to prove you before we do that I'll go to my team's channel and it. Will be high priority tickets and we. Can see a message that just sent today at 6:17. A.m. because I'm still set on West, Coast time, anyway. Let's. Move back to the portal so I've proved you that works and let's go through what happens in the logic app so it tells me very easily that these steps succeeded I created. A ticket I detected the sentiment the conditional, was true and then. This was a no op and the other side of the branch was successful. As well what's, really easy with logic apps though is if you fail. An execution, for instance like, say, this run you. Have right there in your details what, actually, happened during the run so for instance here in the conditional, it's, telling me that my, here, I'm this. Is probably, a little small on the screen but what it says is, the. Template function les, expects, two parameters, of matching types the first was float this string. Did not match so. Obviously. I had a typecasting, error I had, the result of my API was a string and. I was trying to compare it to 0.5 so, in, order to fix that I just went and changed my logic app add that little typecast, that you saw at the beginning. But. As you can see it's very easy for you to debug what's happening in your logic app so since we have a record right here of every run what actually went wrong.

So. To summarize, that goes through an example of how you can out-of-the-box, build an intelligent application with logic apps very, easily with all of these different connectors, we offer and from. There make intelligent decisions. That. Help, improve. Your business processes so. Let's. Switch back to the deck and. Before. We move on I just want to go through one more time what, are the benefits of server lists and let's. Think about how they apply here so, what. Are the benefits server list number one it lets you focus particularly, on your, business problem you don't have to worry about the underlying technology, I spend, very little time when I was building this or, even on stage thinking about this I spoke, very little time thinking about the, infrastructure, that was running my code everything was happening so ruthlessly when, I wanted if. Many. Many many more tickets, were to come in at once this would happen automatically, the resources, would provision by themselves, and. That's really powerful since I did I as a developer can spend the time writing. Code that's unique to my business and that I don't have to worry about infrastructure. Next. Short of time to market. Kind. Of in the same page I didn't have to worry about anything. Which meant I could develop faster I could fail fast I could move, on to other services, if I decide that I need more finite control but, for the beginning of my previous four, but for the beginning of my application, this, worked and this made it very easy I was I was doing, I was doing a problem that's been solved many times sentiment. Analysis I don't need to build a model myself to, go make something that analysis happen and. Then I could use these out-of-the-box services, to. Integrate. Everything nicely and, make. An overall application, that works very well last. Flexibility. It. With, our service platform we let you do many, many different things so, with. Logic, apps for instance I could have done so many so many other other things, in my in my workflow for, instance if I wanted to send an email or if I wanted to call. Some other API I could have called the natural function write, it right from within logic apps so we have all of these services, that work very well together, which, lets you build applications by layering them. Cool. So with that I'm going to pass it off to a sovery who's going to tell you more about custom, intelligence, to your applications, great. Hi. Everyone. Alright so so far we saw how you can add out-of-the-box, intelligence, to your applications, using cognitive services connectors, in a logic app but. These actions were mostly standard actions, for, instance, determining. The sentiment, on a customer, support ticket is no different from determining, the, sentiment, on a movie review or a restaurant review what. If you wanted to add more custom, intelligence, to your application. That. Was more tailored to your business you case let's. Take a look at an example at, contoso, mobile, we've, been seeing huge, customer, churn over the last few months we've. Had customers who filed several support tickets and have been unsatisfied, and moved over to other cellular providers, or even, those who have been experiencing, a, high rate of call failures and call drops and are almost on the verge of turning. Over to another service. The. Contoso mobile management wants us to build an intelligent, application, that can detect. Customer. Churn before, these, customers, actually decide to leave. The service based on different symptoms so. We can then, run targeted, promotions, to incentivize, the customers to stay on the service, and. Continue. On. What. Do you think about using machine learning in our application. To build a solution and, since, this is a server last session before getting into the very details, of how I can use machine learning I just want to do a little primer on what. Machine learning really means machine. Learning or ml is the process, of examining. Huge amounts of data to recognize, patterns and. Using. Those patterns to generate code that. Can make predictions on brand new data, these. To confidence of machine learning are often referred to as model, training and prediction. All. Right so what is model training entail, the. Very first step to model training is finding, a huge, data set that's relevant, to the problem that you're trying to solve the. More data you have the more accurate, your models bound to be. Once. You've got a data set the next step is to, go ahead and format, it in the way that's acceptable. Or more relevant to your ml. Algorithm, oftentimes, your data is bound to contain, duplicates, conflicting, information missing. Information you, need to clear clean, those out before you can actually start using this data set and. Then. Finally, you. Need to identify a statistical. Algorithm, that's relevant to the ML training process, oftentimes.

Data Scientists, would go back and try different combinations, of prepared, data set and algorithms. To find what, produces, the best or the most accurate, more possible and. But, and, then finally, you're. Gonna trade on the model as I mentioned, you can use different combinations of data set and model, and training algorithm, to find the best or. The most accurate model, here. Once. We've trained a model the next step is to use this model to run predictions, against, brand new input. The. Ferry without. Deploying, your model. All. The work that we do to train a model is really just useless and if you're not able to deploy, the model fast enough people, who are building new, models may not be iterate able, to iterate and test as quickly, as they like to. Second. Step for. Our inferencing. Application, to be able to make predictions, it needs to fetch data from different data sources it, needs to be able to orchestrate with, for instance blob. Storage source. Or a cosmos DB store to. Fetch data that we need to then make an inference on, and. Then. Finally. In. Order to make predictions. In real time I need my application. To be, based. On advanced, to, be invoked by events. Guess. What this is exactly the definition of servlets that we saw earlier in our session. Building. Your inferencing, application. Using, Azure functions, lets you really, focus on the model training. And the prediction, code of your service and not having and, not have to worry about the underlying infrastructure. Or having to take care of the, availability, uptime, or management, of that server. Using. The azure functions, integrated programming. Model you, can use the inbuilt triggers, and bindings, to be able to speak with different sources. To. To fetch input, and and then process that input for prediction. Finally. You, can use the event, based. Nature. Of Azure functions, to be able to invoke, your prediction. Logic, based. On an event, that happens in a source system, and then, you can also scale that prediction logic, out when. For. Instance when there are thousands, of events, that happen at once that you need to scale on. And. Then. Finally, we, have one more requirement which. Is oftentimes. Are traditionally. Models are usually trained using Python, or are they. Don't they, don't exactly have a straightforward API, to be able to make predictions in a different runtime or language.

It's, Recommended, that you, train an, infer, in the same language, that you, train a model in. We've. Got really good news for you today today. We're happy to announce that as your functions now supports, Python you, can develop your applications, using five and three six on the functions, we do runtime that just became generally, available this Monday. You. Can publish your applications. To a server, less hosting, platform, on Linux and you. Can develop using the. Azure functions. Extension. For visual studio code or the command-line tools that you're already familiar with. The. Python, and functions feature is currently in private preview you, can sign up using the link in the screen aka, RMS, functions, Python, preview, to. Try the latest bits and give us your feedback. Okay. With. That let's. Take a look at what, this newly, introduced, Python. Service looks like. For. The purpose of this demo I'll be using the Azure functions, extension, for Wii s code to build, my agile. Functions. This. Extension, provides easy-to-use, commandlets. That I can use to create new functions, from templates create a new project test, it locally etc, let's. Take a look I'm, gonna first go ahead and create our project, in an empty, directory and pick a run time for my project. This. Will go ahead and generate, a function, project for me it's important to understand, that the function project, is the equivalent, of a function, app in Azure and it's. The, container that that, will hold multiple. Functions, that share the same local. And hosting configuration. When. I create a Python, functions project, Visual Studio also. Generates. A couple of extra features for me the, first one is the requirements, that txt, file this is the place where you can specify all, your Python dependencies, that you'd like to install, to. The environment, and Azure or if you're testing locally. It. Also generates, a. Virtual. Environment for, me that I can use to. Build and test build, and test locally. Now. I've got a functions project, here going the. Next step would be to go ahead and create an actual function, in this project, when. I try to create a new function I've got the option of picking from. From a variety of trigger templates. Let's. Go ahead and pick HTTP. Trigger, for. Our project and I'll give this a friendly name and, you. Can pick the authorization. Level, let's pick anonymous, for the demo. Going. Back to our file system, what. This did is in my function project, I have, a new directory, called. Hello that's the name I gave my function which. Contains, two. Important, files the first one to note here is the function JSON, configuration. This. Contains information about, any of the data sources, that you need to that. An function, needs to bind to we often refer to these as bindings. I've got. Two bindings, here for my function the, very first one is an HTTP, trigger. Is to be trigger of HTP request type, and the. Second is an output binding which is the names to be response, I'll. Use, the name parameters your image. For each of the bindings, to bind this, data to my actual, Python function, which. Brings me to the second file which is the actual Python script this, is the entry point for your function, and. Will, consume, the input binding which is they should be requests and produce. An HTTP, response as, they return, within. My. Within. My Azure function, code I can go ahead and use this data coming from the binding to manipulate. It and run my logic and then finally produce an output. This. Specific logic on the screen will look. For a name parameter, in, the query string and then, go ahead and use it to. Print, to. Print a hello name. Message. Since. The azure functions, runtime is open-source, you, can run it locally on your own machine before you even publish your functions to Azure and, with. The capability, that we as code provides I can simply go ahead and f5. Into my function to start the functions, runtime. So, this this, already attached my debugger to my process and I, can see that it's created, a local lowest endpoint that I can use, to trigger my function. Let's. Go ahead and set a, breakpoint, in, my function right here and. Then. I can go ahead and, start. My function, you. Can see the breakpoint was quickly hit since this was only a hello world example, and, then I can go ahead and, provide. A name in the query string. To. Go. Ahead and finish the function. All. Right, so switching, back. Let's. Take a look at how we can use what, we just learned the newly introduced, fresh off the press pythons, important functions, to. Bring. Some value to the customer to an example we were talking about earlier. The. Very first step to predicting. Customer. Churn is going to be trained, training a model training, a model typically take can.

Take Months. And months of time or even years of research, today we have a couple of minutes here so I'm not going to be training a model on the fly but. Let's take a look at how, what. Steps I can take to train a model and then I'll use the results from a previous run in my, Asha function. Today. I'll be using the, azure ml, Studio for data, preparation, and model training I've. Already imported a data set and this is an open data set from an hour from, a French telecom company called orange bits. Are publicly available data, and data set I already. Went ahead and, applied a few transformations, to. Make sure that I get rid of any not. Applicable, values, any duplicate. Information or. An even, information, that's not really relevant to my training process. Once. I've got the data prepped up here I can, go ahead and import it into my training. Experiment, for. To. Actually use the algorithm to produce the model the. Very first step already, spoke. About this we import the prepared. Data into my experiment. Ii. I can go ahead and now encode. Any columns, in my dear. Said that contained categorical. Information, this, involves, our inverting. Any of the enum values, into into. Information that's more. Tangible, more, understandable, to my machine learning algorithm, so. That so that's the second step in, coding the data and then, finally, I can go ahead and, identify. A model, identify. An algorithm, to train my model for. This experiment, I used, the. Nice base base, model to actually train, my. Model. Using the data I'd already prepared. That you saw earlier. Finally. As an optional step, you can go ahead and test the, actual accuracy, of the model to determine if that's, the right combination. Of prepared. Data and statistical, algorithm, that you want to use and, iterate. Multiple, times until you make sure that you're finding the most accurate model, possible. Okay. Now. That I've got a model let's talk a little more about how, I can deploy this model, and a, prediction, script as part of my Azure function, for. The purpose of the customer churn example, we'll, use customer. Input, from, a blob storage I'll upload a CSV file, to the blob storage and then consume, that in my eyes or function, to, run it against the model, that we just trained, and. Produce, an output in the form of, a. Determination, whether the customer is going to be churning, or not. Okay. Back, to visual studio I've, got a function project. Very similar to the hello world example that, we saw earlier, this, one's a little different, because. It contains a function called predict, that. I've that. I have here, and. I've added the model this is the pickled model that we trained in the earlier demo and I've, ordered added. The model as a dependency, to my function I've. Got a function JSON, and this time it uses a blob trigger input to, invoke my function, and then, finally, the function, script.

We. Need to understand the function script a little bit more it, has, three steps the very first one is to, initiate, or load, the pickled model into our function. It'll. Use the helper, function right here and, you can see it's injecting. The model that we'd added earlier as a dependency, to the function the. Second part is to go ahead and format, the, input data into. A. Into. A form that is more understandable. By our, model. We. Can go ahead and use, a. Second, function here which is using the, pandas library, to convert, our data in our CSV data into. A data, frame that. Our algorithm, would understand, and then, finally, we can go ahead and use, the. The, actual prediction, method. That will encode, our input. And run it against, the. And. Run it against the model to create a prediction, and, then. Finally, we can go ahead and log. Our prediction, to the console, as. A final output, let's. Go ahead and run this application. Let's. Give it another try. Okay. Um. I think. I know what the issue is coming. Back. Let's. Start a function house now. All. Right so my function what. This is I did it was started, the functions, Asha functions, runtime and the Python worker now. My function source is ready and listening in on any events that might happen in the blob. So. It can go ahead and process that input from the blob now. We can go ahead and. Upload. A. Sample. Input, to the blob storage. I've. Got a customer record here which has some information about again, the call failure call drop rate, information. About the monthly bill and. And, so on I will, go ahead and upload. The. CSV, file to the. Blob storage so my function can start consuming it. And. So. This is an event that I was speaking of an event in the source system that is capable of going ahead in triggering. My function and, as. You, can see here. My. Function triggered and, the. Prediction, script went ahead and generated, a determination. And. As we saw earlier a one means that we were able to determine. That the customer is more likely to churn than, not. So. You saw how simple it, was for me to train a model to write.

A Prediction script, and package those up into an Asscher function, to, deploy service, server, Leslie to the cloud one, of the pieces that I did not cover in this demo was publishing to Azure the, visual studio code extension, makes it equally easy to publish my function to Azure and. Within. A year we have a couple of hosting, models available that, Kobe, will now be talking about in, just a second.

2018-10-04 13:00

Show Video

Other news