pdfcoffee

soumyasankar99
from soumyasankar99 More from this publisher
09.05.2023 Views

Chapter 12Microsoft Azure NotebooksMicrosoft offers Azure Notebooks, a free service for anyone to develop and runcode in their web-browser using Jupyter. It supports Python 2, Python 3, R and F#and their popular packages. It is a general code authoring, executing, and sharingplatform. According to Microsoft documentation, one can use Notebooks in diversescenarios: like giving an online webinar, giving a PowerPoint-like presentation withexecutable codes in slides, or learning a new model. The service is free. However,to stop abuse, they have put network limitations; at present there is a 4 GB memorylimit per user, and a 1 GB data limit.Azure Notebooks is a thriving place, with many existing and exciting notebooksshared by the DL community. You can access them here: https://github.com/jupyter/jupyter/wiki/A-gallery-of-interesting-Jupyter-Notebooks.Like Colaboratory, Azure Notebooks have most packages preinstalled, and if yourequire, you can install new packages via !pip install. You can run any Unixcommand line command with a prefixing exclamation mark. To be able to useAzure Notebooks, you will need to open an account. You can use your existingMicrosoft account, or create a new one. It even offers an option to create a ChildAccount to encourage young people to learn programming, and these accountshave parental control.Some packages may not yet be available in Azure Notebooks.You can access data directly through the notebook interface using upload/downloadcommands. You can even download data from a URL using !wget url_address.Now that we've looked at the cloud services and the VMs that can help us toperform our training, let's look at how we can move into the production stage,using TensorFlow Extended.TensorFlow Extended for productionTFX is an end-to-end platform for deploying machine learning pipelines. A partof the TensorFlow ecosystem, it provides a configuration framework and sharedlibraries so as to integrate the common components needed to define, launch, andmonitor software based on ML models. TFX includes many of the requirements forproduction software deployments and best practices, viz: scalability, consistency,testability, safety and security, and so on.[ 455 ]

TensorFlow and CloudIt starts with ingesting your data, followed by data validation, feature engineering,training, and serving. Google has created libraries for each major phase of thepipeline, and there are frameworks for a wide range of deployment targets. TFXimplements a series of ML pipeline components. All of this is made possibleby creating horizontal layers for things like pipeline storage, configuration, andorchestration. These layers are very important for managing and optimizingthe pipelines and the applications that you run on them.You will need to install it first. TensorFlow Extended can be installed using the pipcommand:pip install tfxIn the following section we will cover the fundamentals of TFX, its architecture,and the various libraries available within it.TFX PipelinesThe TFX pipeline consists of a sequence of components that implement anML pipeline, specifically, ensuring the scalability and high performance of theunderlined ML task. It includes modeling, training, inference, and deploymentto web or mobile targets. A TFX pipeline includes several components, with eachcomponent consisting of three main elements: Driver, Executor, and and thePublisher. The driver queries the metadata store and supplies the resultant metadatato the executor, publisher accepts the results of the executor and saves then inmetadata. The executor is the one performing all the processing. As an ML softwaredeveloper, you will need to write code that runs in the executor depending upon thecomponent class you are working with:[ 456 ]

TensorFlow and Cloud

It starts with ingesting your data, followed by data validation, feature engineering,

training, and serving. Google has created libraries for each major phase of the

pipeline, and there are frameworks for a wide range of deployment targets. TFX

implements a series of ML pipeline components. All of this is made possible

by creating horizontal layers for things like pipeline storage, configuration, and

orchestration. These layers are very important for managing and optimizing

the pipelines and the applications that you run on them.

You will need to install it first. TensorFlow Extended can be installed using the pip

command:

pip install tfx

In the following section we will cover the fundamentals of TFX, its architecture,

and the various libraries available within it.

TFX Pipelines

The TFX pipeline consists of a sequence of components that implement an

ML pipeline, specifically, ensuring the scalability and high performance of the

underlined ML task. It includes modeling, training, inference, and deployment

to web or mobile targets. A TFX pipeline includes several components, with each

component consisting of three main elements: Driver, Executor, and and the

Publisher. The driver queries the metadata store and supplies the resultant metadata

to the executor, publisher accepts the results of the executor and saves then in

metadata. The executor is the one performing all the processing. As an ML software

developer, you will need to write code that runs in the executor depending upon the

component class you are working with:

[ 456 ]

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!