<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[NB's blog]]></title><description><![CDATA[NB's blog]]></description><link>https://nb.blog.queenpages.com</link><generator>RSS for Node</generator><lastBuildDate>Fri, 16 Oct 2026 05:58:07 GMT</lastBuildDate><atom:link href="https://nb.blog.queenpages.com/rss.xml" rel="self" type="application/rss+xml"/><language><![CDATA[en]]></language><ttl>60</ttl><item><title><![CDATA[Transitioning from Anaconda to Miniconda]]></title><description><![CDATA[Python enthusiasts often turn to Anaconda for its convenience in setting up Python environments, especially in the data science domain. However, there is a sleeker alternative: Miniconda. 
In this post, we'll explore the benefits of transitioning fro...]]></description><link>https://nb.blog.queenpages.com/transitioning-from-anaconda-to-miniconda</link><guid isPermaLink="true">https://nb.blog.queenpages.com/transitioning-from-anaconda-to-miniconda</guid><category><![CDATA[anaconda]]></category><category><![CDATA[Miniconda]]></category><category><![CDATA[Python]]></category><category><![CDATA[Data Science]]></category><dc:creator><![CDATA[Nick Braeckman]]></dc:creator><pubDate>Sun, 12 Nov 2023 14:34:42 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1699799607198/1412558f-b5d3-4f63-8fa3-1934b063da50.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>Python enthusiasts often turn to Anaconda for its convenience in setting up Python environments, especially in the data science domain. However, there is a sleeker alternative: Miniconda. </p>
<p>In this post, we'll explore the benefits of transitioning from Anaconda to Miniconda and provide a step-by-step guide to help you make the switch.</p>
<h2 id="heading-the-data-science-setup">The Data Science Setup</h2>
<p>Traditionally, kickstarting your data science journey involved downloading and installing the comprehensive <a target="_blank" href="https://www.anaconda.com/distribution/">Anaconda distribution</a>. This bundled package includes Python, over 200 packages, and additional tools like <a target="_blank" href="https://docs.anaconda.com/anaconda/navigator/">Anaconda Navigator</a> and <code>qtconsole</code>.</p>
<h2 id="heading-a-leaner-alternative-miniconda">A Leaner Alternative: Miniconda</h2>
<p>While Anaconda simplifies the initial setup, its hefty size (around 600MB download, over 2GB installed) and inclusion of numerous unnecessary packages may not align with everyone's needs. </p>
<p>Enter Miniconda, a minimalist distribution that includes only Python, the essential conda tool, and a handful of core packages. With a download size of around 70MB (less than a tenth of Anaconda), Miniconda offers a more efficient and customizable data science environment. Any additional software needed can be easily installed later using conda.</p>
<h2 id="heading-understanding-conda">Understanding Conda</h2>
<p>There are a number of ways to set up your system to do data science in Python. In this tutorial, we will use a tool called <a target="_blank" href="https://docs.conda.io/projects/conda/en/latest/">conda</a>. Conda is both a package manager and an environment manager.</p>
<p>In the context of Python, a <strong>package manager</strong> is a tool that installs, updates and removes third-party Python packages. A third-party Python package is any Python package that is not part of the Python standard library. The vast ecosystem of data science-related packages (e.g. <a target="_blank" href="https://pandas.pydata.org/">pandas</a>, <a target="_blank" href="https://numpy.org/">NumPy</a>, <a target="_blank" href="https://matplotlib.org/">Matplotlib</a>, <a target="_blank" href="https://scikit-learn.org/">scikit-learn</a>, <a target="_blank" href="https://www.tensorflow.org/g">TensorFlow</a> and more) make Python a go-to language for data enthusiasts.</p>
<p>Another popular package manager is <a target="_blank" href="https://pypi.org/">pip</a>, which is the default package manager for new Python installations. In this tutorial, we'll only touch on conda.</p>
<p>An <strong>environment manager</strong> creates an isolated container on your computer, known as a virtual environment, with their own installation of Python and third-party packages. This isolation ensures independence from any other Python installation on your machine.</p>
<h2 id="heading-advantages-of-migrating-to-miniconda">Advantages of Migrating to Miniconda</h2>
<ol>
<li><p><strong>Efficient Resource Utilization</strong> Anaconda comes preloaded with a lot of packages, some of which might be unnecessary for your specific workflows. Miniconda offers a minimalist approach, allowing you to install only what you need. This not only saves valuable storage space but also ensures your system resources are dedicated to the tools and libraries you actually tend to use. Okay, in Anaconda, you have the <code>conda clean --all</code> command, which basically cleans unused package cache and other files. However, Miniconda's smaller package footprint tends to be more efficient.</p>
</li>
<li><p><strong>Simplified Environment Management</strong> The <a target="_blank" href="https://docs.anaconda.com/free/navigator/index.html">Anaconda Navigator</a>, a graphical user interface became obsolete with the speed and simplicity of the command prompt or terminal. Creating a new environment might seem intimidating when you are just starting. However, you will quickly switch to the command prompt or terminal, since almost all tutorials you'll follow will use the command prompt or terminal. Embracing the command prompt or terminal will not only enhance efficiency but also integrate smoothly with your preferred code editor.</p>
</li>
<li><p><strong>Streamlined Deployment</strong> Deploying your code on production servers can be a daunting task, especially when you are dealing with the unnecessary bloat from Anaconda. Miniconda simplifies the deployment process by allowing you to create virtual environments with only the essential packages, ensuring a clean and efficient runtime on production servers.</p>
</li>
</ol>
<h2 id="heading-step-by-step-approach">Step-by-Step Approach</h2>
<h3 id="heading-1-optional-export-environment-files">1. (Optional) Export Environment Files</h3>
<p>If you want to recover environments from Anaconda, export your environment files using the following commands:</p>
<pre><code class="lang-bash">conda activate your_env
</code></pre>
<p>Next, export your environment to a <code>.yml</code> file.</p>
<p>On Windows:</p>
<pre><code class="lang-plaintext">conda env export | findstr /V "^prefix: " &gt; your_env.yml
</code></pre>
<p>On macOS or Linux:</p>
<pre><code class="lang-bash">conda env <span class="hljs-built_in">export</span> | grep -v <span class="hljs-string">"^prefix: "</span> &gt; your_env.yml
</code></pre>
<h4 id="heading-note-on-prefix">Note on "prefix"</h4>
<p>Note that conda creates a "prefix" in the <code>.yml</code> file. In the context of Conda environments, the "prefix" refers to the location on your file system where the Conda environment is installed. The "prefix" line in the <code>your_env.yml</code> file specifies the path to the directory where the environment is created.</p>
<p>For instance:</p>
<pre><code class="lang-yaml"><span class="hljs-attr">prefix:</span> <span class="hljs-string">C:\Users\YourUsername\Anaconda3\envs\your_environment_name</span>
</code></pre>
<p>This information is used when you or someone else later tries to recreate the Conda environment from the <code>your_env.yml</code> file. The presence of the "prefix" allows Conda to know where to create the environment.</p>
<p>When you export the environment using <code>conda env export</code>, you might want to exclude the "prefix" line from the exported YAML file if you plan to share the environment file across different systems or users. This is because the specific path may not be valid or appropriate on another system. That's why the <code>grep -v "^prefix: "</code> (or <code>findstr /V "^prefix: "</code>) is used—it removes the "prefix" line from the exported environment file.</p>
<h3 id="heading-2-get-rid-of-anaconda">2. Get Rid of Anaconda</h3>
<p>Uninstall Anaconda by following the instructions <a target="_blank" href="https://docs.anaconda.com/free/anaconda/install/uninstall/">here</a>.</p>
<h3 id="heading-3-install-miniconda">3. Install Miniconda</h3>
<p>Find instructions on how to install Miniconda <a target="_blank" href="https://docs.conda.io/projects/miniconda/en/latest/">here</a>.</p>
<h3 id="heading-4-create-miniconda-environments">4. Create Miniconda Environments</h3>
<p>If you want a clean start, we recommend creating new environments. You can use the following command to create a new environment with the latest (at the time of writing) Python version:</p>
<pre><code class="lang-bash">cond create -n <span class="hljs-string">"your_env"</span> python=3.12
</code></pre>
<p>Activate the environment with:</p>
<pre><code class="lang-bash">conda activate your_env
</code></pre>
<p>Alternatively, you can use the following command to recreate a predefined environment. Note that this will install all packages listed in the <code>.yml</code> file (potentially packages you don't need).</p>
<pre><code class="lang-bash">conda env create -f your_env.yml
</code></pre>
<p>If you want to specify a different install path than the default for your system (not related to 'prefix' in <code>your_env.yml</code>), just use the <code>-p</code> flag followed by the required path. Note that we previously deleted the "prefix" line. However, you can use this command if you want to install an environment file with the prefix line still in it.</p>
<pre><code class="lang-bash">conda env create -f your_env.yml -p /home/user/anaconda3/envs/env_name
</code></pre>
<h3 id="heading-5-install-third-party-packages">5. Install Third-party Packages</h3>
<p>Finally, we can install some packages in our new or recovered environment. I tend to install the <code>pandas</code> in almost al my environments. Let's install this packages in our activated environment.</p>
<pre><code class="lang-bash">conda install pandas
</code></pre>
<hr />
<p>Congratulations! You've successfully made the transition from Anaconda to Miniconda. Stay tuned for more!</p>
]]></content:encoded></item><item><title><![CDATA[Azure Machine Learning: Exploring Data Concepts]]></title><description><![CDATA[Azure Machine Learning allows you to import data from your local machine or existing cloud-based storage resource into your workspace.
In this post, we'll take a practical look at importing various data types, such as File, Folder and Table types. We...]]></description><link>https://nb.blog.queenpages.com/azure-machine-learning-exploring-data-concepts</link><guid isPermaLink="true">https://nb.blog.queenpages.com/azure-machine-learning-exploring-data-concepts</guid><category><![CDATA[Azure Machine Learning]]></category><category><![CDATA[Data Science]]></category><category><![CDATA[data management]]></category><category><![CDATA[Data Assets]]></category><category><![CDATA[azureml]]></category><dc:creator><![CDATA[Nick Braeckman]]></dc:creator><pubDate>Fri, 27 Oct 2023 08:42:37 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1698395763432/2761d97f-7fde-47c5-a7db-0b6f0b72f7a0.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p><a target="_blank" href="https://learn.microsoft.com/en-us/azure/machine-learning/?view=azureml-api-2">Azure Machine Learning</a> allows you to import data from your local machine or existing cloud-based storage resource into your workspace.</p>
<p>In this post, we'll take a practical look at importing various data types, such as <strong>File</strong>, <strong>Folder</strong> and <strong>Table</strong> types. We'll use the <a target="_blank" href="https://learn.microsoft.com/en-us/python/api/overview/azure/ai-ml-readme?view=azure-python">Azure Machine Learning Python SDK v2</a>.</p>
<h2 id="heading-prerequisites">Prerequisites</h2>
<ul>
<li>An Azure Subscription:  If you don't have one, don't worry. You can create a <a target="_blank" href="https://azure.microsoft.com/free/">free Azure account</a> with a limited $200 USD credit to get started.</li>
<li>An <a target="_blank" href="https://learn.microsoft.com/en-us/azure/machine-learning/quickstart-create-resources?view=azureml-api-2">Azure Machine Learning Workspace</a>: If you haven't set up your workspace yet, you can follow the quick start guide to create the necessary resources.</li>
<li>The <a target="_blank" href="https://learn.microsoft.com/en-us/python/api/overview/azure/ai-ml-readme?view=azure-python&amp;viewFallbackFrom=azure-ml-py">Azure Machine Learning Python SDK v2</a>: To leverage the power of Azure Machine Learning, ensure that you have the Python SDK v2 installed.</li>
</ul>
<h2 id="heading-setting-up-your-environment">Setting up Your Environment</h2>
<p>To start importing data into your Azure Machine Learning workspace, you'll need to prepare your environment. We'll be using the <code>mltable</code> package for data loading, so make sure you install it in your Python environment. Run the following command to install the necessary packages:</p>
<pre><code class="lang-bash">pip install mltable azureml-dataprep[pandas]
</code></pre>
<h2 id="heading-understanding-data-types-and-uris">Understanding Data Types and URIs</h2>
<p>Azure Machine Learning allows you to work with three primary data types - Files, Folders, and Tables. Each data type serves a specific purpose, making it crucial to understand when and how to use them.</p>
<ul>
<li><strong>File</strong>: read/write a single file, for instance storing a <code>.pkl</code> file of your serialized model on your local environment after training.</li>
<li><strong>Folder</strong>: read/write a folder of files, for instance importing a folder with images for training a deep-learning model.</li>
<li><strong>Table</strong>: read/write via a dynamic schema, for instance you want to start an <a target="_blank" href="https://learn.microsoft.com/en-us/azure/machine-learning/concept-automated-ml?view=azureml-api-2">AutoML</a> job.</li>
</ul>
<p>Each data type can be referenced by a Uniform Resource Identifier (URI). The URI represents the storage location on your local computer or on an external resource. There are different URIs for each storage location. Here are some URI examples:</p>
<ul>
<li>Azure Machine Learning Datastore: <code>azureml://datastores/&lt;data_store_name&gt;/paths/&lt;folder1&gt;/&lt;folder2&gt;//&lt;file&gt;.csv</code></li>
<li>Local computer: <code>./home/user/data/my_data</code></li>
<li>Public http(s) server: <code>https://raw.githubusercontent.com/pandas-dev/pandas/main/doc/data/titanic.csv</code></li>
<li>Blob storage: <code>wasbs://&lt;containername&gt;@&lt;accountname&gt;.blob.core.windows.net/&lt;folder&gt;/</code></li>
<li>Azure Data Lake Gen1: <code>abfss://&lt;file_system&gt;@&lt;account_name&gt;.dfs.core.windows.net/&lt;folder&gt;/&lt;file&gt;.csv</code></li>
<li>Azure Data Lake Gen2: <code>adl://&lt;accountname&gt;.azuredatalakestore.net/&lt;folder1&gt;</code></li>
</ul>
<p>Instead of using long storage paths of URIs, we'll create data assets, whereby we can access the data via a friendly name. The data asset is, just like the URI, a reference to the data source location, along with a copy of its metadata.</p>
<h2 id="heading-creating-data-assets">Creating Data Assets</h2>
<p>Project structure:</p>
<pre><code>project/
     |-- data/
     |-- mltable/
     |-- scripts/
     |-- config.json
</code></pre><h3 id="heading-step-1-setting-up-the-mlclient">Step 1: Setting up the MLClient</h3>
<p>In this step, we'll instantiate the MLClient using a <code>config.json</code> file. Make sure you have the necessary configuration file in place, as shown below:</p>
<pre><code class="lang-json">{
    <span class="hljs-attr">"subscription_id"</span>: <span class="hljs-string">"&lt;YOUR_SUBSCRIPTION_ID&gt;"</span>,
    <span class="hljs-attr">"resource_group"</span>: <span class="hljs-string">"&lt;YOUR_RESOURCE_GROUP&gt;"</span>,
    <span class="hljs-attr">"workspace_name"</span>: <span class="hljs-string">"&lt;YOUR_WORKSPACE_NAME&gt;"</span>
}
</code></pre>
<p>You can test your configuration by executing the following code in the Python interpreter in <a target="_blank" href="https://docs.python.org/3/tutorial/interpreter.html#interactive-mode">interactive mode</a>.</p>
<pre><code class="lang-python"><span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> azure.ai.ml <span class="hljs-keyword">import</span> MLClient
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> azure.identity <span class="hljs-keyword">import</span> DefaultAzureCredential
<span class="hljs-meta">&gt;&gt;&gt; </span>ml_client = MLClient.from_config(DefaultAzureCredential())
<span class="hljs-meta">&gt;&gt;&gt; </span>print(ml_client)
</code></pre>
<h3 id="heading-step-2-add-data">Step 2: Add Data</h3>
<p>Add a file to the <code>.\data</code> directory. You can use the <a target="_blank" href="https://raw.githubusercontent.com/pandas-dev/pandas/main/doc/data/titanic.csv">this titanic example dataset</a> if you don't have any file.</p>
<h3 id="heading-step-3-create-a-file-data-asset">Step 3: Create a File data asset</h3>
<p>Navigate to the <code>. \script</code> folder and create a Python file named <code>create_file_data_asset.py</code>. This script will register the file as a data asset.</p>
<pre><code class="lang-python"><span class="hljs-comment"># create_file_data_asset.py</span>
<span class="hljs-keyword">from</span> azure.ai.ml <span class="hljs-keyword">import</span> MLClient
<span class="hljs-keyword">from</span> azure.identity <span class="hljs-keyword">import</span> DefaultAzureCredential
<span class="hljs-keyword">from</span> azure.ai.ml.entities <span class="hljs-keyword">import</span> Data
<span class="hljs-keyword">from</span> azure.ai.ml.constants <span class="hljs-keyword">import</span> AssetTypes

<span class="hljs-keyword">if</span> __name__ == <span class="hljs-string">'__main__'</span>:

    ml_client = MLClient.from_config(DefaultAzureCredential())

    version = <span class="hljs-string">'&lt;VERSION&gt;'</span>
    path = <span class="hljs-string">'./data/&lt;FILE_NAME&gt;'</span>
    name = <span class="hljs-string">'&lt;DATA_ASSET_NAME&gt;'</span>
    description = <span class="hljs-string">'&lt;DATA_ASSET_DESCRIPTION&gt;'</span>

    data_asset = Data(
        path=path,
        type=AssetTypes.URI_FILE,
        description=description,
        name=name,
        version=version
    )
    <span class="hljs-keyword">try</span>:
        ml_client.data.create_or_update(data_asset)
        print(<span class="hljs-string">f'Dataset `<span class="hljs-subst">{name}</span>` version `<span class="hljs-subst">{version}</span>` created/updated successfully.'</span>)
    <span class="hljs-keyword">except</span> Exception <span class="hljs-keyword">as</span> e:
        print(<span class="hljs-string">f'Error: <span class="hljs-subst">{str(e)}</span>'</span>)
</code></pre>
<h3 id="heading-step-4-create-a-table-data-asset">Step 4: Create a Table data asset</h3>
<p>In the previous step, we registered the file as a File data asset. However, if your data is tabular, you can create an MLTable from it and register it as a data asset. An MLTable is a schema that defines a set of operations for loading data from the source. We'll author an MLTable file using <code>mltable</code>, which will document the data loading operations, and create an MLTable data asset.</p>
<pre><code class="lang-python"><span class="hljs-comment"># to_ml_table.py</span>
<span class="hljs-keyword">import</span> mltable
<span class="hljs-keyword">from</span> mltable <span class="hljs-keyword">import</span> MLTableHeaders, MLTableFileEncoding
<span class="hljs-keyword">from</span> azure.ai.ml <span class="hljs-keyword">import</span> MLClient
<span class="hljs-keyword">from</span> azure.identity <span class="hljs-keyword">import</span> DefaultAzureCredential


<span class="hljs-keyword">if</span> __name__ == <span class="hljs-string">'__main__'</span>:

    ml_client = MLClient.from_config(DefaultAzureCredential())

    version = <span class="hljs-string">'&lt;FILE DATA ASSET VERSION&gt;'</span>
    name = <span class="hljs-string">'&lt;FILE DATA ASSET NAME&gt;'</span>

    data_asset = ml_client.data.get(name=name, version=version)

    tbl = mltable.from_delimited_files(
        paths=[{<span class="hljs-string">'file'</span>: data_asset.path}],
        delimiter=<span class="hljs-string">','</span>,
        header=MLTableHeaders.all_files_same_headers,
        infer_column_types=<span class="hljs-literal">True</span>,
        include_path_column=<span class="hljs-literal">False</span>,
        encoding=MLTableFileEncoding.utf8
    )

    print(<span class="hljs-string">f'MLTable `<span class="hljs-subst">{name}</span>` version `<span class="hljs-subst">{version}</span>` created from delimted files successfully.'</span>)

    print(tbl.show(<span class="hljs-number">5</span>))
    df = tbl.to_pandas_dataframe()
    print(df.head(<span class="hljs-number">5</span>))
    tbl.save(<span class="hljs-string">'./mltable/&lt;MLTABLE NAME&gt;'</span>)
</code></pre>
<p>You can take a look in the <code>.\mltable\&lt;MLTABLE NAME&gt;</code> folder to find a file called <code>MLTable</code>. This is a <code>YAML</code> file that describes the operations for data loading. </p>
<pre><code class="lang-yaml"><span class="hljs-attr">paths:</span>
<span class="hljs-bullet">-</span> <span class="hljs-attr">file:</span> <span class="hljs-string">azureml://subscriptions/&lt;subscription_id&gt;/resourcegroups/&lt;resource_group_name&gt;/workspaces/&lt;workspace_name&gt;/datastores/&lt;datastore_name&gt;/paths/LocalUpload/&lt;path_id&gt;/&lt;file_name&gt;</span>
<span class="hljs-attr">transformations:</span>
<span class="hljs-bullet">-</span> <span class="hljs-attr">read_delimited:</span>
    <span class="hljs-attr">delimiter:</span> <span class="hljs-string">','</span>
    <span class="hljs-attr">empty_as_string:</span> <span class="hljs-literal">false</span>
    <span class="hljs-attr">encoding:</span> <span class="hljs-string">utf8</span>
    <span class="hljs-attr">header:</span> <span class="hljs-string">all_files_same_headers</span>
    <span class="hljs-attr">include_path_column:</span> <span class="hljs-literal">false</span>
    <span class="hljs-attr">infer_column_types:</span> <span class="hljs-literal">true</span>
    <span class="hljs-attr">partition_size:</span> <span class="hljs-number">20971520</span>
    <span class="hljs-attr">path_column:</span> <span class="hljs-string">Path</span>
    <span class="hljs-attr">support_multi_line:</span> <span class="hljs-literal">false</span>
<span class="hljs-attr">type:</span> <span class="hljs-string">mltable</span>
</code></pre>
<p>You can load the MLTable as follows:</p>
<pre><code class="lang-python"><span class="hljs-comment"># load_ml_table.py</span>
<span class="hljs-keyword">import</span> mltable

<span class="hljs-keyword">if</span> __name__ == <span class="hljs-string">'__main__'</span>:

    tbl = mltable.load(<span class="hljs-string">'./mltable/&lt;MLTABLE NAME&gt;'</span>)
    print(tbl.show(<span class="hljs-number">5</span>))
</code></pre>
<p>Next we can create a Table data asset using the following code:</p>
<pre><code class="lang-python"><span class="hljs-comment"># create_ml_table.py</span>
<span class="hljs-keyword">from</span> azure.ai.ml <span class="hljs-keyword">import</span> MLClient
<span class="hljs-keyword">from</span> azure.identity <span class="hljs-keyword">import</span> DefaultAzureCredential
<span class="hljs-keyword">from</span> azure.ai.ml.entities <span class="hljs-keyword">import</span> Data
<span class="hljs-keyword">from</span> azure.ai.ml.constants <span class="hljs-keyword">import</span> AssetTypes

<span class="hljs-keyword">if</span> __name__ == <span class="hljs-string">'__main__'</span>:

    ml_client = MLClient.from_config(DefaultAzureCredential())

    path = <span class="hljs-string">'./mltable/&lt;MLTABLE NAME&gt;'</span>
    version = <span class="hljs-string">'&lt;MLTABLE DATA ASSET VERSION&gt;'</span>
    name = <span class="hljs-string">'&lt;MLTABLE DATA ASSET NAME&gt;'</span>
    description = <span class="hljs-string">'&lt;MLTABLE DATA ASSET DESCRIPTION&gt;'</span>

    data_asset = Data(
        path=path,
        type=AssetTypes.MLTABLE,
        description=description,
        name=name,
        version=version
    )

    <span class="hljs-keyword">try</span>:
        ml_client.data.create_or_update(data_asset)
        print(<span class="hljs-string">f'MLTable `<span class="hljs-subst">{name}</span>` version `<span class="hljs-subst">{version}</span>` created/updated successfully.'</span>)
    <span class="hljs-keyword">except</span> Exception <span class="hljs-keyword">as</span> e:
        print(<span class="hljs-string">f'Error: <span class="hljs-subst">{str(e)}</span>'</span>)
</code></pre>
<h3 id="heading-step-5-archive-a-data-asset">Step 5: Archive a data asset</h3>
<p><a target="_blank" href="https://learn.microsoft.com/en-us/azure/machine-learning/?view=azureml-api-2">Azure Machine Learning</a> does not support data asset deletion due to its <a target="_blank" href="https://learn.microsoft.com/en-us/azure/machine-learning/how-to-create-data-assets?view=azureml-api-2&amp;tabs=cli#delete-a-data-asset">immutable</a> nature. Instead, you can archive the data asset. Use the provided Python script to archive a previously created File Data Asset.</p>
<pre><code class="lang-python"><span class="hljs-comment"># archive_data_asset.py</span>
<span class="hljs-keyword">from</span> azure.ai.ml <span class="hljs-keyword">import</span> MLClient
<span class="hljs-keyword">from</span> azure.identity <span class="hljs-keyword">import</span> DefaultAzureCredential

<span class="hljs-keyword">if</span> __name__ == <span class="hljs-string">'__main__'</span>:

    ml_client = MLClient(DefaultAzureCredential())

    name = <span class="hljs-string">'&lt;DATA ASSET NAME&gt;'</span>

    ml_client.data.archive(name)
</code></pre>
<hr />
<p>In this post, we've only scratched the surface of what <a target="_blank" href="https://learn.microsoft.com/en-us/azure/machine-learning/?view=azureml-api-2">Azure Machine Learning</a> can do for your data management needs. There are many more exciting features and capabilities waiting to be explored. Stay tuned for more in-depth guides and tutorials on Azure Machine Learning, where we'll dive deeper into its functionalities.</p>
]]></content:encoded></item><item><title><![CDATA[Azure Machine Learning: Unveiling the Pros and Cons]]></title><description><![CDATA[If you're a person who is venturing into the ever-expanding universe of cloud services and tools geared towards data science workloads, you've probably stumbled upon Microsoft's Azure Machine Learning platform.
In this post, we'll dissect why Azure M...]]></description><link>https://nb.blog.queenpages.com/exploring-the-pros-and-cons-of-azure-machine-learning</link><guid isPermaLink="true">https://nb.blog.queenpages.com/exploring-the-pros-and-cons-of-azure-machine-learning</guid><category><![CDATA[Azure]]></category><category><![CDATA[Machine Learning]]></category><category><![CDATA[Data Science]]></category><category><![CDATA[Azure Machine Learning]]></category><category><![CDATA[azureml]]></category><dc:creator><![CDATA[Nick Braeckman]]></dc:creator><pubDate>Sat, 23 Sep 2023 20:27:34 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1695580782520/67c3ccdb-df20-4b47-a5db-6375b98d26d4.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>If you're a person who is venturing into the ever-expanding universe of cloud services and tools geared towards data science workloads, you've probably stumbled upon Microsoft's <a target="_blank" href="https://learn.microsoft.com/en-us/azure/machine-learning/?view=azureml-api-2">Azure Machine Learning</a> platform.</p>
<p>In this post, we'll dissect why <a target="_blank" href="https://learn.microsoft.com/en-us/azure/machine-learning/?view=azureml-api-2">Azure Machine Learning</a> should (or shouldn't) join your tech arsenal. This is just the start of a series of posts where we'll explore the pros and cons of  <a target="_blank" href="https://learn.microsoft.com/en-us/azure/machine-learning/?view=azureml-api-2">Azure Machine Learning</a> in greater depth. As we become more proficient in using this tool, the advantages and limitations will become even clearer. So, stay tuned for a deeper dive into the world of <a target="_blank" href="https://learn.microsoft.com/en-us/azure/machine-learning/?view=azureml-api-2">Azure Machine Learning</a>! 🚀</p>
<h2 id="heading-control-over-model-training-and-management">Control over Model Training and Management</h2>
<p>One of the standout features of <a target="_blank" href="https://learn.microsoft.com/en-us/azure/machine-learning/?view=azureml-api-2">Azure Machine Learning</a>, in comparison with other Azure services related to data science (<a target="_blank" href="https://learn.microsoft.com/en-us/azure/ai-services/">Azure AI Services</a> and <a target="_blank" href="https://learn.microsoft.com/en-us/azure/synapse-analytics/">Azure Synapse Analytics</a>), is the control it provides over model training and management. For seasoned data scientists, this is crucial. You get to customize and fine-tune every aspect of your machine learning workflows, including <a target="_blank" href="https://learn.microsoft.com/en-us/azure/machine-learning/how-to-create-component-pipeline-python?view=azureml-api-2">custom ML pipeline components</a>, which are self-contained pieces of code that perform steps in the pipeline; custom training to train <a target="_blank" href="https://scikit-learn.org">scikit-learn</a>, <a target="_blank" href="https://www.tensorflow.org/">TensorFlow</a>, <a target="_blank" href="https://keras.io/">Keras</a>, <a target="_blank" href="https://pytorch.org/">PyTorch</a>, etc. models; and custom deployment to deploy a model to an endpoint in a custom container, etc.</p>
<p>But, and it's a reasonable "but" here 🤔, this level of control might be overwhelming. If you're just starting your journey in the world of data science, the sheer number of options, settings, and integrations in <a target="_blank" href="https://learn.microsoft.com/en-us/azure/machine-learning/?view=azureml-api-2">Azure Machine Learning</a> could leave you scratching your head. In such cases, fear not! The <a target="_blank" href="https://learn.microsoft.com/en-us/azure/machine-learning/?view=azureml-api-2">Azure Machine Learning</a> studio offers great functionality to help you kick start your machine learning adventures.</p>
<h2 id="heading-ease-of-getting-started">Ease of Getting Started</h2>
<p>You can quickly implement a machine learning solution for well-known machine learning problems with <a target="_blank" href="https://learn.microsoft.com/en-us/azure/machine-learning/concept-automated-ml?view=azureml-api-2">AutoML</a>. This can be completely done in the <a target="_blank" href="https://learn.microsoft.com/en-us/azure/machine-learning/?view=azureml-api-2">Azure Machine Learning</a> studio, which allows you to manage your workload via a user interface. <a target="_blank" href="https://learn.microsoft.com/en-us/azure/machine-learning/tutorial-first-experiment-automated-ml?view=azureml-api-2">This</a> is a great example of how to train a classification model with no-code <a target="_blank" href="https://learn.microsoft.com/en-us/azure/machine-learning/concept-automated-ml?view=azureml-api-2">AutoML</a> using automated machine learning in <a target="_blank" href="https://learn.microsoft.com/en-us/azure/machine-learning/?view=azureml-api-2">Azure Machine Learning</a> studio.</p>
<h2 id="heading-comprehensive-lifecycle-management">Comprehensive Lifecycle Management</h2>
<p><a target="_blank" href="https://learn.microsoft.com/en-us/azure/machine-learning/?view=azureml-api-2">Azure Machine Learning</a> doesn't just stop at model training; it covers the complete machine learning lifecycle. The <a target="_blank" href="https://learn.microsoft.com/en-us/azure/machine-learning/?view=azureml-api-2">Azure Machine Learning</a> studio is designed to be intuitive, making it easier for you to develop, train, deploy, and manage your models. This streamlined experience is advantageous for productivity and collaboration, especially in larger teams or organizations.</p>
<p>However, there's a flip side. Some data scientists who crave advanced customization or require specific tool integrations might find <a target="_blank" href="https://learn.microsoft.com/en-us/azure/machine-learning/?view=azureml-api-2">Azure Machine Learning</a> slightly restrictive. It's a trade-off between ease of use and the ability to tailor every aspect of your workflow to your precise needs.</p>
<h3 id="heading-version-management">Version Management</h3>
<p>Now, let's shift our focus to another critical aspect: version management. Version control can be a tricky issue in the world of machine learning. Keeping track of different model versions, datasets, and experiments is crucial but can be a logistical nightmare. <a target="_blank" href="https://learn.microsoft.com/en-us/azure/machine-learning/?view=azureml-api-2">Azure Machine Learning</a> comes to the rescue here by automating model and data version management. This reduces the risk of conflicts and ensures that you can easily roll back to a previous state if something goes wrong.</p>
<hr />
<p>In conclusion, <a target="_blank" href="https://learn.microsoft.com/en-us/azure/machine-learning/?view=azureml-api-2">Azure Machine Learning</a> is a versatile tool for data scientists. It can be your trusty sidekick in the cloud, but like any tool, it's essential to weigh its benefits against your specific needs and preferences. In upcoming posts, I'll delve deeper into the core components of <a target="_blank" href="https://learn.microsoft.com/en-us/azure/machine-learning/?view=azureml-api-2">Azure Machine Learning</a>, helping you determine if it's the right fit for your machine learning projects. Stay tuned!</p>
]]></content:encoded></item></channel></rss>