Simply, Just Python in the Cloud

Published Jul 28 2021 12:25 PM 1,976 Views
Microsoft

 

simply_python_banner.png

 

tl;dr

This is a "lean" tutorial of basics of running your code in Azure.  With your data residing in storage alongside a VM in the cloud, without exploring the labyrinthine complexity of Azure, and using the newly-released VS-Code "Azure Machine Learning - Remote" extension, programming on the VM is as simple as developing code on your local machine, but with the scaling benefits of the Cloud. It's the first step to exploiting what cloud computing  with Azure Machine Learning(AML) has to offer.

 

Cloud services offer many options, Azure more than others; but with such variety it's hard to know where to start. Let's assume you've already subscribed to Azure, and have started to learn your way around Azure's web portal, `portal.azure.com,`---its universal graphical interface for setting up and managing web resources. The general management term for Cloud components, services, and products is "resources." If this is not familiar to you, search for an online course in Azure Fundamentals that covers things like subscriptions, resource groups, regions, etc. Harvard's DS intro so that you feel comfortable using the Azure web portal. Keep in mind most on-line training is targeted at enterprise users, with more detail than you'll need to know about to start. Assumedly you're interested in fast results at reasonable cost, and the enterprise user's overriding concerns also include availability, reliability and other "ilities" are not your immediate concern---you'll get there eventually. In this tutorial you will create a few Azure ML resources interactively in the Azure Portal, then do development by a combination of either VS-Code or command line tools. I assume you are facile with programming and working at the command line. I'll target specifically our task of moving your Python application to run in the Cloud, infested with my strong personal biases to avoid common pitfalls, based on my experience.

 

Why would you want to move your code to a machine in the Cloud? For scale. Azure has some huge machines, vast network bandwidth, and almost infinite memory. Surprisingly, applications with large computational loads may be faster on a single machine than on a cluster, and easier to set up. Of course if your aim is to run petabytes of data, or train billion-node neural networks there are suitable VM-cluster solutions. Either via cluster or large VM, it's a great boon for any large scale problem, not only conventional machine learning applications, but for those large scale MCMC tasks, or training on GPUs.

 

Cloud resources

Cloud services consist essentially of three kinds of resources: compute, storage, and networking. The collection of your application resources are designated a "resource group"---a logical construct for creating, tracking and tearing down a cloud application. Your resource group needs to include a Machine Learning Workspace, a convenient collection of resources that itself is a kind of resource. Find it here in the Azure's graphical interface, portal.azure.com:

portal_machine_learning.png

Go ahead and create one. The Portal prompts are kind enough to offer to create a new resource group and new component resources for it's Storage account and others. Take the defaults and go ahead and create new component resources. Just remember the Workspace name, and use the same resource group name for additional resources you create in your application. If you make a mistake it's easy to delete the whole resource group and start again.

 

Compute

In simple terms, compute consists of virtual machines (VMs), from tiny VM images to VMs with enormous RAM and GPUs, bigger than anything you would ever have at your desk. The Workspace doesn't come with any default compute resources, since it gives you a choice of creating individual VMs, VM compute clusters, or using your existing compute resources. For this tutorial you need to create a "Compute instance"---a single VM---by choosing a size that meets your need. These Ubuntu VMs created in Azure Machine Learning Studio (AML) are managed VMs---with most all software needed already installed and with updates managed for you. This takes the work of setting up and configuring the VM off your shoulders. Alternatively Azure still offers legacy "Data Science VMs" that come with extensive pre-installed ML tools, but except for some special purposes, (such as running Windows OS) AML Compute Instances can take their place.

 

Storage

Storage also is available at scale. But unlike with your desktop, primary storage is not a file system running on a disk local to the VM, but a separate component with an access API. One reason is that storage is permanent, but VMs come and go; start them when you need work done, then tear them down to save money. Storage consists of "blobs" with strong guarantees of persistence and redundancy. A key point in this tutorial is demonstrating how to integrate existing Azure Storage, that might come already loaded with your data.


Networking

Networking services connect compute and storage. Moreover networking in the Cloud consists of software-defined virtual networks that connect to your local "on-premise" equipment and your cloud resources. With cloud resources, Networking glues components together with combinations of local subnets, security services (firewalls), and public-facing IP addresses. For the simple case of a VM with connected storage, the associated network looks like your home network, with a public IP address, and NAT-ed addresses on a subnet. You won't need to know much about this, since it is set up for you when you create a VM. We'll get to that; but the place to start is storage, and getting your data onto it.

 

Setting up your development environment.

The tools you'll need to run your code in the cloud are:

  • VS-Code - Microsoft's open source IDE
  • git: Open source version control

And two Azure resources:

  • Azure Storage
  • An AML Workspace with a Compute Instance.

 

The title illustration shows how these are cobbled together. An AML Workspace brings together an integrated collection of resources: You'll need just two: the managed VM, and attached storage where it keeps the file system with your code. Additionally you'll set up an Azure Storage account, or use an existing one for your data. This isn't truly necessary, but learning to manage storage is good experience. Resource setup and management can be done entirely in the Portal. As for code, you move that to AML version it with git. Then you run your edit-run-debug cycle with two copies of VS-Code running locally. The magic is that one copy is attached to the AML compute instance making it appear as if it's just another local instance.

My focus on using VS-Code for code development, along with two of its Extensions, the Azure ML Extension, and the Azure ML - Remote Extension. Install Extensions from the VS-Code "Activity Bar", found in a column on far left, that look like this:
extensions_icons.pngThe Azure icon will be used to launch remote sessions.

As an open-source project, the momentum to improve and expand VS-Code is worth noting, as told by its dedicated blog. Hard-core Python developers may have a preference for other dedicated Python tools such as PyCharm or Spyder, however in this tutorial I'm using Microsoft's VS-Code  for its elegant project management, symbolic debugging, and Extensions, which integrate nicely with Azure. For these reasons I prefer it to Microsoft's legacy Visual Studio IDE Tools for Python.

 

So install VS-Code if you don't have it already.

 

Besides your Azure subscription, git, and VS-Code you'll need the az command line package, known as the [Azure command-line interface Azure CLI, and its extension for Azure Machine Learning which work equivalently on either Windows or Unix shells. There are installers for it on the webpage.

The az package manages every Azure resource, and its az reference page is a complete catalog of Azure. It's implemented as a wrapper for Azure's RESTful management API. You rarely need to refer to it directly since VS-Code Extensions will call into az for you, and offer to install it if it's missing. And the Portal exposes the same functionality. But each of these are syntactic sugar over command line tools, and you should be aware of both.

In the long run, the other reason to know about az is for writing scripts to automate management steps. Every time you create a resource in the Portal, it gives you the option to download a "template". A template is just a description in JSON of the resource you've created. Using az you can invoke ARM (the Azure Resource Manager) to automate creating it. ARM is a declarative language for resource management that reduces resource creation to a single command. Look into the az deployment group create... command for details.

Commands specific to Azure Machine Learning (AML) in the az extension need to be installed separately. az will prompt you to do this the first time you use az ml.

Don't confuse the az CLI with the Azure python SDK that has overlapping functionality. Below is an example using the SDK to read from Storage programmatically. Most things you can do with the az CLI are also exposed as an SDK in the python azureml package.

Finally, to check that az is working try to authenticate your local machine your Cloud subscription. Follow the directions when you run

 

 

 

 

 

 

$ az login

 

 

 

 

 

 

You do this once at the start. Subsequent az commands will not need authentication.

 

The Application

Ok, you've got your code and data, and installed tools. Let's begin! Assume you've gone ahead and got a new AML Workspace, the steps are

  1.  Setup Storage,
  2.  Prepare your code,
  3.  Create a compute instance, and
  4.  Launch a remote VS-Code session.

One option when you are done with your code is to deploy it by wrapping it in a "RESTful" API call as an Azure Function Application. This exposes your application as an "endpoint", callable from the Web. Building an Azure Function could be the subject of another tutorial.

 

First thing - Prepare your data. It pays to keep your data in the Cloud.

Storage, such as Azure blob storage is cheap, fast and seemingly infinite in capacity; it costs about two cents a gigabyte per month, with minor charges for moving data around. For both cost and network bandwidth reasons you are better off moving your data one time to the cloud and not running your code in the Cloud against your data stored locally. In short, you'll create a storage account, then create a container---the equivalent of a hierarchical file system---of "Azure Data Lake Generation 2" (ADL2) blob storage. There are numerous alternatives to blob storage, and even more premium options to run pretty much any database software on Azure you can imagine, but for the batch computations you intend to run, the place to start is with ADL2 blob storage.

Blob storage appears as files organized in a hierarchical directory structure. As the name implies, it treats data as just a chunk of bytes, oblivious to file format. Use csv files if you want, but I suggest you use a binary format like parquet for its compression, speed and comprehension of defined data-types.

Perhaps your data is already in the Cloud. If not the easiest way to create storage is using the Portal---"create a resource", then follow the prompts. It doesn't need to be in the same resource group as your Workspace, the choice is yours. The one critical choice you need to make is to select enable_dls_gen2.PNG 

Essentially this is blob storage that supersedes the original blob storage that was built on a flat file system. Note that "Azure Data Lake Gen 1" storage is not blob storage for reasons not worth going into and I will ignore it.

You can upload data interactively using this Portal page. Here's an example for a container named "data-od." It takes a few clicks from the top level storage account page to navigate to the storage container and path to get here. It contains file and directory manipulation commands much like the desktop "File Explorer."

portal_storage_panel.png

Later I will show how to programmatically read and write data to storage.

 

In the lean style of this tutorial, I've included only the absolute minimum of the Byzantine collection of features that make up Azure ML. Azure ML has it's own data storage, or more accurately, thinly wraps existing Azure Storage components as "DataSets," adding metadata to your tables, and authenticating to Storage for you, which is nice. However, the underlying storage resource is accessible if you bother to look. This tutorial---an end run around these advanced features---is good practice even if only done once, to understand how Azure ML storage is constituted.

 

Prepare your code

Going against the common wisdom, I recommend you should convert your notebook code to Python modules once you get past initial exploratory analysis. If you are wed to using notebooks, VMs work just fine: Both Azure ML workspaces and Spark clusters let you run notebooks, but you will be limited going forward in managing, debugging, testing, and deploying your code. Notebooks are great for exploring your data, but when developing code for subsequent use one get's tired of their limitations:

  • They don't play well with `git`. If there are merge conflicts between versions, it's a real headache to diff them and edit the conflicts.
  • They get huge once filled data and graphics. Either strip them of output before you commit them, to keep them manageable. Or convert them to html as a sharable, self-documenting document.
  • As your code grows, all the goodness of modular, debuggable object-oriented code is missing. Honestly the symbolic debugger in VS-Code is worth the effort of conversion, not to mention the manageability of keeping code organized by function in separate modules.
  • Python modules encourage you to build tests, a necessary practice for reliable extension, reuse, sharing and, productionizing code.

 

So relegate notebooks to run-once experiments, and promote blocks of code to separate files that can be tested and debugged easily.

Jupyter generates a .py file from a notebook for you at the command line with

 

 

 

 

 

$ jupyter nbconvert --to-py <your notebook>.ipynb

 

 

 

 

 

Rely on git

git deserves true homage. As your projects scale and you collaborate with others ---the things that make you valuable to your organization---git is the comfortable home for your work. As any SW Engineer knows there's no greater solace and respite from the wrath of your colleagues if you've "broken the build" to be able to revert to a working state with just a few commands. Having an documented history is also a gift you give to posterity. Arguably the complexity of git dwarfs the complexity of a hierarchical file system, but there's no shame of relying on Stack Overflow each time you step out of your git comfort zone. And believe me, there is a git command for any conceivable task.

Assume your code is in a git repository of your choice. git will be your conveyance to move code back and forth from cloud to local filesystems.

 

Setting up cloud resources - an Azure Machine Learning (AML) Workspace

I assume you've created an AML Workspace. To launch the web version there's the launch_studio.PNG button once you navigate to the Workspace.

 

A tour of the Workspace

The Workspace collects a universe of machine learning-related functions in one place. I'll just touch on a few that this tutorial uses. However the beauty of using VS-Code is that you don't need to go here: Everything you need to do in the Studio can be done from the Azure Remote Extension.

  • compute instances Once inside the Workspace pane, on its left-side menu, there's a "compute" menu item, which brings you to a panel to create a new compute instance. Create one. You have a wide choice of sizes - can you say 64 cores w/128G RAM? Or with 4 NVIDA Teslas? Otherwise it's fine to just accept the defaults. You can start and stop instances to save money when they are not being used.
  • code editing Under "notebooks" (a misnomer) there's a view of the file system that's attached to the Workspace. It is actually a web-based IDE for editing and running code in a pinch. It can include notebooks, plain python files, local git repositories and so on. This file system is hidden in the workspace's associated AML storage, so it persists even when compute instances are deleted. Any new compute instance you create will share this file system.
  • AML storage The Studio does not reveal its connected AML Storage Account, so consider it a black box where the remote file system and other artifacts are stored. For now work with external Azure storage -- why? So you see how to integrate with other Azure services via storage.
    The brave among you can use the Portal to browse the default storage that comes with your workspace. The storage account can be found by its name that starts with a munged version of the workspace name followed by a random string.

Remember the nice thing is that all this Workspace functionality you need is exposed at your desktop by VS-Code Extensions.

 

The development cycle

Let's get to the fun part---how these components work together and give a better experience. Notably the local edit-run-debug cycle for VS-Code is almost indistinguishable when using cloud resources remotely. Additionally both local and remote VS-Code instances are running simultaneously on your desktop, a much smoother experience than running a remote desktop server ("rdp"), or trying to work remotely entirely in the browser. How cool is that!

 

Let's go through the steps.

 

Running locally

Authentication to the cloud is managed by the Azure ML extension to VS-Code; once you are up and running and connected to your Workspace you will not need to authenticate again.

  • Start VS-Code in the local directory in your `git` repository where VS-Code's `.vscode` folder resides. (The launch.json file there configures run-debug sessions for each file. Learn to add configurations to it.)
  • Once you are satisfied the code runs locally, use `git` to commit and push it. If you commit notebooks, it's better to "clean" them of output first, to keep them manageably-sized.
  • Start the Azure ML compute instance from the Azure ML extension. First connect to your Workspace using the Azure Icon (see above) in the VS-Code Activity menu. You can spawn a remote-attached instance of VS-Code from the local VS-Code instance from the well-hidden right-click menu item "Connect to Compute Instance":

connect_to_compute_instance.PNG

This will both start the VM, and spawn a second VS-Code instance on your desktop connected to your remote Workspace file system!

 

Running remotely

Note that the terminal instance that appears in the remotely-connected VS-Code terminal window is running on your VM! No need for setting up a public key for "putty" or ssh to bring up a remote shell. Similarly the file system visible in VS-Code is the Workspace file system. How cool is that!

  • First thing of course is to bring the repository in the Workspace file system current by using git to pull your recent changes. Then it's just edit-run-debug as normal, but with all compute and file access in the cloud.
  • With both VS-Code instances running on your local machine you can work back and forth between local and remote versions simultaneously, transferring code changes with git.
  • In the remote instance, the Azure ML Extension menus are disabled, naturally. It doesn't make sense to spawn a "remote" to a "remote".
  • When you are done spin-down the VM to save money. Your remote file system is preserved in Storage without you needing to do anything.

If you are sloppy about moving files with git (you forgot something, or you need to move a secrets file), note that the remote-attached instance of VS-Code can view either the cloud or local file systems making it a "back door" to move files between them. Advisedly git is used to maintain consistency between code in the two file systems, so use this back door sparingly.

Alternately the remote session can be invoked in the Portal. Try opening a remote VS-Code session on your local machine from the AML Studio notebooks pane. notebook_studio.pngIf your compute instance is running, you can launch a local instance of VS-Code attached remotely to the Workspace's cloud file system (not just the file that's open in the Portal editor) and a shell running on the compute instance. But I think you'll find it's easier to spawn your remote session directly from your local VS-Code instance, than having to go to the Studio pane in Azure ML page in the Portal to launch it.

 

Programmatic adl2 file access

One change you'll need to run your code in the cloud is to replace local file IO.
The primary change to your code is to replace local file system IO calls with calls to the python SDK for Blob Storage. This works both when the code runs locally, or in the VM as you switch your application to work on data in the cloud.

There are several ways to access files for the VM. Here's one way with the Azure python SDK that works with minimal dependencies, albeit it is a lot of code to write. Wrap this in a module, then put your efforts into the computational task at hand. The python SDK defines numerous classes in different packages. This class, DataLakeServiceClient is specific to adl2 blob storage. Locally you'll need to get these packages,

 

 

 

 

$ pip install azure-storage-file-datalake
$ pip install pyarrow

 

 

 

 

pyarrow is needed by pandas. Apache project "arrow" is a in-memory data format that speaks many languages. 

In this code snippet, the first function returns a connection to storage. The second function locates the file, retrieves file contents as a byte string, then converts that to a file object that can be read as a Pandas DataFrame. This method works the same whether you reference the default storage that comes with the Azure ML workspace you created, or some pre-existing storage in other parts of the Azure cloud.
For details see https://docs.microsoft.com/en-us/azure/storage/blobs/data-lake-storage-directory-file-acl-python

 

 

 

 

import pandas as pd
from azure.storage.filedatalake import DataLakeServiceClient

import secrets

def connect_adl2():
    '''Create ADL2 connection objects to blob storage.
    '''
    service_client =\
DataLakeServiceClient(account_url=f"https://{secrets.AZURE_STORAGE_ACCOUNT}.dfs.core.windows.net", credential=secrets.STORAGE_ACCOUNT_KEY)
    # "file system" in this context means container.
    file_system_client = 
    service_client.get_file_system_client(file_system=secrets.CONTAINER)
    return file_system_client

def download_a_file_into_df(absolute_file_path, file_system_client):
    '''Load the file from storage, into a df, from an absolute path in that container.
    '''
    try:
        file_client = file_system_client.get_file_client(absolute_file_path)
        blob_contents = file_client.download_file().readall()
        df = pd.read_parquet(io.BytesIO(blob_contents), engine='pyarrow')
    except Exception as e :
        print(f'ERROR: {e}\nNo blob downloaded for: {secrets.CONTAINER}\
{absolute_file_path}')
        return None
    return df

if __name__ == '__main__':
    client = connect_adl2()
    df = download_a_file_into_df(sys.argv[1], client)
    print(df.describe(), '\nDone!')

 

 

 

 

You can use the __name__ == '__main__' section to embed test code. It doesn't get run when you import the file. But as you develop other scripts that use this one, you can invoke this file with the path to a known blob to test it hasn't broken.

The DataLakeServiceClient authenticates to Azure Storage using an "account key" string that you recover from the Portal, in the Storage Account "Access keys" pane. An account key is an 88 character random string that works as a "password" for your storage account. Copy it from this pane:

access_key.PNG

Since its confidential it doesn't get embedded in the code, but remains hidden in another file secrets.py the local directory that contains only global variable assignments, in this case AZURE_STORAGE_ACCOUNT, STORAGE_ACCOUNT_KEY, and CONTAINER.

Place the file name in your .gitignore file, since it's something you don't want to share. This is a simple way to enforce security, and there are several better, but more involved alternatives. You can keep secrets in environment variables, or even better used Azure "key vault" to store secrets, or just leave secrets management up to Azure ML. Granted account keys are a simple solution, if you manage them carefully when individually developing code, but you'll want to button-down authentication when building code for enterprise systems.

Similarly there are more involved, "code-lite" ways to retrieve blobs. As mentioned Azure ML has it's own thin wrapper and a default storage account created for the Workspace where it's possible to store your data. But as I've argued, you'll want to know how to connect to any Azure data, not just AML-managed data. To put it politely, AML's tendency to "simplify" fundamental cloud services for data science doesn't always make things simpler, and can hide what's under the hood that makes for confusion when the "simple" services don't do what you want.

 

Other services, embellishments, and next steps

For computational tasks that benefit from even more processing power, the cloud offers clusters for distributed computing. But before jumping to a cluster for a distributed processing solution e.g. dask, consider python's multiprocessing module that offers a simple way to take advantage of multiple core machines, and gets around python's single threaded architecture. For an embarrassingly parallel task, use the module to run the same code on multiple datasets, so each task runs in it's own process and returns a result that the parent process receives. The module import is

 

 

 

 

from multiprocessing import Process, Manager

 

 

 

 

The Process class spawns an new OS process for each instance and the Manager class collects the instance's results.

As for going beyond one machine, the sky's the limit. Apache Spark clusters seamlessly integrate coding in Python, R, SQL and Scala, to work interactively with huge datasets, with tools well-tailored for data science. Spark on Azure comes in several flavors, including third party DataBricks, and database-centric integration of Spark and MSSQL clusters branded "Synapse."

 

More machine learning features

The point of this article has been the scaling opportunities available in Azure ML, but did I mention the ML features of Azure ML? In addition to the fun you'll have up-leveling your development to scale, you've started up the learning curve to using Azure's tools for data science. For tracking and comparing results of multiple runs AzureML integrates with `MLFlow`. See this article.  For managing data, AML "DataSets" embellish datafiles with metadata. There is even an SDK for R similar to the python SDK. There are objects for experiments, runs, environments, and model management. "AutoML" automates supervised learning model selection and tuning. That's just a couple examples of how Azure ML repackages services to be a "one stop" shop for machine learning tasks.

 

Azure Function deployment and beyond

Azure can be used not only for running experiments at scale, but for building an application around your code. Cloud applications consist of collections of networked services, running on separate VMs. For convenience one avoids working at the "infrastructure" level and moves to "managed services" where the VMs are not exposed, just the interfaces are, as we did with managed compute instances. You can do the same thing with your code by publishing it to the cloud as a RESTful http endpoint. To your client it looks like a URL except instead of returning a web page it returns the result of your computation. A basic way to build this is by wrapping your code in an Azure Function. An Azure Function typically runs in a few seconds, and doesn't save state from one call to the next. (Saving state is where blob storage comes in, remember?) There are several more featureful alternatives for implementing http endpoints, based on Docker containers for instance, of course some available from the Azure ML Workspace, but all work as managed services, making implementation independent of the platform "infrastructure" it's built on. How to use AFs deserves a separate tutorial, but to get you started, load the Azure Function extension into VS-Code and browse it's features.
Remember when I said that local management for everything comes with az? Well I wasn't telling you the whole truth. For AF you'll need to install separately the Azure Functions Core tools for commands that start with az func. VS-Code will prompt you for this install when you install the VS-Code Azure Functions extension.

Since you're not put-off by writing code, you can proceed to integrate with the full gamut of cloud services: data bases, web hosting, advanced AI, and security---much as your favorite on-line retail site is likely to have done when building an enterprise Azure application.

 

Notes

The VS-Code remote extension source

- https://github.com/microsoft/vscode-tools-for-ai
- https://github.com/MicrosoftDocs/azure-docs/blob/master/articles/machine-learning/how-to-manage-reso...


Python SDK reference

- https://azuresdkdocs.blob.core.windows.net/$web/python/azure-storage-file-datalake/12.0.0b7/azure.st...

%3CLINGO-SUB%20id%3D%22lingo-sub-2591940%22%20slang%3D%22en-US%22%3ESimply%2C%20Just%20Python%20in%20the%20Cloud%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2591940%22%20slang%3D%22en-US%22%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-center%22%20image-alt%3D%22simply_python_banner.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F298704iFD693590BDC9CEEB%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22simply_python_banner.png%22%20alt%3D%22simply_python_banner.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH2%20class%3D%22lia-indent-padding-left-60px%22%20id%3D%22toc-hId--385779460%22%20id%3D%22toc-hId--385779438%22%3Etl%3Bdr%3C%2FH2%3E%0A%3CP%20class%3D%22lia-indent-padding-left-60px%22%3EThis%20is%20a%20%22lean%22%20tutorial%20of%20basics%20of%20running%20your%20code%20in%20Azure.%26nbsp%3B%20With%20your%20data%20residing%20in%20storage%20alongside%20a%20VM%20in%20the%20cloud%2C%20without%20exploring%20the%20labyrinthine%20complexity%20of%20Azure%2C%20and%20using%20the%20newly-released%20VS-Code%20%22Azure%20Machine%20Learning%20-%20Remote%22%20extension%2C%20programming%20on%20the%20VM%20is%20as%20simple%20as%20developing%20code%20on%20your%20local%20machine%2C%20but%20with%20the%20scaling%20benefits%20of%20the%20Cloud.%20It's%20the%20first%20step%20to%20exploiting%20what%20cloud%20computing%26nbsp%3B%20with%20Azure%20Machine%20Learning(AML)%20has%20to%20offer.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ECloud%20services%20offer%20many%20options%2C%20Azure%20more%20than%20others%3B%20but%20with%20such%20variety%20it's%20hard%20to%20know%20where%20to%20start.%20Let's%20assume%20you've%20already%20%3CA%20href%3D%22https%3A%2F%2Fazure.microsoft.com%2Fen-us%2F%22%20target%3D%22_self%22%20rel%3D%22noopener%20noreferrer%22%3Esubscribed%20to%20Azure%3C%2FA%3E%2C%20and%20have%20started%20to%20learn%20your%20way%20around%20Azure's%20web%20portal%2C%20%60portal.azure.com%2C%60---its%20universal%20graphical%20interface%20for%20setting%20up%20and%20managing%20web%20resources.%20The%20general%20management%20term%20for%20Cloud%20components%2C%20services%2C%20and%20products%20is%20%22resources.%22%20If%20this%20is%20not%20familiar%20to%20you%2C%20search%20for%20an%20online%20course%20in%20Azure%20Fundamentals%20that%20covers%20things%20like%20subscriptions%2C%20resource%20groups%2C%20regions%2C%20etc.%20%3CA%20href%3D%22https%3A%2F%2Fdatascience.harvard.edu%2Fazure-tutorials-2020%22%20target%3D%22_self%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3EHarvard's%20DS%20intro%26nbsp%3B%3C%2FA%3Eso%20that%20you%20feel%20comfortable%20using%20the%20Azure%20web%20portal.%20Keep%20in%20mind%20most%20on-line%20training%20is%20targeted%20at%20enterprise%20users%2C%20with%20more%20detail%20than%20you'll%20need%20to%20know%20about%20to%20start.%20Assumedly%20you're%20interested%20in%20fast%20results%20at%20reasonable%20cost%2C%20and%20the%20enterprise%20user's%20overriding%20concerns%20also%20include%20availability%2C%20reliability%20and%20other%20%22ilities%22%20are%20not%20your%20immediate%20concern---you'll%20get%20there%20eventually.%20In%20this%20tutorial%20you%20will%20create%20a%20few%20Azure%20ML%20resources%20interactively%20in%20the%20Azure%20Portal%2C%20then%20do%20development%20by%20a%20combination%20of%20either%20VS-Code%20or%20command%20line%20tools.%20I%20assume%20you%20are%20facile%20with%20programming%20and%20working%20at%20the%20command%20line.%20I'll%20target%20specifically%20our%20task%20of%20moving%20your%20Python%20application%20to%20run%20in%20the%20Cloud%2C%20infested%20with%20my%20strong%20personal%20biases%20to%20avoid%20common%20pitfalls%2C%20based%20on%20my%20experience.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EWhy%20would%20you%20want%20to%20move%20your%20code%20to%20a%20machine%20in%20the%20Cloud%3F%20For%20scale.%20Azure%20has%20some%20huge%20machines%2C%20vast%20network%20bandwidth%2C%20and%20almost%20infinite%20memory.%20Surprisingly%2C%20applications%20with%20large%20computational%20loads%20may%20be%20faster%20on%20a%20single%20machine%20than%20on%20a%20cluster%2C%20and%20easier%20to%20set%20up.%20Of%20course%20if%20your%20aim%20is%20to%20run%20petabytes%20of%20data%2C%20or%20train%20billion-node%20neural%20networks%20there%20are%20suitable%20VM-cluster%20solutions.%20Either%20via%20cluster%20or%20large%20VM%2C%20it's%20a%20great%20boon%20for%20any%20large%20scale%20problem%2C%20not%20only%20conventional%20machine%20learning%20applications%2C%20but%20for%20those%20large%20scale%20MCMC%20tasks%2C%20or%20training%20on%20GPUs.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH2%20id%3D%22toc-hId-2101733373%22%20id%3D%22toc-hId-2101733395%22%3ECloud%20resources%3C%2FH2%3E%0A%3CP%3ECloud%20services%20consist%20essentially%20of%20three%20kinds%20of%20resources%3A%20%3CEM%3Ecompute%2C%20storage%2C%3C%2FEM%3E%20and%20%3CEM%3Enetworking.%3C%2FEM%3E%20The%20collection%20of%20your%20application%20resources%20are%20designated%20a%20%22resource%20group%22---a%20logical%20construct%20for%20creating%2C%20tracking%20and%20tearing%20down%20a%20cloud%20application.%20Your%20resource%20group%20needs%20to%20include%20a%20%3CEM%3EMachine%20Learning%20Workspace%3C%2FEM%3E%2C%20a%20convenient%20collection%20of%20resources%20that%20itself%20is%20a%20kind%20of%20resource.%20Find%20it%20here%20in%20the%20Azure's%20graphical%20interface%2C%20%3CFONT%20color%3D%22%23FF6600%22%3Eportal.azure.com%3A%3C%2FFONT%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-left%22%20image-alt%3D%22portal_machine_learning.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F298705i46AAACCDBD887DC4%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22portal_machine_learning.png%22%20alt%3D%22portal_machine_learning.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3EGo%20ahead%20and%20create%20one.%20The%20Portal%20prompts%20are%20kind%20enough%20to%20offer%20to%20create%20a%20new%20resource%20group%20and%20new%20component%20resources%20for%20it's%20Storage%20account%20and%20others.%20Take%20the%20defaults%20and%20go%20ahead%20and%20create%20new%20component%20resources.%20Just%20remember%20the%20Workspace%20name%2C%20and%20use%20the%20same%20resource%20group%20name%20for%20additional%20resources%20you%20create%20in%20your%20application.%20If%20you%20make%20a%20mistake%20it's%20easy%20to%20delete%20the%20whole%20resource%20group%20and%20start%20again.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH3%20id%3D%22toc-hId--1502672449%22%20id%3D%22toc-hId--1502672427%22%3ECompute%3C%2FH3%3E%0A%3CP%3EIn%20simple%20terms%2C%20%3CEM%3Ecompute%3C%2FEM%3E%20consists%20of%20virtual%20machines%20(VMs)%2C%20from%20tiny%20VM%20images%20to%20VMs%20with%20enormous%20RAM%20and%20GPUs%2C%20bigger%20than%20anything%20you%20would%20ever%20have%20at%20your%20desk.%20The%20Workspace%20doesn't%20come%20with%20any%20default%20compute%20resources%2C%20since%20it%20gives%20you%20a%20choice%20of%20creating%20individual%20VMs%2C%20VM%20compute%20clusters%2C%20or%20using%20your%20existing%20compute%20resources.%20For%20this%20tutorial%20you%20need%20to%20create%20a%20%22Compute%20instance%22---a%20single%20VM---by%20choosing%20a%20size%20that%20meets%20your%20need.%20These%20Ubuntu%20VMs%20created%20in%20Azure%20Machine%20Learning%20Studio%20(AML)%20are%20managed%20VMs---with%20most%20all%20software%20needed%20already%20installed%20and%20with%20updates%20managed%20for%20you.%20This%20takes%20the%20work%20of%20setting%20up%20and%20configuring%20the%20VM%20off%20your%20shoulders.%20Alternatively%20Azure%20still%20offers%20legacy%20%22Data%20Science%20VMs%22%20that%20come%20with%20extensive%20pre-installed%20ML%20tools%2C%20but%20except%20for%20some%20special%20purposes%2C%20(such%20as%20running%20Windows%20OS)%20AML%20Compute%20Instances%20can%20take%20their%20place.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH3%20id%3D%22toc-hId-984840384%22%20id%3D%22toc-hId-984840406%22%3EStorage%3C%2FH3%3E%0A%3CP%3EStorage%20also%20is%20available%20at%20scale.%20But%20unlike%20with%20your%20desktop%2C%20primary%20storage%20is%20not%20a%20file%20system%20running%20on%20a%20disk%20local%20to%20the%20VM%2C%20but%20a%20separate%20component%20with%20an%20access%20API.%20One%20reason%20is%20that%20storage%20is%20permanent%2C%20but%20VMs%20come%20and%20go%3B%20start%20them%20when%20you%20need%20work%20done%2C%20then%20tear%20them%20down%20to%20save%20money.%20Storage%20consists%20of%20%22blobs%22%20with%20strong%20guarantees%20of%20persistence%20and%20redundancy.%20A%20key%20point%20in%20this%20tutorial%20is%20demonstrating%20how%20to%20integrate%20existing%20Azure%20Storage%2C%20that%20might%20come%20already%20loaded%20with%20your%20data.%3C%2FP%3E%0A%3CH3%20id%3D%22toc-hId--822614079%22%20id%3D%22toc-hId--822614057%22%3E%3CBR%20%2F%3ENetworking%3C%2FH3%3E%0A%3CP%3ENetworking%20services%20connect%20%3CEM%3Ecompute%3C%2FEM%3E%20and%20%3CEM%3Estorage%3C%2FEM%3E.%20Moreover%20networking%20in%20the%20Cloud%20consists%20of%20software-defined%20virtual%20networks%20that%20connect%20to%20your%20local%20%22on-premise%22%20equipment%20and%20your%20cloud%20resources.%20With%20cloud%20resources%2C%20Networking%20glues%20components%20together%20with%20combinations%20of%20local%20subnets%2C%20security%20services%20(firewalls)%2C%20and%20public-facing%20IP%20addresses.%20For%20the%20simple%20case%20of%20a%20VM%20with%20connected%20storage%2C%20the%20associated%20network%20looks%20like%20your%20home%20network%2C%20with%20a%20public%20IP%20address%2C%20and%20NAT-ed%20addresses%20on%20a%20subnet.%20You%20won't%20need%20to%20know%20much%20about%20this%2C%20since%20it%20is%20set%20up%20for%20you%20when%20you%20create%20a%20VM.%20We'll%20get%20to%20that%3B%20but%20the%20place%20to%20start%20is%20storage%2C%20and%20getting%20your%20data%20onto%20it.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH3%20id%3D%22toc-hId-1664898754%22%20id%3D%22toc-hId-1664898776%22%3ESetting%20up%20your%20development%20environment.%3C%2FH3%3E%0A%3CP%3EThe%20tools%20you'll%20need%20to%20run%20your%20code%20in%20the%20cloud%20are%3A%3C%2FP%3E%0A%3CUL%3E%0A%3CLI%3EVS-Code%20-%20Microsoft's%20open%20source%20IDE%3C%2FLI%3E%0A%3CLI%3E%3CFONT%20color%3D%22%23FF6600%22%3Egit%3A%26nbsp%3B%3C%2FFONT%3EOpen%20source%20version%20control%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CP%3EAnd%20two%20Azure%20resources%3A%3C%2FP%3E%0A%3CUL%3E%0A%3CLI%3EAzure%20Storage%3C%2FLI%3E%0A%3CLI%3EAn%20AML%20Workspace%20with%20a%20Compute%20Instance.%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EThe%20title%20illustration%20shows%20how%20these%20are%20cobbled%20together.%20An%20AML%20Workspace%20brings%20together%20an%20integrated%20collection%20of%20resources%3A%20You'll%20need%20just%20two%3A%20the%20managed%20VM%2C%20and%20attached%20storage%20where%20it%20keeps%20the%20file%20system%20with%20your%20code.%20Additionally%20you'll%20set%20up%20an%20Azure%20Storage%20account%2C%20or%20use%20an%20existing%20one%20for%20your%20data.%20This%20isn't%20truly%20necessary%2C%20but%20learning%20to%20manage%20storage%20is%20good%20experience.%20Resource%20setup%20and%20management%20can%20be%20done%20entirely%20in%20the%20Portal.%20As%20for%20code%2C%20you%20move%20that%20to%20AML%20version%20it%20with%20%3CFONT%20color%3D%22%23FF6600%22%3Egit%3C%2FFONT%3E.%20Then%20you%20run%20your%20edit-run-debug%20cycle%20with%20%3CEM%3Etwo%20copies%20of%20VS-Code%20running%20locally.%3C%2FEM%3E%20The%20magic%20is%20that%20one%20copy%20is%20attached%20to%20the%20AML%20compute%20instance%20making%20it%20appear%20as%20if%20it's%20just%20another%20local%20instance.%3C%2FP%3E%0A%3CP%3EMy%20focus%20on%20using%20VS-Code%20for%20code%20development%2C%20along%20with%20two%20of%20its%20Extensions%2C%20the%3CEM%3E%20Azure%20ML%3C%2FEM%3E%26nbsp%3B%3CEM%3EExtension%3C%2FEM%3E%2C%20and%20the%20%3CEM%3EAzure%20ML%20-%20Remote%3C%2FEM%3E%20%3CEM%3EExtension%3C%2FEM%3E.%20Install%20Extensions%20from%20the%20VS-Code%20%22Activity%20Bar%22%2C%20found%20in%20a%20column%20on%20far%20left%2C%20that%20look%20like%20this%3A%3CBR%20%2F%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22extensions_icons.png%22%20style%3D%22width%3A%20200px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F298707iA5BCF0474572B904%2Fimage-size%2Fsmall%3Fv%3Dv2%26amp%3Bpx%3D200%22%20role%3D%22button%22%20title%3D%22extensions_icons.png%22%20alt%3D%22extensions_icons.png%22%20%2F%3E%3C%2FSPAN%3EThe%20Azure%20icon%20will%20be%20used%20to%20launch%20remote%20sessions.%3C%2FP%3E%0A%3CP%3EAs%20an%20open-source%20project%2C%20the%20momentum%20to%20improve%20and%20expand%20VS-Code%20is%20worth%20noting%2C%20as%20told%20by%3CA%20href%3D%22https%3A%2F%2Fdevblogs.microsoft.com%2Fpython%2Fpython-in-visual-studio-code-july-2021-release%2F%22%20target%3D%22_self%22%20rel%3D%22noopener%20noreferrer%22%3E%20its%20dedicated%20blog.%3C%2FA%3E%20Hard-core%20Python%20developers%20may%20have%20a%20preference%20for%20other%20dedicated%20Python%20tools%20such%20as%20%3CFONT%20color%3D%22%23FF6600%22%3EPyCharm%3C%2FFONT%3E%20or%20%3CFONT%20color%3D%22%23FF6600%22%3ESpyder%3C%2FFONT%3E%2C%20however%20in%20this%20tutorial%20I'm%20using%20Microsoft's%20%3CA%20href%3D%22https%3A%2F%2Fcode.visualstudio.com%2Fdownload%22%20target%3D%22_self%22%20rel%3D%22noopener%20noreferrer%22%3EVS-Code%3C%2FA%3E%26nbsp%3B%20for%20its%20elegant%20project%20management%2C%20symbolic%20debugging%2C%20and%20Extensions%2C%20which%20integrate%20nicely%20with%20Azure.%20For%20these%20reasons%20I%20prefer%20it%20to%20Microsoft's%20legacy%20Visual%20Studio%20IDE%20Tools%20for%20Python.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CEM%3ESo%20install%20VS-Code%20if%20you%20don't%20have%20it%20already.%3C%2FEM%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EBesides%20your%20Azure%20subscription%2C%20%3CFONT%20color%3D%22%23FF6600%22%3Egit%3C%2FFONT%3E%2C%20and%20VS-Code%20you'll%20need%20the%20%3CFONT%20color%3D%22%23FF6600%22%3Eaz%3C%2FFONT%3E%20command%20line%20package%2C%20known%20as%20the%20%5BAzure%20command-line%20interface%20%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fcli%2Fazure%2F%22%20target%3D%22_self%22%20rel%3D%22noopener%20noreferrer%22%3EAzure%20CLI%3C%2FA%3E%2C%20and%20its%20extension%20for%20Azure%20Machine%20Learning%20which%20work%20equivalently%20on%20either%20Windows%20or%20Unix%20shells.%20There%20are%20installers%20for%20it%20on%20the%20webpage.%3C%2FP%3E%0A%3CP%3EThe%20%3CFONT%20color%3D%22%23FF6600%22%3Eaz%3C%2FFONT%3E%20package%20manages%20every%20Azure%20resource%2C%20and%20its%20%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fcli%2Fazure%2Freference-index%3Fview%3Dazure-cli-latest%22%20target%3D%22_self%22%20rel%3D%22noopener%20noreferrer%22%3Eaz%20reference%20page%3C%2FA%3E%26nbsp%3Bis%20a%20complete%20catalog%20of%20Azure.%20It's%20implemented%20as%20a%20wrapper%20for%20Azure's%20RESTful%20management%20API.%20You%20rarely%20need%20to%20refer%20to%20it%20directly%20since%20VS-Code%20Extensions%20will%20call%20into%20%3CFONT%20color%3D%22%23FF6600%22%3Eaz%3C%2FFONT%3E%20for%20you%2C%20and%20offer%20to%20install%20it%20if%20it's%20missing.%20And%20the%20Portal%20exposes%20the%20same%20functionality.%20But%20each%20of%20these%20are%20syntactic%20sugar%20over%20command%20line%20tools%2C%20and%20you%20should%20be%20aware%20of%20both.%3C%2FP%3E%0A%3CP%3EIn%20the%20long%20run%2C%20the%20other%20reason%20to%20know%20about%20%3CFONT%20color%3D%22%23FF6600%22%3Eaz%3C%2FFONT%3E%20is%20for%20writing%20scripts%20to%20automate%20management%20steps.%20Every%20time%20you%20create%20a%20resource%20in%20the%20Portal%2C%20it%20gives%20you%20the%20option%20to%20download%20a%20%22template%22.%20A%20template%20is%20just%20a%20description%20in%20JSON%20of%20the%20resource%20you've%20created.%20Using%20%3CFONT%20color%3D%22%23FF6600%22%3Eaz%3C%2FFONT%3E%20you%20can%20invoke%20ARM%20(the%20Azure%20Resource%20Manager)%20to%20automate%20creating%20it.%20ARM%20is%20a%20declarative%20language%20for%20resource%20management%20that%20reduces%20resource%20creation%20to%20a%20single%20command.%20Look%20into%20the%20%3CFONT%20color%3D%22%23FF6600%22%3Eaz%20deployment%20group%20create...%3C%2FFONT%3E%20command%20for%20details.%3C%2FP%3E%0A%3CP%3ECommands%20specific%20to%20Azure%20Machine%20Learning%20(AML)%20in%20the%20az%20extension%20need%20to%20be%20installed%20separately.%20%3CFONT%20color%3D%22%23FF6600%22%3Eaz%3C%2FFONT%3E%20will%20prompt%20you%20to%20do%20this%20the%20first%20time%20you%20use%20%3CFONT%20color%3D%22%23FF6600%22%3Eaz%20ml%3C%2FFONT%3E.%3C%2FP%3E%0A%3CP%3EDon't%20confuse%20the%20az%20CLI%20with%20the%20Azure%20python%20SDK%20that%20has%20overlapping%20functionality.%20Below%20is%20an%20example%20using%20the%20SDK%20to%20read%20from%20Storage%20programmatically.%20Most%20things%20you%20can%20do%20with%20the%20az%20CLI%20are%20also%20exposed%20as%20an%20SDK%20in%20the%20python%20%3CFONT%20color%3D%22%23FF6600%22%3Eazureml%3C%2FFONT%3E%20package.%3C%2FP%3E%0A%3CP%3EFinally%2C%20to%20check%20that%20%3CFONT%20color%3D%22%23FF6600%22%3Eaz%3C%2FFONT%3E%20is%20working%20try%20to%20authenticate%20your%20local%20machine%20your%20Cloud%20subscription.%20Follow%20the%20directions%20when%20you%20run%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CPRE%20class%3D%22lia-code-sample%20language-bash%22%3E%3CCODE%3E%24%20az%20login%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EYou%20do%20this%20once%20at%20the%20start.%20Subsequent%20%3CFONT%20color%3D%22%23FF6600%22%3Eaz%3C%2FFONT%3E%20commands%20will%20not%20need%20authentication.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH2%20id%3D%22toc-hId-1654395650%22%20id%3D%22toc-hId-1654395672%22%3EThe%20Application%3C%2FH2%3E%0A%3CP%3EOk%2C%20you've%20got%20your%20code%20and%20data%2C%20and%20installed%20tools.%20Let's%20begin!%20Assume%20you've%20gone%20ahead%20and%20got%20a%20new%20AML%20Workspace%2C%20the%20steps%20are%3C%2FP%3E%0A%3COL%3E%0A%3CLI%3E%26nbsp%3BSetup%20Storage%2C%3C%2FLI%3E%0A%3CLI%3E%26nbsp%3BPrepare%20your%20code%2C%3C%2FLI%3E%0A%3CLI%3E%26nbsp%3BCreate%20a%20compute%20instance%2C%20and%3C%2FLI%3E%0A%3CLI%3E%26nbsp%3BLaunch%20a%20remote%20VS-Code%20session.%3C%2FLI%3E%0A%3C%2FOL%3E%0A%3CP%3EOne%20option%20when%20you%20are%20done%20with%20your%20code%20is%20to%20deploy%20it%20by%20wrapping%20it%20in%20a%20%22RESTful%22%20API%20call%20as%20an%20%3CEM%3EAzure%20Function%20Application.%3C%2FEM%3E%20This%20exposes%20your%20application%20as%20an%20%22endpoint%22%2C%20callable%20from%20the%20Web.%20Building%20an%20Azure%20Function%20could%20be%20the%20subject%20of%20another%20tutorial.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH3%20id%3D%22toc-hId--1950010172%22%20id%3D%22toc-hId--1950010150%22%3EFirst%20thing%20-%20Prepare%20your%20data.%20It%20pays%20to%20keep%20your%20data%20in%20the%20Cloud.%3C%2FH3%3E%0A%3CP%3EStorage%2C%20such%20as%20Azure%20blob%20storage%20is%20cheap%2C%20fast%20and%20seemingly%20infinite%20in%20capacity%3B%20it%20costs%20about%20two%20cents%20a%20gigabyte%20per%20month%2C%20with%20minor%20charges%20for%20moving%20data%20around.%20For%20both%20cost%20and%20network%20bandwidth%20reasons%20you%20are%20better%20off%20moving%20your%20data%20one%20time%20to%20the%20cloud%20and%20not%20running%20your%20code%20in%20the%20Cloud%20against%20your%20data%20stored%20locally.%20In%20short%2C%20you'll%20create%20a%20storage%20account%2C%20then%20create%20a%20%3CEM%3Econtainer%3C%2FEM%3E---the%20equivalent%20of%20a%20hierarchical%20file%20system---of%20%22Azure%20Data%20Lake%20Generation%202%22%20(ADL2)%20blob%20storage.%20There%20are%20numerous%20alternatives%20to%20blob%20storage%2C%20and%20even%20more%20premium%20options%20to%20run%20pretty%20much%20any%20database%20software%20on%20Azure%20you%20can%20imagine%2C%20but%20for%20the%20batch%20computations%20you%20intend%20to%20run%2C%20the%20place%20to%20start%20is%20with%20ADL2%20blob%20storage.%3C%2FP%3E%0A%3CP%3EBlob%20storage%20appears%20as%20files%20organized%20in%20a%20hierarchical%20directory%20structure.%20As%20the%20name%20implies%2C%20it%20treats%20data%20as%20just%20a%20chunk%20of%20bytes%2C%20oblivious%20to%20file%20format.%20Use%20%3CFONT%20color%3D%22%23FF6600%22%3Ecsv%3C%2FFONT%3E%20files%20if%20you%20want%2C%20but%20I%20suggest%20you%20use%20a%20binary%20format%20like%20%3CFONT%20color%3D%22%23FF6600%22%3Eparquet%3C%2FFONT%3E%20for%20its%20compression%2C%20speed%20and%20comprehension%20of%20defined%20data-types.%3C%2FP%3E%0A%3CP%3EPerhaps%20your%20data%20is%20already%20in%20the%20Cloud.%20If%20not%20the%20easiest%20way%20to%20create%20storage%20is%20using%20the%20Portal---%22create%20a%20resource%22%2C%20then%20follow%20the%20prompts.%20It%20doesn't%20need%20to%20be%20in%20the%20same%20resource%20group%20as%20your%20Workspace%2C%20the%20choice%20is%20yours.%20The%20one%20critical%20choice%20you%20need%20to%20make%20is%20to%20select%20%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22enable_dls_gen2.PNG%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F298709iBFFD447AE16D5AB5%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22enable_dls_gen2.PNG%22%20alt%3D%22enable_dls_gen2.PNG%22%20%2F%3E%3C%2FSPAN%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EEssentially%20this%20is%20blob%20storage%20that%20supersedes%20the%20original%20blob%20storage%20that%20was%20built%20on%20a%20flat%20file%20system.%20Note%20that%20%22Azure%20Data%20Lake%20Gen%201%22%20storage%20is%20%3CEM%3Enot%3C%2FEM%3E%20blob%20storage%20for%20reasons%20not%20worth%20going%20into%20and%20I%20will%20ignore%20it.%3C%2FP%3E%0A%3CP%3EYou%20can%20upload%20data%20interactively%20using%20this%20Portal%20page.%20Here's%20an%20example%20for%20a%20container%20named%20%22data-od.%22%20It%20takes%20a%20few%20clicks%20from%20the%20top%20level%20storage%20account%20page%20to%20navigate%20to%20the%20storage%20container%20and%20path%20to%20get%20here.%20It%20contains%20file%20and%20directory%20manipulation%20commands%20much%20like%20the%20desktop%20%22File%20Explorer.%22%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22portal_storage_panel.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F298711i7712E1B577B98659%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22portal_storage_panel.png%22%20alt%3D%22portal_storage_panel.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3ELater%20I%20will%20show%20how%20to%20programmatically%20read%20and%20write%20data%20to%20storage.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EIn%20the%20lean%20style%20of%20this%20tutorial%2C%20I've%20included%20only%20the%20absolute%20minimum%20of%20the%20Byzantine%20collection%20of%20features%20that%20make%20up%20Azure%20ML.%20Azure%20ML%20has%20it's%20own%20data%20storage%2C%20or%20more%20accurately%2C%20thinly%20wraps%20existing%20Azure%20Storage%20components%20as%20%22DataSets%2C%22%20adding%20metadata%20to%20your%20tables%2C%20and%20authenticating%20to%20Storage%20for%20you%2C%20which%20is%20nice.%20However%2C%20the%20underlying%20storage%20resource%20is%20accessible%20if%20you%20bother%20to%20look.%20This%20tutorial---an%20end%20run%20around%20these%20advanced%20features---is%20good%20practice%20even%20if%20only%20done%20once%2C%20to%20understand%20how%20Azure%20ML%20storage%20is%20constituted.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH3%20id%3D%22toc-hId-537502661%22%20id%3D%22toc-hId-537502683%22%3EPrepare%20your%20code%3C%2FH3%3E%0A%3CP%3EGoing%20against%20the%20common%20wisdom%2C%20I%20recommend%20you%20should%20convert%20your%20notebook%20code%20to%20Python%20modules%20once%20you%20get%20past%20initial%20exploratory%20analysis.%20If%20you%20are%20wed%20to%20using%20notebooks%2C%20VMs%20work%20just%20fine%3A%20Both%20Azure%20ML%20workspaces%20and%20Spark%20clusters%20let%20you%20run%20notebooks%2C%20but%20you%20will%20be%20limited%20going%20forward%20in%20managing%2C%20debugging%2C%20testing%2C%20and%20deploying%20your%20code.%20Notebooks%20are%20great%20for%20exploring%20your%20data%2C%20but%20when%20developing%20code%20for%20subsequent%20use%20one%20get's%20tired%20of%20their%20limitations%3A%3C%2FP%3E%0A%3CUL%3E%0A%3CLI%3EThey%20don't%20play%20well%20with%20%60git%60.%20If%20there%20are%20merge%20conflicts%20between%20versions%2C%20it's%20a%20real%20headache%20to%20diff%20them%20and%20edit%20the%20conflicts.%3C%2FLI%3E%0A%3CLI%3EThey%20get%20huge%20once%20filled%20data%20and%20graphics.%20Either%20strip%20them%20of%20output%20before%20you%20commit%20them%2C%20to%20keep%20them%20manageable.%20Or%20convert%20them%20to%20html%20as%20a%20sharable%2C%20self-documenting%20document.%3C%2FLI%3E%0A%3CLI%3EAs%20your%20code%20grows%2C%20all%20the%20goodness%20of%20modular%2C%20debuggable%20object-oriented%20code%20is%20missing.%20Honestly%20the%20symbolic%20debugger%20in%20VS-Code%20is%20worth%20the%20effort%20of%20conversion%2C%20not%20to%20mention%20the%20manageability%20of%20keeping%20code%20organized%20by%20function%20in%20separate%20modules.%3C%2FLI%3E%0A%3CLI%3EPython%20modules%20encourage%20you%20to%20build%20tests%2C%20a%20necessary%20practice%20for%20reliable%20extension%2C%20reuse%2C%20sharing%20and%2C%20productionizing%20code.%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ESo%20relegate%20notebooks%20to%20run-once%20experiments%2C%20and%20promote%20blocks%20of%20code%20to%20separate%20files%20that%20can%20be%20tested%20and%20debugged%20easily.%3C%2FP%3E%0A%3CP%3E%3CFONT%20color%3D%22%23FF6600%22%3EJupyter%3C%2FFONT%3E%20generates%20a%20%3CFONT%20color%3D%22%23FF6600%22%3E.py%3C%2FFONT%3E%20file%20from%20a%20notebook%20for%20you%20at%20the%20command%20line%20with%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CPRE%20class%3D%22lia-code-sample%20language-bash%22%3E%3CCODE%3E%24%20jupyter%20nbconvert%20--to-py%20%3CYOUR%20notebook%3D%22%22%3E.ipynb%3C%2FYOUR%3E%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH3%20id%3D%22toc-hId--1269951802%22%20id%3D%22toc-hId--1269951780%22%3ERely%20on%20%3CFONT%20color%3D%22%23FF6600%22%3Egit%3C%2FFONT%3E%3C%2FH3%3E%0A%3CP%3E%3CFONT%20color%3D%22%23FF6600%22%3Egit%3C%2FFONT%3E%20deserves%20true%20homage.%20As%20your%20projects%20scale%20and%20you%20collaborate%20with%20others%20---the%20things%20that%20make%20you%20valuable%20to%20your%20organization---%3CFONT%20color%3D%22%23FF6600%22%3Egit%3C%2FFONT%3E%20is%20the%20comfortable%20home%20for%20your%20work.%20As%20any%20SW%20Engineer%20knows%20there's%20no%20greater%20solace%20and%20respite%20from%20the%20wrath%20of%20your%20colleagues%20if%20you've%20%22broken%20the%20build%22%20to%20be%20able%20to%20revert%20to%20a%20working%20state%20with%20just%20a%20few%20commands.%20Having%20an%20documented%20history%20is%20also%20a%20gift%20you%20give%20to%20posterity.%20Arguably%20the%20complexity%20of%20%3CFONT%20color%3D%22%23FF6600%22%3Egit%3C%2FFONT%3E%20dwarfs%20the%20complexity%20of%20a%20hierarchical%20file%20system%2C%20but%20there's%20no%20shame%20of%20relying%20on%20Stack%20Overflow%20each%20time%20you%20step%20out%20of%20your%20%3CFONT%20color%3D%22%23FF6600%22%3Egit%3C%2FFONT%3E%20comfort%20zone.%20And%20believe%20me%2C%20there%20is%20a%20%3CFONT%20color%3D%22%23FF6600%22%3Egit%3C%2FFONT%3E%20command%20for%20any%20conceivable%20task.%3C%2FP%3E%0A%3CP%3EAssume%20your%20code%20is%20in%20a%20%3CFONT%20color%3D%22%23FF6600%22%3Egit%3C%2FFONT%3E%20repository%20of%20your%20choice.%20%3CFONT%20color%3D%22%23FF6600%22%3Egit%3C%2FFONT%3E%20will%20be%20your%20conveyance%20to%20move%20code%20back%20and%20forth%20from%20cloud%20to%20local%20filesystems.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH3%20id%3D%22toc-hId-522397552%22%20id%3D%22toc-hId-522397574%22%3ESetting%20up%20cloud%20resources%20-%20an%20Azure%20Machine%20Learning%20(AML)%20Workspace%3C%2FH3%3E%0A%3CP%3EI%20assume%20you've%20created%20an%20AML%20Workspace.%20To%20launch%20the%20web%20version%20there's%20the%26nbsp%3B%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22launch_studio.PNG%22%20style%3D%22width%3A%20137px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F298714i36C79B1ABD7AA8FC%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22launch_studio.PNG%22%20alt%3D%22launch_studio.PNG%22%20%2F%3E%3C%2FSPAN%3E%20button%20once%20you%20navigate%20to%20the%20Workspace.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH4%20id%3D%22toc-hId--1155974192%22%20id%3D%22toc-hId--1155974170%22%3EA%20tour%20of%20the%20Workspace%3C%2FH4%3E%0A%3CP%3EThe%20Workspace%20collects%20a%20universe%20of%20machine%20learning-related%20functions%20in%20one%20place.%20I'll%20just%20touch%20on%20a%20few%20that%20this%20tutorial%20uses.%20However%20the%20beauty%20of%20using%20VS-Code%20is%20that%20you%20don't%20need%20to%20go%20here%3A%20Everything%20you%20need%20to%20do%20in%20the%20Studio%20can%20be%20done%20from%20the%20Azure%20Remote%20Extension.%3C%2FP%3E%0A%3CUL%3E%0A%3CLI%3E%3CSTRONG%3Ecompute%20instances%3C%2FSTRONG%3E%20Once%20inside%20the%20Workspace%20pane%2C%20on%20its%20left-side%20menu%2C%20there's%20a%20%22compute%22%20menu%20item%2C%20which%20brings%20you%20to%20a%20panel%20to%20create%20a%20new%20compute%20instance.%20Create%20one.%20You%20have%20a%20wide%20choice%20of%20sizes%20-%20can%20you%20say%2064%20cores%20w%2F128G%20RAM%3F%20Or%20with%204%20%3CEM%3ENVIDA%20Teslas%3C%2FEM%3E%3F%20Otherwise%20it's%20fine%20to%20just%20accept%20the%20defaults.%20You%20can%20start%20and%20stop%20instances%20to%20save%20money%20when%20they%20are%20not%20being%20used.%3C%2FLI%3E%0A%3CLI%3E%3CSTRONG%3Ecode%20editing%3C%2FSTRONG%3E%20Under%20%22notebooks%22%20(a%20misnomer)%20there's%20a%20view%20of%20the%20file%20system%20that's%20attached%20to%20the%20Workspace.%20It%20is%20actually%20a%20web-based%20IDE%20for%20editing%20and%20running%20code%20in%20a%20pinch.%20It%20can%20include%20notebooks%2C%20plain%20python%20files%2C%20local%20git%20repositories%20and%20so%20on.%20This%20file%20system%20is%20hidden%20in%20the%20workspace's%20associated%20AML%20storage%2C%20so%20it%20persists%20even%20when%20compute%20instances%20are%20deleted.%20Any%20new%20compute%20instance%20you%20create%20will%20share%20this%20file%20system.%3C%2FLI%3E%0A%3CLI%3E%3CSTRONG%3EAML%20storage%3C%2FSTRONG%3E%20The%20Studio%20does%20not%20reveal%20its%20connected%20AML%20Storage%20Account%2C%20so%20consider%20it%20a%20black%20box%20where%20the%20remote%20file%20system%20and%20other%20artifacts%20are%20stored.%20For%20now%20work%20with%20external%20Azure%20storage%20--%20why%3F%20So%20you%20see%20how%20to%20integrate%20with%20other%20Azure%20services%20via%20storage.%3CBR%20%2F%3EThe%20brave%20among%20you%20can%20use%20the%20Portal%20to%20browse%20the%20default%20storage%20that%20comes%20with%20your%20workspace.%20The%20storage%20account%20can%20be%20found%20by%20its%20name%20that%20starts%20with%20a%20munged%20version%20of%20the%20workspace%20name%20followed%20by%20a%20random%20string.%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CP%3ERemember%20the%20nice%20thing%20is%20that%20all%20this%20Workspace%20functionality%20you%20need%20is%20exposed%20at%20your%20desktop%20by%20VS-Code%20Extensions.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH2%20id%3D%22toc-hId-1073373203%22%20id%3D%22toc-hId-1073373225%22%3EThe%20development%20cycle%3C%2FH2%3E%0A%3CP%3ELet's%20get%20to%20the%20fun%20part---how%20these%20components%20work%20together%20and%20give%20a%20better%20experience.%20Notably%20the%20local%20edit-run-debug%20cycle%20for%20VS-Code%20is%20almost%20indistinguishable%20when%20using%20cloud%20resources%20remotely.%20Additionally%20both%20local%20and%20remote%20VS-Code%20instances%20are%20running%20simultaneously%20on%20your%20desktop%2C%20a%20much%20smoother%20experience%20than%20running%20a%20remote%20desktop%20server%20(%22rdp%22)%2C%20or%20trying%20to%20work%20remotely%20entirely%20in%20the%20browser.%20How%20cool%20is%20that!%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CEM%3ELet's%20go%20through%20the%20steps.%3C%2FEM%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH3%20id%3D%22toc-hId--604998541%22%20id%3D%22toc-hId--604998519%22%3ERunning%20locally%3C%2FH3%3E%0A%3CP%3EAuthentication%20to%20the%20cloud%20is%20managed%20by%20the%20Azure%20ML%20extension%20to%20VS-Code%3B%20once%20you%20are%20up%20and%20running%20and%20connected%20to%20your%20Workspace%20you%20will%20not%20need%20to%20authenticate%20again.%3C%2FP%3E%0A%3CUL%3E%0A%3CLI%3EStart%20VS-Code%20in%20the%20local%20directory%20in%20your%20%60git%60%20repository%20where%20VS-Code's%20%60.vscode%60%20folder%20resides.%20(The%20%3CFONT%20color%3D%22%23FF6600%22%3Elaunch.json%3C%2FFONT%3E%20file%20there%20configures%20run-debug%20sessions%20for%20each%20file.%20Learn%20to%20add%20configurations%20to%20it.)%3C%2FLI%3E%0A%3CLI%3EOnce%20you%20are%20satisfied%20the%20code%20runs%20locally%2C%20use%20%60git%60%20to%20commit%20and%20push%20it.%20If%20you%20commit%20notebooks%2C%20it's%20better%20to%20%22clean%22%20them%20of%20output%20first%2C%20to%20keep%20them%20manageably-sized.%3C%2FLI%3E%0A%3CLI%3EStart%20the%20Azure%20ML%20compute%20instance%20from%20the%20Azure%20ML%20extension.%20First%20connect%20to%20your%20Workspace%20using%20the%20Azure%20Icon%20(see%20above)%20in%20the%20VS-Code%20Activity%20menu.%20%3CSTRONG%3EYou%20can%20spawn%20a%20remote-attached%20instance%20of%20VS-Code%20from%20the%20local%20VS-Code%20instance%20from%20the%20well-hidden%20right-click%20menu%20item%20%22Connect%20to%20Compute%20Instance%22%3A%3C%2FSTRONG%3E%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22connect_to_compute_instance.PNG%22%20style%3D%22width%3A%20385px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F298715i5FA07BE94DE7BE56%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22connect_to_compute_instance.PNG%22%20alt%3D%22connect_to_compute_instance.PNG%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3EThis%20will%20both%20start%20the%20VM%2C%20and%20spawn%20a%20second%20VS-Code%20instance%20on%20your%20desktop%20connected%20to%20your%20remote%20Workspace%20file%20system!%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH3%20id%3D%22toc-hId-1882514292%22%20id%3D%22toc-hId-1882514314%22%3ERunning%20remotely%3C%2FH3%3E%0A%3CP%3ENote%20that%20the%20terminal%20instance%20that%20appears%20in%20the%20remotely-connected%20VS-Code%20terminal%20window%20is%20running%20on%20your%20VM!%20No%20need%20for%20setting%20up%20a%20public%20key%20for%20%22putty%22%20or%20%3CFONT%20color%3D%22%23FF6600%22%3Essh%3C%2FFONT%3E%20to%20bring%20up%20a%20remote%20shell.%20Similarly%20the%20file%20system%20visible%20in%20VS-Code%20is%20the%20Workspace%20file%20system.%20How%20cool%20is%20that!%3C%2FP%3E%0A%3CUL%3E%0A%3CLI%3EFirst%20thing%20of%20course%20is%20to%20bring%20the%20repository%20in%20the%20Workspace%20file%20system%20current%20by%20using%20%3CFONT%20color%3D%22%23FF6600%22%3Egit%3C%2FFONT%3E%20to%20pull%20your%20recent%20changes.%20Then%20it's%20just%20edit-run-debug%20as%20normal%2C%20but%20with%20all%20compute%20and%20file%20access%20in%20the%20cloud.%3C%2FLI%3E%0A%3CLI%3EWith%20both%20VS-Code%20instances%20running%20on%20your%20local%20machine%20you%20can%20work%20back%20and%20forth%20between%20local%20and%20remote%20versions%20simultaneously%2C%20transferring%20code%20changes%20with%20%3CFONT%20color%3D%22%23FF6600%22%3Egit%3C%2FFONT%3E.%3C%2FLI%3E%0A%3CLI%3EIn%20the%20remote%20instance%2C%20the%20Azure%20ML%20Extension%20menus%20are%20disabled%2C%20naturally.%20It%20doesn't%20make%20sense%20to%20spawn%20a%20%22remote%22%20to%20a%20%22remote%22.%3C%2FLI%3E%0A%3CLI%3EWhen%20you%20are%20done%20spin-down%20the%20VM%20to%20save%20money.%20Your%20remote%20file%20system%20is%20preserved%20in%20Storage%20without%20you%20needing%20to%20do%20anything.%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CP%3EIf%20you%20are%20sloppy%20about%20moving%20files%20with%20%3CFONT%20color%3D%22%23FF6600%22%3Egit%3C%2FFONT%3E%20(you%20forgot%20something%2C%20or%20you%20need%20to%20move%20a%20secrets%20file)%2C%20note%20that%20the%20remote-attached%20instance%20of%20VS-Code%20can%20view%20either%20the%20cloud%20or%20local%20file%20systems%20making%20it%20a%20%22back%20door%22%20to%20move%20files%20between%20them.%20Advisedly%20%3CFONT%20color%3D%22%23FF6600%22%3Egit%3C%2FFONT%3E%20is%20used%20to%20maintain%20consistency%20between%20code%20in%20the%20two%20file%20systems%2C%20so%20use%20this%20back%20door%20sparingly.%3C%2FP%3E%0A%3CP%3EAlternately%20the%20remote%20session%20can%20be%20invoked%20in%20the%20Portal.%20Try%20opening%20a%20remote%20VS-Code%20session%20on%20your%20local%20machine%20from%20the%20AML%20Studio%20notebooks%20pane.%20%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22notebook_studio.png%22%20style%3D%22width%3A%20955px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F298717i6FC1770F69E15F5F%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22notebook_studio.png%22%20alt%3D%22notebook_studio.png%22%20%2F%3E%3C%2FSPAN%3EIf%20your%20compute%20instance%20is%20running%2C%20you%20can%20launch%20a%20%3CEM%3Elocal%3C%2FEM%3E%20instance%20of%20VS-Code%20attached%20remotely%20to%20the%20Workspace's%20%3CEM%3Ecloud%3C%2FEM%3E%20file%20system%20(not%20just%20the%20file%20that's%20open%20in%20the%20Portal%20editor)%20and%20a%20shell%20running%20on%20the%20compute%20instance.%20But%20I%20think%20you'll%20find%20it's%20easier%20to%20spawn%20your%20remote%20session%20directly%20from%20your%20local%20VS-Code%20instance%2C%20than%20having%20to%20go%20to%20the%20Studio%20pane%20in%20Azure%20ML%20page%20in%20the%20Portal%20to%20launch%20it.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH2%20id%3D%22toc-hId--54022890%22%20id%3D%22toc-hId--54022868%22%3EProgrammatic%20adl2%20file%20access%3C%2FH2%3E%0A%3CP%3EOne%20change%20you'll%20need%20to%20run%20your%20code%20in%20the%20cloud%20is%20to%20replace%20local%20file%20IO.%20%3CBR%20%2F%3EThe%20primary%20change%20to%20your%20code%20is%20to%20replace%20local%20file%20system%20IO%20calls%20with%20calls%20to%20the%20python%20SDK%20for%20Blob%20Storage.%20This%20works%20both%20when%20the%20code%20runs%20locally%2C%20or%20in%20the%20VM%20as%20you%20switch%20your%20application%20to%20work%20on%20data%20in%20the%20cloud.%3C%2FP%3E%0A%3CP%3EThere%20are%20several%20ways%20to%20access%20files%20for%20the%20VM.%20Here's%20one%20way%20with%20the%20Azure%20python%20SDK%20that%20works%20with%20minimal%20dependencies%2C%20albeit%20it%20is%20a%20lot%20of%20code%20to%20write.%20Wrap%20this%20in%20a%20module%2C%20then%20put%20your%20efforts%20into%20the%20computational%20task%20at%20hand.%20The%20python%20SDK%20defines%20numerous%20classes%20in%20different%20packages.%20This%20class%2C%20%3CFONT%20color%3D%22%23FF6600%22%3EDataLakeServiceClient%3C%2FFONT%3E%20is%20specific%20to%20adl2%20blob%20storage.%20Locally%20you'll%20need%20to%20get%20these%20packages%2C%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CPRE%20class%3D%22lia-code-sample%20language-bash%22%3E%3CCODE%3E%24%20pip%20install%20azure-storage-file-datalake%0A%24%20pip%20install%20pyarrow%0A%0A%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CFONT%20color%3D%22%23FF6600%22%3Epyarrow%3C%2FFONT%3E%20is%20needed%20by%20pandas.%20Apache%20project%20%22arrow%22%20is%20a%20in-memory%20data%20format%20that%20speaks%20many%20languages.%26nbsp%3B%3C%2FP%3E%0A%3CP%3EIn%20this%20code%20snippet%2C%20the%20first%20function%20returns%20a%20connection%20to%20storage.%20The%20second%20function%20locates%20the%20file%2C%20retrieves%20file%20contents%20as%20a%20byte%20string%2C%20then%20converts%20that%20to%20a%20file%20object%20that%20can%20be%20read%20as%20a%20Pandas%20%3CFONT%20color%3D%22%23FF6600%22%3EDataFrame%3C%2FFONT%3E.%20This%20method%20works%20the%20same%20whether%20you%20reference%20the%20default%20storage%20that%20comes%20with%20the%20Azure%20ML%20workspace%20you%20created%2C%20or%20some%20pre-existing%20storage%20in%20other%20parts%20of%20the%20Azure%20cloud.%20%3CBR%20%2F%3EFor%20details%20see%20%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Fstorage%2Fblobs%2Fdata-lake-storage-directory-file-acl-python%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3Ehttps%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Fstorage%2Fblobs%2Fdata-lake-storage-directory-file-acl-python%3C%2FA%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CPRE%20class%3D%22lia-code-sample%20language-python%22%3E%3CCODE%3Eimport%20pandas%20as%20pd%0Afrom%20azure.storage.filedatalake%20import%20DataLakeServiceClient%0A%0Aimport%20secrets%0A%0Adef%20connect_adl2()%3A%0A%20%20%20%20'''Create%20ADL2%20connection%20objects%20to%20blob%20storage.%0A%20%20%20%20'''%0A%20%20%20%20service_client%20%3D%5C%0ADataLakeServiceClient(account_url%3Df%22https%3A%2F%2F%7Bsecrets.AZURE_STORAGE_ACCOUNT%7D.dfs.core.windows.net%22%2C%20credential%3Dsecrets.STORAGE_ACCOUNT_KEY)%0A%20%20%20%20%23%20%22file%20system%22%20in%20this%20context%20means%20container.%0A%20%20%20%20file_system_client%20%3D%20%0A%20%20%20%20service_client.get_file_system_client(file_system%3Dsecrets.CONTAINER)%0A%20%20%20%20return%20file_system_client%0A%0Adef%20download_a_file_into_df(absolute_file_path%2C%20file_system_client)%3A%0A%20%20%20%20'''Load%20the%20file%20from%20storage%2C%20into%20a%20df%2C%20from%20an%20absolute%20path%20in%20that%20container.%0A%20%20%20%20'''%0A%20%20%20%20try%3A%0A%20%20%20%20%20%20%20%20file_client%20%3D%20file_system_client.get_file_client(absolute_file_path)%0A%20%20%20%20%20%20%20%20blob_contents%20%3D%20file_client.download_file().readall()%0A%20%20%20%20%20%20%20%20df%20%3D%20pd.read_parquet(io.BytesIO(blob_contents)%2C%20engine%3D'pyarrow')%0A%20%20%20%20except%20Exception%20as%20e%20%3A%0A%20%20%20%20%20%20%20%20print(f'ERROR%3A%20%7Be%7D%5CnNo%20blob%20downloaded%20for%3A%20%7Bsecrets.CONTAINER%7D%5C%0A%7Babsolute_file_path%7D')%0A%20%20%20%20%20%20%20%20return%20None%0A%20%20%20%20return%20df%0A%0Aif%20__name__%20%3D%3D%20'__main__'%3A%0A%20%20%20%20client%20%3D%20connect_adl2()%0A%20%20%20%20df%20%3D%20download_a_file_into_df(sys.argv%5B1%5D%2C%20client)%0A%20%20%20%20print(df.describe()%2C%20'%5CnDone!')%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EYou%20can%20use%20the%20%3CFONT%20color%3D%22%23FF6600%22%3E__name__%20%3D%3D%20'__main__'%3C%2FFONT%3E%20section%20to%20embed%20test%20code.%20It%20doesn't%20get%20run%20when%20you%20import%20the%20file.%20But%20as%20you%20develop%20other%20scripts%20that%20use%20this%20one%2C%20you%20can%20invoke%20this%20file%20with%20the%20path%20to%20a%20known%20blob%20to%20test%20it%20hasn't%20broken.%3C%2FP%3E%0A%3CP%3EThe%20%3CFONT%20color%3D%22%23FF6600%22%3EDataLakeServiceClient%3C%2FFONT%3E%20authenticates%20to%20Azure%20Storage%20using%20an%20%22account%20key%22%20string%20that%20you%20recover%20from%20the%20Portal%2C%20in%20the%20Storage%20Account%20%22Access%20keys%22%20pane.%20An%20account%20key%20is%20an%2088%20character%20random%20string%20that%20works%20as%20a%20%22password%22%20for%20your%20storage%20account.%20Copy%20it%20from%20this%20pane%3A%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22access_key.PNG%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F298718i65DF5156C4C15636%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22access_key.PNG%22%20alt%3D%22access_key.PNG%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3ESince%20its%20confidential%20it%20doesn't%20get%20embedded%20in%20the%20code%2C%20but%20remains%20hidden%20in%20another%20file%20%3CFONT%20color%3D%22%23FF6600%22%3Esecrets.py%3C%2FFONT%3E%20the%20local%20directory%20that%20contains%20only%20global%20variable%20assignments%2C%20in%20this%20case%20%3CFONT%20color%3D%22%23FF6600%22%3EAZURE_STORAGE_ACCOUNT%2C%20STORAGE_ACCOUNT_KEY%2C%20%3CFONT%20color%3D%22%23000000%22%3Eand%3C%2FFONT%3E%26nbsp%3BCONTAINER%3C%2FFONT%3E.%3C%2FP%3E%0A%3CP%3EPlace%20the%20file%20name%20in%20your%20%3CFONT%20color%3D%22%23FF6600%22%3E.gitignore%3C%2FFONT%3E%20file%2C%20since%20it's%20something%20you%20don't%20want%20to%20share.%20This%20is%20a%20simple%20way%20to%20enforce%20security%2C%20and%20there%20are%20several%20better%2C%20but%20more%20involved%20alternatives.%20You%20can%20keep%20secrets%20in%20environment%20variables%2C%20or%20even%20better%20used%20Azure%20%22key%20vault%22%20to%20store%20secrets%2C%20or%20just%20leave%20secrets%20management%20up%20to%20Azure%20ML.%20Granted%20account%20keys%20are%20a%20simple%20solution%2C%20if%20you%20manage%20them%20carefully%20when%20individually%20developing%20code%2C%20but%20you'll%20want%20to%20button-down%20authentication%20when%20building%20code%20for%20enterprise%20systems.%3C%2FP%3E%0A%3CP%3ESimilarly%20there%20are%20more%20involved%2C%20%22code-lite%22%20ways%20to%20retrieve%20blobs.%20As%20mentioned%20Azure%20ML%20has%20it's%20own%20thin%20wrapper%20and%20a%20default%20storage%20account%20created%20for%20the%20Workspace%20where%20it's%20possible%20to%20store%20your%20data.%20But%20as%20I've%20argued%2C%20you'll%20want%20to%20know%20how%20to%20connect%20to%20any%20Azure%20data%2C%20not%20just%20AML-managed%20data.%20To%20put%20it%20politely%2C%20AML's%20tendency%20to%20%22simplify%22%20fundamental%20cloud%20services%20for%20data%20science%20doesn't%20always%20make%20things%20simpler%2C%20and%20can%20hide%20what's%20under%20the%20hood%20that%20makes%20for%20confusion%20when%20the%20%22simple%22%20services%20don't%20do%20what%20you%20want.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH2%20id%3D%22toc-hId--1861477353%22%20id%3D%22toc-hId--1861477331%22%3EOther%20services%2C%20embellishments%2C%20and%20next%20steps%3C%2FH2%3E%0A%3CP%3EFor%20computational%20tasks%20that%20benefit%20from%20even%20more%20processing%20power%2C%20the%20cloud%20offers%20clusters%20for%20distributed%20computing.%20But%20before%20jumping%20to%20a%20cluster%20for%20a%20distributed%20processing%20solution%20e.g.%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fdask.org%2F%22%20target%3D%22_self%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3Edask%3C%2FA%3E%2C%20consider%20python's%20multiprocessing%20module%20that%20offers%20a%20simple%20way%20to%20take%20advantage%20of%20multiple%20core%20machines%2C%20and%20gets%20around%20python's%20single%20threaded%20architecture.%20For%20an%20embarrassingly%20parallel%20task%2C%20use%20the%20module%20to%20run%20the%20same%20code%20on%20multiple%20datasets%2C%20so%20each%20task%20runs%20in%20it's%20own%20process%20and%20returns%20a%20result%20that%20the%20parent%20process%20receives.%20The%20module%20import%20is%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CPRE%20class%3D%22lia-code-sample%20language-python%22%3E%3CCODE%3Efrom%20multiprocessing%20import%20Process%2C%20Manager%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EThe%20%3CFONT%20color%3D%22%23FF6600%22%3EProcess%3C%2FFONT%3E%20class%20spawns%20an%20new%20OS%20process%20for%20each%20instance%20and%20the%20%3CFONT%20color%3D%22%23FF6600%22%3EManager%3C%2FFONT%3E%20class%20collects%20the%20instance's%20results.%3C%2FP%3E%0A%3CP%3EAs%20for%20going%20beyond%20one%20machine%2C%20the%20sky's%20the%20limit.%20Apache%20Spark%20clusters%20seamlessly%20integrate%20coding%20in%20Python%2C%20R%2C%20SQL%20and%20Scala%2C%20to%20work%20interactively%20with%20huge%20datasets%2C%20with%20tools%20well-tailored%20for%20data%20science.%20%3CEM%3ESpark%3C%2FEM%3E%20on%20%3CEM%3EAzure%3C%2FEM%3E%20comes%20in%20several%20flavors%2C%20including%20third%20party%20%3CEM%3EDataBricks%3C%2FEM%3E%2C%20and%20database-centric%20integration%20of%20%3CEM%3ESpark%3C%2FEM%3E%20and%20%3CEM%3EMSSQL%3C%2FEM%3E%20clusters%20branded%20%22Synapse.%22%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH3%20id%3D%22toc-hId-755118199%22%20id%3D%22toc-hId-755118221%22%3EMore%20machine%20learning%20features%3C%2FH3%3E%0A%3CP%3EThe%20point%20of%20this%20article%20has%20been%20the%20scaling%20opportunities%20available%20in%20Azure%20ML%2C%20but%20did%20I%20mention%20the%20ML%20features%20of%20Azure%20ML%3F%20In%20addition%20to%20the%20fun%20you'll%20have%20up-leveling%20your%20development%20to%20scale%2C%20you've%20started%20up%20the%20learning%20curve%20to%20using%20Azure's%20tools%20for%20data%20science.%20For%20tracking%20and%20comparing%20results%20of%20multiple%20runs%20AzureML%20integrates%20with%20%60MLFlow%60.%20See%20%3CA%20href%3D%22https%3A%2F%2Fmedium.com%2Fswlh%2Fhow-to-setup-mlflow-on-azure-5ba67c178e7d%22%20target%3D%22_self%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3Ethis%20article.%3C%2FA%3E%20%26nbsp%3BFor%20managing%20data%2C%20AML%20%22DataSets%22%20embellish%20datafiles%20with%20metadata.%20There%20is%20even%20an%20%3CA%20href%3D%22https%3A%2F%2Fgithub.com%2FAzure%2Fazureml-sdk-for-r%22%20target%3D%22_self%22%20rel%3D%22noopener%20noreferrer%22%3ESDK%20for%20R%3C%2FA%3E%26nbsp%3Bsimilar%20to%20the%20python%20SDK.%20There%20are%20objects%20for%20experiments%2C%20runs%2C%20environments%2C%20and%20model%20management.%20%22AutoML%22%20automates%20supervised%20learning%20model%20selection%20and%20tuning.%20That's%20just%20a%20couple%20examples%20of%20how%20Azure%20ML%20repackages%20services%20to%20be%20a%20%22one%20stop%22%20shop%20for%20machine%20learning%20tasks.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH3%20id%3D%22toc-hId--1052336264%22%20id%3D%22toc-hId--1052336242%22%3EAzure%20Function%20deployment%20and%20beyond%3C%2FH3%3E%0A%3CP%3EAzure%20can%20be%20used%20not%20only%20for%20running%20experiments%20at%20scale%2C%20but%20for%20building%20an%20application%20around%20your%20code.%20Cloud%20applications%20consist%20of%20collections%20of%20networked%20services%2C%20running%20on%20separate%20VMs.%20For%20convenience%20one%20avoids%20working%20at%20the%20%22infrastructure%22%20level%20and%20moves%20to%20%22managed%20services%22%20where%20the%20VMs%20are%20not%20exposed%2C%20just%20the%20interfaces%20are%2C%20as%20we%20did%20with%20managed%20compute%20instances.%20You%20can%20do%20the%20same%20thing%20with%20your%20code%20by%20publishing%20it%20to%20the%20cloud%20as%20a%20RESTful%20http%20endpoint.%20To%20your%20client%20it%20looks%20like%20a%20URL%20except%20instead%20of%20returning%20a%20web%20page%20it%20returns%20the%20result%20of%20your%20computation.%20A%20basic%20way%20to%20build%20this%20is%20by%20wrapping%20your%20code%20in%20an%20Azure%20Function.%20An%20%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Fazure-functions%2Fcreate-first-function-vs-code-python%22%20target%3D%22_self%22%20rel%3D%22noopener%20noreferrer%22%3EAzure%20Function%3C%2FA%3E%26nbsp%3Btypically%20runs%20in%20a%20few%20seconds%2C%20and%20doesn't%20save%20state%20from%20one%20call%20to%20the%20next.%20(Saving%20state%20is%20where%20blob%20storage%20comes%20in%2C%20remember%3F)%20There%20are%20several%20more%20featureful%20alternatives%20for%20implementing%20http%20endpoints%2C%20based%20on%20Docker%20containers%20for%20instance%2C%20of%20course%20some%20available%20from%20the%20Azure%20ML%20Workspace%2C%20but%20all%20work%20as%20managed%20services%2C%20making%20implementation%20independent%20of%20the%20platform%20%22infrastructure%22%20it's%20built%20on.%20How%20to%20use%20AFs%20deserves%20a%20separate%20tutorial%2C%20but%20to%20get%20you%20started%2C%20load%20the%20Azure%20Function%20extension%20into%20VS-Code%20and%20browse%20it's%20features.%20%3CBR%20%2F%3ERemember%20when%20I%20said%20that%20local%20management%20for%20everything%20comes%20with%20%3CFONT%20color%3D%22%23FF6600%22%3Eaz%3C%2FFONT%3E%3F%20Well%20I%20wasn't%20telling%20you%20the%20whole%20truth.%20For%20AF%20you'll%20need%20to%20install%20separately%20the%20%3CA%20href%3D%22https%3A%2F%2Fgithub.com%2FAzure%2Fazure-functions-core-tools%22%20target%3D%22_self%22%20rel%3D%22noopener%20noreferrer%22%3EAzure%20Functions%20Core%20tools%3C%2FA%3E%26nbsp%3Bfor%20commands%20that%20start%20with%20%3CFONT%20color%3D%22%23FF6600%22%3Eaz%20func%3C%2FFONT%3E.%20VS-Code%20will%20prompt%20you%20for%20this%20install%20when%20you%20install%20the%20VS-Code%20Azure%20Functions%20extension.%3C%2FP%3E%0A%3CP%3ESince%20you're%20not%20put-off%20by%20writing%20code%2C%20you%20can%20proceed%20to%20integrate%20with%20the%20full%20gamut%20of%20cloud%20services%3A%20data%20bases%2C%20web%20hosting%2C%20advanced%20AI%2C%20and%20security---much%20as%20your%20favorite%20on-line%20retail%20site%20is%20likely%20to%20have%20done%20when%20building%20an%20enterprise%20Azure%20application.%3C%2FP%3E%0A%3CH3%20id%3D%22toc-hId-1435176569%22%20id%3D%22toc-hId-1435176591%22%3E%26nbsp%3B%3C%2FH3%3E%0A%3CH3%20id%3D%22toc-hId-325884047%22%20id%3D%22toc-hId-325884069%22%3ENotes%3C%2FH3%3E%0A%3CH5%20id%3D%22toc-hId--1223404978%22%20id%3D%22toc-hId--1223404956%22%3EThe%20VS-Code%20remote%20extension%20source%3C%2FH5%3E%0A%3CP%3E-%20%3CA%20href%3D%22https%3A%2F%2Fgithub.com%2Fmicrosoft%2Fvscode-tools-for-ai%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3Ehttps%3A%2F%2Fgithub.com%2Fmicrosoft%2Fvscode-tools-for-ai%3C%2FA%3E%3CBR%20%2F%3E-%20%3CA%20href%3D%22https%3A%2F%2Fgithub.com%2FMicrosoftDocs%2Fazure-docs%2Fblob%2Fmaster%2Farticles%2Fmachine-learning%2Fhow-to-manage-resources-vscode.md%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3Ehttps%3A%2F%2Fgithub.com%2FMicrosoftDocs%2Fazure-docs%2Fblob%2Fmaster%2Farticles%2Fmachine-learning%2Fhow-to-manage-resources-vscode.md%3C%2FA%3E%3C%2FP%3E%0A%3CH5%20id%3D%22toc-hId-1264107855%22%20id%3D%22toc-hId-1264107877%22%3E%3CBR%20%2F%3EPython%20SDK%20reference%3C%2FH5%3E%0A%3CP%3E-%20%3CA%20href%3D%22https%3A%2F%2Fazuresdkdocs.blob.core.windows.net%2F%24web%2Fpython%2Fazure-storage-file-datalake%2F12.0.0b7%2Fazure.storage.filedatalake.html%3Fhighlight%3Ddatalakefileclient%23azure.storage.filedatalake.DataLakeFileClient%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noreferrer%22%3Ehttps%3A%2F%2Fazuresdkdocs.blob.core.windows.net%2F%24web%2Fpython%2Fazure-storage-file-datalake%2F12.0.0b7%2Fazure.storage.filedatalake.html%3Fhighlight%3Ddatalakefileclient%23azure.storage.filedatalake.DataLakeFileClient%3C%2FA%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-TEASER%20id%3D%22lingo-teaser-2591940%22%20slang%3D%22en-US%22%3E%3CP%3E%3CEM%3EData%20scientist%20to%20Data%20Scientist%3A%20So%20you%20just%20want%20to%20run%20python%20at%20scale%3F%20This%20tutorial%20reveals%20a%20painless%20way%20to%20run%20your%20code%20from%20your%20desktop%20on%20Azure---and%20not%20just%20for%20machine%20learning%2C%20but%20any%20batch%20computational%20task.%3C%2FEM%3E%3C%2FP%3E%3C%2FLINGO-TEASER%3E%3CLINGO-LABS%20id%3D%22lingo-labs-2591940%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EAzure%20ML%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E
Co-Authors
Version history
Last update:
‎Jul 28 2021 12:23 PM
Updated by: