Giter VIP home page Giter VIP logo

engineeringmlops's Introduction

Engineering MLOps

Book Name

This is the code repository for Engineering MLOps, published by Packt.

Rapidly build, test, and manage production-ready machine learning life cycles at scale

What is this book about?

MLOps is a systematic approach to building, deploying, and monitoring machine learning (ML) solutions. It is an engineering discipline that can be applied to various industries and use cases. This book presents comprehensive insights into MLOps coupled with real-world examples to help you to write programs, train robust and scalable ML models, and build ML pipelines to train and deploy models securely in production. This book covers the following exciting features:

  • Formulate data governance strategies and pipelines for ML training and deployment
  • Get to grips with implementing ML pipelines, CI/CD pipelines, and ML monitoring pipelines
  • Design a robust and scalable microservice and API for test and production environments
  • Curate your custom CD processes for related use cases and organizations
  • Monitor ML models, including monitoring data drift, model drift, and application performance
  • Build and maintain automated ML systems

If you feel this book is for you, get your copy today!

https://www.packtpub.com/

Instructions and Navigations

All of the code is organized into folders. For example, Chapter06.

The code will look like the following:

ws = Workspace.from_config()
model1 = Model(ws, 'support-vector-classifier')
model2 = Model(ws, 'scaler')
service = Model.deploy(workspace=ws,
                       name='weatherprediction',
                       models=[model1, model2],
                       inference_config=inference_config,
                       deployment_config=aciconfig)
service.wait_for_deployment(show_output=True)

Following is what you need for this book: This MLOps book is for data scientists, software engineers, DevOps engineers, machine learning engineers, and business and technology leaders who want to build, deploy, and maintain ML systems in production using MLOps principles and techniques. Basic knowledge of machine learning is necessary to get started with this book.

With the following software and hardware list you can run all code files present in the book (Chapter 1-13).

Software and Hardware List

Chapter Software required OS required
1-13 Python, Git, Microsoft Azure, Azure ML Service, MLFlow, Azure DevOps Windows, Mac OS X, and Linux (Any)
8 Docker, Fast API Windows, Mac OS X, and Linux (Any)
9 Locust.io Windows, Mac OS X, and Linux (Any)
10 Kubernetes Windows, Mac OS X, and Linux (Any)

We also provide a PDF file that has color images of the screenshots/diagrams used in this book. Click here to download it.

Related products

Errata

  • Page 20 (Under Deploy): Figure 1.12 depicts the deploy pipeline, which has two components should be Figure 1.11 depicts the deploy pipeline, which has two components

Get to Know the Author

Emmanuel Raj is a Finland-based Senior Machine Learning Engineer with 6+ years of industry experience. He is also a Machine Learning Engineer at TietoEvry and a Member of the European AI Alliance at the European Commission. He is passionate about democratizing AI and bringing research and academia to industry. He holds a Master of Engineering degree in Big Data Analytics from Arcada University of Applied Sciences. He has a keen interest in R&D in technologies such as Edge AI, Blockchain, NLP, MLOps and Robotics. He believes "the best way to learn is to teach", he is passionate about sharing and learning new technologies with others.

Download a free PDF

If you have already purchased a print or Kindle version of this book, you can get a DRM-free PDF version at no cost.
Simply click on the link to claim your free PDF.

https://packt.link/free-ebook/9781800562882

engineeringmlops's People

Contributors

arjunvarma39 avatar ayaanhoda avatar emmanuelraj7 avatar packt-itservice avatar packtutkarshr avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

engineeringmlops's Issues

Response Code: 502 : Content: b"run() got an unexpected keyword argument 'method'"

Getting this error after running this code

import json

input_payload = json.dumps({
'data': [[34.927778, 0.24, 7.3899, 83, 16.1000, 1016.51, 1]],
'method': 'predict' # If you have a classification model, you can get probabilities by changing this to 'predict_proba'.
})

output = service.run(input_payload)

print(output)

error :
Received bad response from service. More information can be found by calling .get_logs() on the webservice object.
Response Code: 502
Headers: {'Connection': 'keep-alive', 'Content-Length': '49', 'Content-Type': 'text/html; charset=utf-8', 'Date': 'Tue, 26 Apr 2022 06:17:44 GMT', 'Server': 'nginx/1.10.3 (Ubuntu)', 'X-Ms-Request-Id': '0ebd06ec-7bda-47b3-882c-97c73148a5de', 'X-Ms-Run-Function-Failed': 'True'}
Content: b"run() got an unexpected keyword argument 'method'"


WebserviceException Traceback (most recent call last)
in
7 })
8
----> 9 output = service.run(input_payload)
10
11 print(output)

/anaconda/envs/azureml_py38/lib/python3.8/site-packages/azureml/core/webservice/aci.py in run(self, input_data)
398 return resp.json()
399 else:
--> 400 raise WebserviceException('Received bad response from service. More information can be found by calling '
401 '.get_logs() on the webservice object.\n'
402 'Response Code: {}\n'

WebserviceException: WebserviceException:
Message: Received bad response from service. More information can be found by calling .get_logs() on the webservice object.
Response Code: 502
Headers: {'Connection': 'keep-alive', 'Content-Length': '49', 'Content-Type': 'text/html; charset=utf-8', 'Date': 'Tue, 26 Apr 2022 06:17:44 GMT', 'Server': 'nginx/1.10.3 (Ubuntu)', 'X-Ms-Request-Id': '0ebd06ec-7bda-47b3-882c-97c73148a5de', 'X-Ms-Run-Function-Failed': 'True'}
Content: b"run() got an unexpected keyword argument 'method'"
InnerException None
ErrorResponse
{
"error": {
"message": "Received bad response from service. More information can be found by calling .get_logs() on the webservice object.\nResponse Code: 502\nHeaders: {'Connection': 'keep-alive', 'Content-Length': '49', 'Content-Type': 'text/html; charset=utf-8', 'Date': 'Tue, 26 Apr 2022 06:17:44 GMT', 'Server': 'nginx/1.10.3 (Ubuntu)', 'X-Ms-Request-Id': '0ebd06ec-7bda-47b3-882c-97c73148a5de', 'X-Ms-Run-Function-Failed': 'True'}\nContent: b"run() got an unexpected keyword argument 'method'""
}
}

Model input shape vs score.py input shape

I was working through this repository about deploying models with Azure and noticed that the model input shape is (1,6). However, in both 06_Model_Deployment and 07_CICD_Pipelines, score.py expects an input of shape (1,7) and tries to pass that shape to the model.

When using https://github.com/PacktPublishing/EngineeringMLOps/blob/master/12_Model_Serving_Monitoring/inference.py, I am giving an array of shape (1,7).
This throws the error that either I should change the input shape or the model.

Is there something wrong in how I am creating the model or in consuming it?

azureml-sdk install

Regarding Chp 3 and the Azure ML SDK install. The given install command of: $pip3 install --upgrade azureml-sdk created a few issues for me. For background, I am using a virtual environment and my python version is 3.9 - which appears to be a significant issue. Using the given install command was taking a very, very long time and seemed to be getting nowhere.

I'll reference this issue: Azure/MachineLearningNotebooks#1285 which outlines the python version problem.

I've tried to solve the issue by following one of the suggested fixes of installing with the flag: --ignore-requires-python.

I'm raising this issue to hopefully get guidance on whether this fix would work and also potentially help anyone else following along.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.