Skip to content

Commit

Permalink
Added free subscription tutorial
Browse files Browse the repository at this point in the history
  • Loading branch information
JaumeAmoresDS committed Mar 27, 2024
1 parent 203a841 commit 514a6c7
Show file tree
Hide file tree
Showing 5 changed files with 321 additions and 45 deletions.
58 changes: 57 additions & 1 deletion _site/search.json

Large diffs are not rendered by default.

172 changes: 172 additions & 0 deletions additional/data_science/aml/free_subscription.ipynb

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions gpull.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
eval "$(ssh-agent -s)"
ssh-add ~/.ssh/id_ed25519_home
sudo hwclock -s
git pull $1
116 changes: 72 additions & 44 deletions posts/data_science/hello_world.ipynb
Original file line number Diff line number Diff line change
@@ -1,5 +1,21 @@
{
"cells": [
{
"cell_type": "raw",
"id": "38534efa-75c0-4aca-941c-e396f2976d46",
"metadata": {},
"source": [
"---\n",
"title: \"Hello World AML pipeline with component\"\n",
"subtitle: Exploring AML through Hello World components.\n",
"author: \"Jaume Amores\"\n",
"date: 2024-03-22\n",
"toc: true\n",
"categories:\n",
" - Data Science\n",
"---"
]
},
{
"cell_type": "markdown",
"id": "5045fb3a-c4d6-4530-9d24-f935c9b9a9d4",
Expand All @@ -8,6 +24,32 @@
"# Hello World AML pipeline with components"
]
},
{
"cell_type": "markdown",
"id": "f3961630-1375-4d89-8ac6-8513fa597a98",
"metadata": {},
"source": [
"The purpose of this tutorial is to show how to incrementally build a pipeline from simple and debuggable \"Hello World\" components. In order to run this at home, you may find it useful to create a free Azure ML subscription as described in the how-to guide I have [here](../../additional/data_science/aml/free_subscription.html)"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "b4403853-efc1-4aa2-b99f-4530447b3141",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"free_subscription.ipynb\n"
]
}
],
"source": [
"ls ../../additional/data_science/aml"
]
},
{
"cell_type": "markdown",
"id": "24c97d77-c8a3-4859-8ef0-e3e8fa88aa8b",
Expand Down Expand Up @@ -36,7 +78,7 @@
},
{
"cell_type": "code",
"execution_count": 1,
"execution_count": null,
"id": "b4a67b25-46e9-40af-8755-35c548160a3b",
"metadata": {},
"outputs": [
Expand Down Expand Up @@ -67,7 +109,7 @@
},
{
"cell_type": "code",
"execution_count": 3,
"execution_count": null,
"id": "0b2a7fdb-b52f-4240-a031-c6bd8bfb886f",
"metadata": {},
"outputs": [
Expand Down Expand Up @@ -130,7 +172,7 @@
},
{
"cell_type": "code",
"execution_count": 5,
"execution_count": null,
"id": "fc48978f-363a-482e-a4d3-57d85c315243",
"metadata": {},
"outputs": [
Expand Down Expand Up @@ -245,7 +287,7 @@
},
{
"cell_type": "code",
"execution_count": 1,
"execution_count": null,
"id": "794b917b-a4aa-430a-96b2-cd375a0efe97",
"metadata": {},
"outputs": [
Expand Down Expand Up @@ -273,9 +315,7 @@
{
"cell_type": "markdown",
"id": "439b43fd-1fd6-422a-9420-59af3aab027a",
"metadata": {
"tags": []
},
"metadata": {},
"source": [
"## Running script as a job\n",
"\n",
Expand All @@ -294,7 +334,7 @@
},
{
"cell_type": "code",
"execution_count": 2,
"execution_count": null,
"id": "904b3dc3-4abf-4509-8874-52e5c9f9600d",
"metadata": {},
"outputs": [
Expand Down Expand Up @@ -337,7 +377,7 @@
},
{
"cell_type": "code",
"execution_count": 3,
"execution_count": null,
"id": "2ee8efea-d7f4-4a5c-9d60-010fcd9bfdd1",
"metadata": {},
"outputs": [],
Expand Down Expand Up @@ -373,7 +413,7 @@
},
{
"cell_type": "code",
"execution_count": 10,
"execution_count": null,
"id": "8184260b-bc9a-4dd8-a916-e593d4590d6d",
"metadata": {},
"outputs": [
Expand All @@ -398,10 +438,10 @@
"<table style=\"width:100%\"><tr><th>Experiment</th><th>Name</th><th>Type</th><th>Status</th><th>Details Page</th></tr><tr><td>hello_world</td><td>clever_spade_sq4jwcg67r</td><td>command</td><td>Starting</td><td><a href=\"https://ml.azure.com/runs/clever_spade_sq4jwcg67r?wsid=/subscriptions/6af6741b-f140-48c2-84ca-027a27365026/resourcegroups/helloworld/workspaces/helloworld&amp;tid=369b25b1-777a-484a-8b5b-52d79bc83015\" target=\"_blank\" rel=\"noopener\">Link to Azure Machine Learning studio</a></td></tr></table>"
],
"text/plain": [
"Command({'parameters': {}, 'init': False, 'name': 'clever_spade_sq4jwcg67r', 'type': 'command', 'status': 'Starting', 'log_files': None, 'description': None, 'tags': {}, 'properties': {'_azureml.ComputeTargetType': 'amlctrain', '_azureml.ClusterName': None, 'ContentSnapshotId': '59fd973d-6cab-4386-a4a8-f1ea1676287f'}, 'print_as_yaml': True, 'id': '/subscriptions/6af6741b-f140-48c2-84ca-027a27365026/resourceGroups/helloworld/providers/Microsoft.MachineLearningServices/workspaces/helloworld/jobs/clever_spade_sq4jwcg67r', 'Resource__source_path': None, 'base_path': '/mnt/batch/tasks/shared/LS_root/mounts/clusters/jaumecpu/code/Users/jau.m/hello_world', 'creation_context': <azure.ai.ml.entities._system_data.SystemData object at 0x7f8aa0317e80>, 'serialize': <msrest.serialization.Serializer object at 0x7f8aa27ca590>, 'allowed_keys': {}, 'key_restriction': False, 'logger': <Logger attr_dict (WARNING)>, 'display_name': 'Simplest Hello World', 'experiment_name': 'hello_world', 'compute': None, 'services': {'Tracking': {'endpoint': 'azureml://eastus2.api.azureml.ms/mlflow/v1.0/subscriptions/6af6741b-f140-48c2-84ca-027a27365026/resourceGroups/helloworld/providers/Microsoft.MachineLearningServices/workspaces/helloworld?', 'type': 'Tracking'}, 'Studio': {'endpoint': 'https://ml.azure.com/runs/clever_spade_sq4jwcg67r?wsid=/subscriptions/6af6741b-f140-48c2-84ca-027a27365026/resourcegroups/helloworld/workspaces/helloworld&tid=369b25b1-777a-484a-8b5b-52d79bc83015', 'type': 'Studio'}}, 'comment': None, 'job_inputs': {'name': 'Jaume'}, 'job_outputs': {'default': {'type': 'uri_folder', 'path': 'azureml://datastores/workspaceartifactstore/ExperimentRun/dcid.clever_spade_sq4jwcg67r', 'mode': 'rw_mount'}}, 'inputs': {'name': <azure.ai.ml.entities._job.pipeline._io.base.NodeInput object at 0x7f8aa27ca290>}, 'outputs': {'default': <azure.ai.ml.entities._job.pipeline._io.base.NodeOutput object at 0x7f8aa04f0340>}, 'component': CommandComponent({'intellectual_property': None, 'auto_increment_version': True, 'source': 'REMOTE.WORKSPACE.JOB', 'is_anonymous': False, 'auto_delete_setting': None, 'name': 'clever_spade_sq4jwcg67r', 'description': None, 'tags': {}, 'properties': {}, 'print_as_yaml': True, 'id': None, 'Resource__source_path': None, 'base_path': PosixPath('.'), 'creation_context': <azure.ai.ml.entities._system_data.SystemData object at 0x7f8aa0317e80>, 'serialize': <msrest.serialization.Serializer object at 0x7f8aa27ca980>, 'command': 'python hello_world_core.py --name ${{inputs.name}}', 'code': '/subscriptions/6af6741b-f140-48c2-84ca-027a27365026/resourceGroups/helloworld/providers/Microsoft.MachineLearningServices/workspaces/helloworld/codes/6ac1a0d9-2ea6-48d4-be76-c738397c29f9/versions/1', 'environment_variables': {}, 'environment': 'azureml:AzureML-sklearn-1.0-ubuntu20.04-py38-cpu@latest', 'distribution': None, 'resources': None, 'queue_settings': None, 'version': None, 'latest_version': None, 'schema': None, 'type': 'command', 'display_name': 'Simplest Hello World', 'is_deterministic': True, 'inputs': {'name': {'type': 'string', 'default': 'Jaume'}}, 'outputs': {'default': {'type': 'uri_folder', 'path': 'azureml://datastores/workspaceartifactstore/ExperimentRun/dcid.clever_spade_sq4jwcg67r', 'mode': 'rw_mount'}}, 'yaml_str': None, 'other_parameter': {'status': 'Starting', 'parameters': {}}, 'additional_includes': [], 'CommandComponent__additional_includes_obj': None}), 'referenced_control_flow_node_instance_id': None, 'kwargs': {'services': {'Tracking': {'endpoint': 'azureml://eastus2.api.azureml.ms/mlflow/v1.0/subscriptions/6af6741b-f140-48c2-84ca-027a27365026/resourceGroups/helloworld/providers/Microsoft.MachineLearningServices/workspaces/helloworld?', 'type': 'Tracking'}, 'Studio': {'endpoint': 'https://ml.azure.com/runs/clever_spade_sq4jwcg67r?wsid=/subscriptions/6af6741b-f140-48c2-84ca-027a27365026/resourcegroups/helloworld/workspaces/helloworld&tid=369b25b1-777a-484a-8b5b-52d79bc83015', 'type': 'Studio'}}, 'status': 'Starting', 'creation_context': <azure.ai.ml.entities._system_data.SystemData object at 0x7f8aa0317e80>}, 'instance_id': 'fdfea982-8943-4733-8292-f47d663f5e5d', 'source': 'BUILDER', 'validate_required_input_not_provided': True, 'limits': None, 'identity': None, 'distribution': None, 'environment_variables': {}, 'environment': 'azureml:AzureML-sklearn-1.0-ubuntu20.04-py38-cpu@latest', 'resources': {'instance_count': 1, 'shm_size': '2g'}, 'queue_settings': {'job_tier': 'standard'}, 'swept': False})"
"Command({'parameters': {}, 'init': False, 'name': 'clever_spade_sq4jwcg67r', 'type': 'command', 'status': 'Starting', 'log_files': None, 'description': None, 'tags': {}, 'properties': {'_azureml.ComputeTargetType': 'amlctrain', '_azureml.ClusterName': None, 'ContentSnapshotId': '59fd973d-6cab-4386-a4a8-f1ea1676287f'}, 'print_as_yaml': True, 'id': '/subscriptions/6af6741b-f140-48c2-84ca-027a27365026/resourceGroups/helloworld/providers/Microsoft.MachineLearningServices/workspaces/helloworld/jobs/clever_spade_sq4jwcg67r', 'Resource__source_path': None, 'base_path': '/mnt/batch/tasks/shared/LS_root/mounts/clusters/jaumecpu/code/Users/jau.m/hello_world', 'creation_context': <azure.ai.ml.entities._system_data.SystemData object>, 'serialize': <msrest.serialization.Serializer object>, 'allowed_keys': {}, 'key_restriction': False, 'logger': <Logger attr_dict (WARNING)>, 'display_name': 'Simplest Hello World', 'experiment_name': 'hello_world', 'compute': None, 'services': {'Tracking': {'endpoint': 'azureml://eastus2.api.azureml.ms/mlflow/v1.0/subscriptions/6af6741b-f140-48c2-84ca-027a27365026/resourceGroups/helloworld/providers/Microsoft.MachineLearningServices/workspaces/helloworld?', 'type': 'Tracking'}, 'Studio': {'endpoint': 'https://ml.azure.com/runs/clever_spade_sq4jwcg67r?wsid=/subscriptions/6af6741b-f140-48c2-84ca-027a27365026/resourcegroups/helloworld/workspaces/helloworld&tid=369b25b1-777a-484a-8b5b-52d79bc83015', 'type': 'Studio'}}, 'comment': None, 'job_inputs': {'name': 'Jaume'}, 'job_outputs': {'default': {'type': 'uri_folder', 'path': 'azureml://datastores/workspaceartifactstore/ExperimentRun/dcid.clever_spade_sq4jwcg67r', 'mode': 'rw_mount'}}, 'inputs': {'name': <azure.ai.ml.entities._job.pipeline._io.base.NodeInput object>}, 'outputs': {'default': <azure.ai.ml.entities._job.pipeline._io.base.NodeOutput object>}, 'component': CommandComponent({'intellectual_property': None, 'auto_increment_version': True, 'source': 'REMOTE.WORKSPACE.JOB', 'is_anonymous': False, 'auto_delete_setting': None, 'name': 'clever_spade_sq4jwcg67r', 'description': None, 'tags': {}, 'properties': {}, 'print_as_yaml': True, 'id': None, 'Resource__source_path': None, 'base_path': PosixPath('.'), 'creation_context': <azure.ai.ml.entities._system_data.SystemData object>, 'serialize': <msrest.serialization.Serializer object>, 'command': 'python hello_world_core.py --name ${{inputs.name}}', 'code': '/subscriptions/6af6741b-f140-48c2-84ca-027a27365026/resourceGroups/helloworld/providers/Microsoft.MachineLearningServices/workspaces/helloworld/codes/6ac1a0d9-2ea6-48d4-be76-c738397c29f9/versions/1', 'environment_variables': {}, 'environment': 'azureml:AzureML-sklearn-1.0-ubuntu20.04-py38-cpu@latest', 'distribution': None, 'resources': None, 'queue_settings': None, 'version': None, 'latest_version': None, 'schema': None, 'type': 'command', 'display_name': 'Simplest Hello World', 'is_deterministic': True, 'inputs': {'name': {'type': 'string', 'default': 'Jaume'}}, 'outputs': {'default': {'type': 'uri_folder', 'path': 'azureml://datastores/workspaceartifactstore/ExperimentRun/dcid.clever_spade_sq4jwcg67r', 'mode': 'rw_mount'}}, 'yaml_str': None, 'other_parameter': {'status': 'Starting', 'parameters': {}}, 'additional_includes': [], 'CommandComponent__additional_includes_obj': None}), 'referenced_control_flow_node_instance_id': None, 'kwargs': {'services': {'Tracking': {'endpoint': 'azureml://eastus2.api.azureml.ms/mlflow/v1.0/subscriptions/6af6741b-f140-48c2-84ca-027a27365026/resourceGroups/helloworld/providers/Microsoft.MachineLearningServices/workspaces/helloworld?', 'type': 'Tracking'}, 'Studio': {'endpoint': 'https://ml.azure.com/runs/clever_spade_sq4jwcg67r?wsid=/subscriptions/6af6741b-f140-48c2-84ca-027a27365026/resourcegroups/helloworld/workspaces/helloworld&tid=369b25b1-777a-484a-8b5b-52d79bc83015', 'type': 'Studio'}}, 'status': 'Starting', 'creation_context': <azure.ai.ml.entities._system_data.SystemData object>}, 'instance_id': 'fdfea982-8943-4733-8292-f47d663f5e5d', 'source': 'BUILDER', 'validate_required_input_not_provided': True, 'limits': None, 'identity': None, 'distribution': None, 'environment_variables': {}, 'environment': 'azureml:AzureML-sklearn-1.0-ubuntu20.04-py38-cpu@latest', 'resources': {'instance_count': 1, 'shm_size': '2g'}, 'queue_settings': {'job_tier': 'standard'}, 'swept': False})"
]
},
"execution_count": 10,
"execution_count": null,
"metadata": {},
"output_type": "execute_result"
}
Expand Down Expand Up @@ -609,7 +649,7 @@
},
{
"cell_type": "code",
"execution_count": 4,
"execution_count": null,
"id": "08db4dd6-a562-4c1f-ad7e-375564f09288",
"metadata": {},
"outputs": [
Expand All @@ -629,7 +669,7 @@
},
{
"cell_type": "code",
"execution_count": 9,
"execution_count": null,
"id": "b3c3df45-e03e-4e0f-b753-e8d5be1dab5b",
"metadata": {},
"outputs": [],
Expand All @@ -652,7 +692,7 @@
},
{
"cell_type": "code",
"execution_count": 10,
"execution_count": null,
"id": "431f9e20-53a9-4468-af9d-f05d85e17162",
"metadata": {},
"outputs": [],
Expand All @@ -665,7 +705,7 @@
},
{
"cell_type": "code",
"execution_count": 11,
"execution_count": null,
"id": "c79ff2bb-7e75-4aba-a1c1-d6e577e764f6",
"metadata": {},
"outputs": [
Expand Down Expand Up @@ -734,7 +774,7 @@
},
{
"cell_type": "code",
"execution_count": 19,
"execution_count": null,
"id": "f787c906-5349-4dfe-81cc-57a351ed6903",
"metadata": {},
"outputs": [
Expand Down Expand Up @@ -766,7 +806,7 @@
},
{
"cell_type": "code",
"execution_count": 20,
"execution_count": null,
"id": "dcf92501-5694-42f5-9515-cb4869609693",
"metadata": {},
"outputs": [],
Expand All @@ -789,7 +829,7 @@
},
{
"cell_type": "code",
"execution_count": 26,
"execution_count": null,
"id": "8d2783f1-9ef3-45eb-be8b-a54f86c4a914",
"metadata": {},
"outputs": [
Expand Down Expand Up @@ -876,7 +916,7 @@
},
{
"cell_type": "code",
"execution_count": 28,
"execution_count": null,
"id": "ecaadb90-1e81-4d0a-b8fa-a401a190965a",
"metadata": {},
"outputs": [
Expand Down Expand Up @@ -984,7 +1024,7 @@
},
{
"cell_type": "code",
"execution_count": 29,
"execution_count": null,
"id": "3f4c35dd-826d-4478-b360-c9e7d647de16",
"metadata": {},
"outputs": [],
Expand All @@ -994,7 +1034,7 @@
},
{
"cell_type": "code",
"execution_count": 32,
"execution_count": null,
"id": "bc85b398-20b4-4655-a3ed-79c43e66cb1d",
"metadata": {},
"outputs": [
Expand Down Expand Up @@ -1097,7 +1137,7 @@
},
{
"cell_type": "code",
"execution_count": 47,
"execution_count": null,
"id": "c58b92f4-3232-4f17-a3e0-eb44931cf3a3",
"metadata": {},
"outputs": [],
Expand All @@ -1111,7 +1151,7 @@
},
{
"cell_type": "code",
"execution_count": 48,
"execution_count": null,
"id": "41065e75-75f9-4f81-a2a7-5d2c5ece6b41",
"metadata": {},
"outputs": [],
Expand All @@ -1138,7 +1178,7 @@
},
{
"cell_type": "code",
"execution_count": 57,
"execution_count": null,
"id": "1eb04804-991f-4c25-89e7-bf4b4901813c",
"metadata": {},
"outputs": [
Expand Down Expand Up @@ -1196,7 +1236,7 @@
},
{
"cell_type": "code",
"execution_count": 58,
"execution_count": null,
"id": "24b74e38-eba1-4ab6-a5df-6faa3f55c19a",
"metadata": {},
"outputs": [
Expand Down Expand Up @@ -1238,7 +1278,7 @@
},
{
"cell_type": "code",
"execution_count": 59,
"execution_count": null,
"id": "6afcb989-5c77-4ed3-9d43-87dc83d51d00",
"metadata": {},
"outputs": [
Expand Down Expand Up @@ -1296,7 +1336,7 @@
},
{
"cell_type": "code",
"execution_count": 60,
"execution_count": null,
"id": "3b4f6fb0-26a4-471e-96c7-511673015eda",
"metadata": {},
"outputs": [
Expand Down Expand Up @@ -1352,7 +1392,7 @@
},
{
"cell_type": "code",
"execution_count": 41,
"execution_count": null,
"id": "314cb640-e9ad-4fc2-b651-bf8d54cc8fbb",
"metadata": {},
"outputs": [
Expand Down Expand Up @@ -1419,7 +1459,7 @@
},
{
"cell_type": "code",
"execution_count": 61,
"execution_count": null,
"id": "55196b04-892c-4e33-8c17-2ccf40fcdaf6",
"metadata": {},
"outputs": [
Expand Down Expand Up @@ -1512,21 +1552,9 @@
],
"metadata": {
"kernelspec": {
"display_name": "Python 3.10 - SDK v2",
"display_name": "tabularml",
"language": "python",
"name": "python310-sdkv2"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.10.11"
"name": "tabularml"
}
},
"nbformat": 4,
Expand Down
16 changes: 16 additions & 0 deletions posts/data_science/index.qmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
title: "Data Science"
author: "Jaume Amores"
#date: 2024-03-22
#toc: true
listing:
- id: talks
#contents: "**/*/index.qmd"
#fields: [date, title]
fields: [title]
sort: "date desc"
categories: true
categories:
- Data Science
---

0 comments on commit 514a6c7

Please sign in to comment.