Search icon
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Machine Learning Engineering  with Python - Second Edition

You're reading from  Machine Learning Engineering with Python - Second Edition

Product type Book
Published in Aug 2023
Publisher Packt
ISBN-13 9781837631964
Pages 462 pages
Edition 2nd Edition
Languages
Author (1):
Andrew P. McMahon Andrew P. McMahon
Profile icon Andrew P. McMahon

Table of Contents (12) Chapters

Preface 1. Introduction to ML Engineering 2. The Machine Learning Development Process 3. From Model to Model Factory 4. Packaging Up 5. Deployment Patterns and Tools 6. Scaling Up 7. Deep Learning, Generative AI, and LLMOps 8. Building an Example ML Microservice 9. Building an Extract, Transform, Machine Learning Use Case 10. Other Books You May Enjoy
11. Index

Building your package

In our example, we can package up our solution using the setuptools library. In order to do this, you must create a file called setup.py that contains the important metadata for your solution, including the location of the relevant packages it requires. An example of setup.py is shown in the following code block. This shows how to do this for a simple package that wraps some of the outlier detection functionality we have been mentioning in this chapter:

from setuptools import setup
setup(name='outliers',
     version='0.1',
     description='A simple package to wrap some outlier detection functionality',
     author='Andrew McMahon',
     license='MIT',
     packages=['outliers'],
     zip_safe=False)

We can see that setuptools allows you to supply metadata such as the name of the package, the version number, and the software license. Once you have this file in the root directory of your project, you can...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at €14.99/month. Cancel anytime}