Skip to content

Commit

Permalink
Test Run for v0.1.0b5 (Azure#1473)
Browse files Browse the repository at this point in the history
* Updated setup.sh to use latest SDK

* Updated setup.sh for sample validation

* Ran black on sdk

* Ran black on cli

* Ran black for scripts

* Added dummy comment to rerun validation

* Removed dummy comment
  • Loading branch information
nthandeMS authored Jul 11, 2022
1 parent 43f88da commit d9f75fd
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 29 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ def _lr_fn(iteration, epoch):
lr = base_lr * (epoch + 1) / warmup_length
else:
e = epoch - warmup_length
lr = base_lr * (epoch_decay ** e)
lr = base_lr * (epoch_decay**e)
return lr

return lr_policy(_lr_fn, logger=logger)
Expand Down
12 changes: 8 additions & 4 deletions scripts/validation/check_experiment_result.py
Original file line number Diff line number Diff line change
Expand Up @@ -174,11 +174,15 @@ def checkVisionTrainRun(child_runs, expected_min_score, expected_max_score):
)
print("Primary metric value of {}: {}".format(hd_run.id, best_metric))

lower_err_msg = "Primary metric value was lower than the expected min value of {}".format(
expected_min_score
lower_err_msg = (
"Primary metric value was lower than the expected min value of {}".format(
expected_min_score
)
)
higher_err_msg = "Primary metric value was higher than the expected max value of {}".format(
expected_max_score
higher_err_msg = (
"Primary metric value was higher than the expected max value of {}".format(
expected_max_score
)
)
assert best_metric >= expected_min_score, lower_err_msg
assert best_metric <= expected_max_score, higher_err_msg
Expand Down
30 changes: 8 additions & 22 deletions sdk/assets/data/data.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -65,16 +65,13 @@
"from azure.ai.ml import Input\n",
"from azure.ai.ml.constants import AssetTypes\n",
"\n",
"# === Note on path === \n",
"# can be can be a local path or a cloud path. AzureML supports https://`, `abfss://`, `wasbs://` and `azureml://` URIs. \n",
"# === Note on path ===\n",
"# can be can be a local path or a cloud path. AzureML supports https://`, `abfss://`, `wasbs://` and `azureml://` URIs.\n",
"# Local paths are automatically uploaded to the default datastore in the cloud.\n",
"# More details on supported paths: https://docs.microsoft.com/azure/machine-learning/how-to-read-write-data-v2#supported-paths\n",
"\n",
"inputs = {\n",
" \"input_data\": Input(\n",
" type=AssetTypes.URI_FILE, \n",
" path=\"./sample_data/titanic.csv\"\n",
" )\n",
" \"input_data\": Input(type=AssetTypes.URI_FILE, path=\"./sample_data/titanic.csv\")\n",
"}\n",
"\n",
"job = command(\n",
Expand Down Expand Up @@ -118,16 +115,13 @@
"from azure.ai.ml.constants import AssetTypes\n",
"\n",
"inputs = {\n",
" \"input_data\": Input(\n",
" type=AssetTypes.URI_FILE, \n",
" path=\"./sample_data/titanic.csv\"\n",
" )\n",
" \"input_data\": Input(type=AssetTypes.URI_FILE, path=\"./sample_data/titanic.csv\")\n",
"}\n",
"\n",
"outputs = {\n",
" \"output_folder\": Output(\n",
" type=AssetTypes.URI_FOLDER, \n",
" path=f\"azureml://subscriptions/{subscription_id}/resourcegroups/{resource_group}/workspaces/{workspace}/datastores/workspaceblobstore/paths/\"\n",
" type=AssetTypes.URI_FOLDER,\n",
" path=f\"azureml://subscriptions/{subscription_id}/resourcegroups/{resource_group}/workspaces/{workspace}/datastores/workspaceblobstore/paths/\",\n",
" )\n",
"}\n",
"\n",
Expand Down Expand Up @@ -205,10 +199,7 @@
"registered_data_asset = ml_client.data.get(name=\"titanic\", version=\"1\")\n",
"\n",
"my_job_inputs = {\n",
" \"input_data\": Input(\n",
" type=AssetTypes.URI_FILE,\n",
" path=registered_data_asset.id\n",
" )\n",
" \"input_data\": Input(type=AssetTypes.URI_FILE, path=registered_data_asset.id)\n",
"}\n",
"\n",
"job = command(\n",
Expand Down Expand Up @@ -322,12 +313,7 @@
"from azure.ai.ml import Input\n",
"from azure.ai.ml.constants import AssetTypes\n",
"\n",
"inputs = {\n",
" \"input_data\": Input(\n",
" type=AssetTypes.MLTABLE, \n",
" path=\"./sample-mltable\"\n",
" )\n",
"}\n",
"inputs = {\"input_data\": Input(type=AssetTypes.MLTABLE, path=\"./sample-mltable\")}\n",
"\n",
"job = command(\n",
" code=\"./src\", # local path where the code is stored\n",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ def _lr_fn(iteration, epoch):
lr = base_lr * (epoch + 1) / warmup_length
else:
e = epoch - warmup_length
lr = base_lr * (epoch_decay ** e)
lr = base_lr * (epoch_decay**e)
return lr

return lr_policy(_lr_fn, logger=logger)
Expand Down
2 changes: 1 addition & 1 deletion sdk/setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ pip install mldesigner
# </mldesigner_install>

# <az_ml_sdk_test_install>
# pip install azure-ai-ml==0.1.0.b4
pip install azure-ai-ml==0.1.0.b5
# </az_ml_sdk_test_install>

pip list

0 comments on commit d9f75fd

Please sign in to comment.