diff --git a/cli/setup.sh b/cli/setup.sh index 6f1ebc660c0..860c8475c97 100644 --- a/cli/setup.sh +++ b/cli/setup.sh @@ -6,7 +6,7 @@ # az extension remove -n ml # Use a daily build -az extension add --source https://azuremlsdktestpypi.blob.core.windows.net/wheels/sdk-cli-v2-public/ml-2.8.0-py3-none-any.whl --yes +az extension add --source https://azuremlsdktestpypi.blob.core.windows.net/wheels/sdk-cli-v2-public/ml-2.9.0-py3-none-any.whl --yes # GROUP="azureml-examples" diff --git a/sdk/python/assets/component/component.ipynb b/sdk/python/assets/component/component.ipynb index 01ea8aa1e36..bba6300aade 100644 --- a/sdk/python/assets/component/component.ipynb +++ b/sdk/python/assets/component/component.ipynb @@ -115,7 +115,7 @@ "outputs": [], "source": [ "parent_dir = \".\"\n", - "train = load_component(path=parent_dir + \"/train.yml\")\n", + "train = load_component(source=parent_dir + \"/train.yml\")\n", "print(train)" ] }, diff --git a/sdk/python/assets/data/working_with_mltable.ipynb b/sdk/python/assets/data/working_with_mltable.ipynb index e5be873476a..de1fac68c9d 100644 --- a/sdk/python/assets/data/working_with_mltable.ipynb +++ b/sdk/python/assets/data/working_with_mltable.ipynb @@ -40,9 +40,9 @@ "from azure.identity import DefaultAzureCredential\n", "\n", "# enter details of your AML workspace\n", - "subscription_id = \"\"\n", - "resource_group = \"\"\n", - "workspace = \"\"\n", + "subscription_id = \"\"\n", + "resource_group = \"\"\n", + "workspace = \"\"\n", "\n", "# get a handle to the workspace\n", "ml_client = MLClient(\n", diff --git a/sdk/python/endpoints/batch/mnist-nonmlflow.ipynb b/sdk/python/endpoints/batch/mnist-nonmlflow.ipynb index 30ff89802e8..8285bd035b7 100644 --- a/sdk/python/endpoints/batch/mnist-nonmlflow.ipynb +++ b/sdk/python/endpoints/batch/mnist-nonmlflow.ipynb @@ -155,7 +155,7 @@ "metadata": {}, "outputs": [], "source": [ - "ml_client.begin_create_or_update(endpoint)" + "ml_client.begin_create_or_update(endpoint).result()" ] }, { @@ -234,7 +234,7 @@ "metadata": {}, "outputs": [], "source": [ - "ml_client.begin_create_or_update(deployment)" + "ml_client.begin_create_or_update(deployment).result()" ] }, { diff --git a/sdk/python/endpoints/online/kubernetes/kubernetes-online-endpoints-safe-rollout.ipynb b/sdk/python/endpoints/online/kubernetes/kubernetes-online-endpoints-safe-rollout.ipynb index abe9e332327..1eafe810c34 100644 --- a/sdk/python/endpoints/online/kubernetes/kubernetes-online-endpoints-safe-rollout.ipynb +++ b/sdk/python/endpoints/online/kubernetes/kubernetes-online-endpoints-safe-rollout.ipynb @@ -139,9 +139,9 @@ " \"resource_id\": \"/subscriptions//resourceGroups//providers/Microsoft.ContainerService/managedClusters/\"\n", " },\n", "]\n", - "k8s_compute = load_compute(path=None, params_override=compute_params)\n", + "k8s_compute = load_compute(source=None, params_override=compute_params)\n", "\n", - "ml_client.begin_create_or_update(k8s_compute)" + "ml_client.begin_create_or_update(k8s_compute).result()" ] }, { @@ -204,7 +204,7 @@ "metadata": {}, "outputs": [], "source": [ - "ml_client.begin_create_or_update(endpoint)" + "ml_client.begin_create_or_update(endpoint).result()" ] }, { @@ -273,7 +273,7 @@ "metadata": {}, "outputs": [], "source": [ - "ml_client.begin_create_or_update(blue_deployment)" + "ml_client.begin_create_or_update(blue_deployment).result()" ] }, { @@ -284,7 +284,7 @@ "source": [ "# blue deployment takes 100 traffic\n", "endpoint.traffic = {\"blue\": 100}\n", - "ml_client.begin_create_or_update(endpoint)" + "ml_client.begin_create_or_update(endpoint).result()" ] }, { @@ -338,7 +338,7 @@ "blue_deployment.instance_count = 2\n", "\n", "#!!!bug https://msdata.visualstudio.com/Vienna/_workitems/edit/1740434\n", - "ml_client.online_deployments.begin_create_or_update(blue_deployment)" + "ml_client.online_deployments.begin_create_or_update(blue_deployment).result()" ] }, { @@ -404,7 +404,7 @@ "outputs": [], "source": [ "# use MLClient to create green deployment\n", - "ml_client.begin_create_or_update(green_deployment)" + "ml_client.begin_create_or_update(green_deployment).result()" ] }, { @@ -443,7 +443,7 @@ "outputs": [], "source": [ "endpoint.traffic = {\"blue\": 90, \"green\": 10}\n", - "ml_client.begin_create_or_update(endpoint)" + "ml_client.begin_create_or_update(endpoint).result()" ] }, { @@ -468,7 +468,7 @@ "outputs": [], "source": [ "endpoint.traffic = {\"blue\": 0, \"green\": 100}\n", - "ml_client.begin_create_or_update(endpoint)" + "ml_client.begin_create_or_update(endpoint).result()" ] }, { diff --git a/sdk/python/endpoints/online/kubernetes/kubernetes-online-endpoints-simple-deployment.ipynb b/sdk/python/endpoints/online/kubernetes/kubernetes-online-endpoints-simple-deployment.ipynb index 4da5b2a044b..51115e2b8b1 100644 --- a/sdk/python/endpoints/online/kubernetes/kubernetes-online-endpoints-simple-deployment.ipynb +++ b/sdk/python/endpoints/online/kubernetes/kubernetes-online-endpoints-simple-deployment.ipynb @@ -301,10 +301,10 @@ " \"resource_id\": \"/subscriptions//resourceGroups//providers/Microsoft.ContainerService/managedClusters/\"\n", " },\n", "]\n", - "k8s_compute = load_compute(path=None, params_override=compute_params)\n", + "k8s_compute = load_compute(source=None, params_override=compute_params)\n", "\n", "# !!!bug https://msdata.visualstudio.com/Vienna/_workitems/edit/1740311\n", - "ml_client.begin_create_or_update(k8s_compute)" + "ml_client.begin_create_or_update(k8s_compute).result()" ] }, { @@ -358,7 +358,7 @@ "metadata": {}, "outputs": [], "source": [ - "ml_client.begin_create_or_update(endpoint)" + "ml_client.begin_create_or_update(endpoint).result()" ] }, { @@ -409,7 +409,7 @@ "metadata": {}, "outputs": [], "source": [ - "ml_client.begin_create_or_update(blue_deployment)" + "ml_client.begin_create_or_update(blue_deployment).result()" ] }, { @@ -420,7 +420,7 @@ "source": [ "# blue deployment takes 100 traffic\n", "endpoint.traffic = {\"blue\": 100}\n", - "ml_client.begin_create_or_update(endpoint)" + "ml_client.begin_create_or_update(endpoint).result()" ] }, { diff --git a/sdk/python/endpoints/online/managed/managed-identities/online-endpoints-managed-identity-sai.ipynb b/sdk/python/endpoints/online/managed/managed-identities/online-endpoints-managed-identity-sai.ipynb index e413616d424..b8b90b9b30d 100644 --- a/sdk/python/endpoints/online/managed/managed-identities/online-endpoints-managed-identity-sai.ipynb +++ b/sdk/python/endpoints/online/managed/managed-identities/online-endpoints-managed-identity-sai.ipynb @@ -341,7 +341,7 @@ }, "outputs": [], "source": [ - "ml_client.online_endpoints.begin_create_or_update(endpoint)" + "ml_client.online_endpoints.begin_create_or_update(endpoint).result()" ] }, { @@ -494,7 +494,7 @@ }, "outputs": [], "source": [ - "ml_client.online_deployments.begin_create_or_update(deployment)" + "ml_client.online_deployments.begin_create_or_update(deployment).result()" ] }, { @@ -552,7 +552,7 @@ "outputs": [], "source": [ "endpoint.traffic = {str(deployment.name): 100}\n", - "ml_client.begin_create_or_update(endpoint)" + "ml_client.begin_create_or_update(endpoint).result()" ] }, { diff --git a/sdk/python/endpoints/online/managed/managed-identities/online-endpoints-managed-identity-uai.ipynb b/sdk/python/endpoints/online/managed/managed-identities/online-endpoints-managed-identity-uai.ipynb index 1f5ce7b889a..ad54a9f30f1 100644 --- a/sdk/python/endpoints/online/managed/managed-identities/online-endpoints-managed-identity-uai.ipynb +++ b/sdk/python/endpoints/online/managed/managed-identities/online-endpoints-managed-identity-uai.ipynb @@ -417,7 +417,7 @@ " ),\n", ")\n", "\n", - "ml_client.online_endpoints.begin_create_or_update(endpoint)" + "ml_client.online_endpoints.begin_create_or_update(endpoint).result()" ] }, { @@ -674,7 +674,7 @@ }, "outputs": [], "source": [ - "ml_client.online_deployments.begin_create_or_update(deployment)" + "ml_client.online_deployments.begin_create_or_update(deployment).result()" ] }, { @@ -730,7 +730,7 @@ "outputs": [], "source": [ "endpoint.traffic = {str(deployment.name): 100}\n", - "ml_client.begin_create_or_update(endpoint)" + "ml_client.begin_create_or_update(endpoint).result()" ] }, { diff --git a/sdk/python/endpoints/online/managed/online-endpoints-safe-rollout.ipynb b/sdk/python/endpoints/online/managed/online-endpoints-safe-rollout.ipynb index 15357718290..b836f5cb117 100644 --- a/sdk/python/endpoints/online/managed/online-endpoints-safe-rollout.ipynb +++ b/sdk/python/endpoints/online/managed/online-endpoints-safe-rollout.ipynb @@ -241,7 +241,7 @@ "source": [ "# blue deployment takes 100 traffic\n", "endpoint.traffic = {\"blue\": 100}\n", - "ml_client.begin_create_or_update(endpoint)" + "ml_client.begin_create_or_update(endpoint).result()" ] }, { diff --git a/sdk/python/jobs/automl-standalone-jobs/automl-classification-task-bankmarketing/automl-classification-task-bankmarketing-mlflow.ipynb b/sdk/python/jobs/automl-standalone-jobs/automl-classification-task-bankmarketing/automl-classification-task-bankmarketing-mlflow.ipynb index 85927478d2e..6120ba4dc3b 100644 --- a/sdk/python/jobs/automl-standalone-jobs/automl-classification-task-bankmarketing/automl-classification-task-bankmarketing-mlflow.ipynb +++ b/sdk/python/jobs/automl-standalone-jobs/automl-classification-task-bankmarketing/automl-classification-task-bankmarketing-mlflow.ipynb @@ -588,7 +588,7 @@ "metadata": {}, "outputs": [], "source": [ - "ml_client.begin_create_or_update(endpoint)" + "ml_client.begin_create_or_update(endpoint).result()" ] }, { @@ -695,7 +695,7 @@ "metadata": {}, "outputs": [], "source": [ - "ml_client.online_deployments.begin_create_or_update(deployment)" + "ml_client.online_deployments.begin_create_or_update(deployment).result()" ] }, { @@ -708,7 +708,7 @@ "source": [ "# bankmarketing deployment to take 100% traffic\n", "endpoint.traffic = {\"bankmarketing-deploy\": 100}\n", - "ml_client.begin_create_or_update(endpoint)" + "ml_client.begin_create_or_update(endpoint).result()" ] }, { diff --git a/sdk/python/jobs/automl-standalone-jobs/automl-image-classification-multiclass-task-fridge-items/automl-image-classification-multiclass-task-fridge-items.ipynb b/sdk/python/jobs/automl-standalone-jobs/automl-image-classification-multiclass-task-fridge-items/automl-image-classification-multiclass-task-fridge-items.ipynb index 485b46353cc..3a278ffae96 100644 --- a/sdk/python/jobs/automl-standalone-jobs/automl-image-classification-multiclass-task-fridge-items/automl-image-classification-multiclass-task-fridge-items.ipynb +++ b/sdk/python/jobs/automl-standalone-jobs/automl-image-classification-multiclass-task-fridge-items/automl-image-classification-multiclass-task-fridge-items.ipynb @@ -375,7 +375,7 @@ " min_instances=0,\n", " max_instances=4,\n", " )\n", - " ml_client.begin_create_or_update(compute_config)" + " ml_client.begin_create_or_update(compute_config).result()" ] }, { @@ -882,7 +882,7 @@ "metadata": {}, "outputs": [], "source": [ - "ml_client.begin_create_or_update(endpoint)" + "ml_client.begin_create_or_update(endpoint).result()" ] }, { @@ -975,7 +975,7 @@ "metadata": {}, "outputs": [], "source": [ - "ml_client.online_deployments.begin_create_or_update(deployment)" + "ml_client.online_deployments.begin_create_or_update(deployment).result()" ] }, { @@ -986,7 +986,7 @@ "source": [ "# ic mc fridge items deployment to take 100% traffic\n", "endpoint.traffic = {\"ic-mc-fridge-items-mlflow-deploy\": 100}\n", - "ml_client.begin_create_or_update(endpoint)" + "ml_client.begin_create_or_update(endpoint).result()" ] }, { diff --git a/sdk/python/jobs/automl-standalone-jobs/automl-image-classification-multilabel-task-fridge-items/automl-image-classification-multilabel-task-fridge-items.ipynb b/sdk/python/jobs/automl-standalone-jobs/automl-image-classification-multilabel-task-fridge-items/automl-image-classification-multilabel-task-fridge-items.ipynb index 5862f9d7cae..d05786811d4 100644 --- a/sdk/python/jobs/automl-standalone-jobs/automl-image-classification-multilabel-task-fridge-items/automl-image-classification-multilabel-task-fridge-items.ipynb +++ b/sdk/python/jobs/automl-standalone-jobs/automl-image-classification-multilabel-task-fridge-items/automl-image-classification-multilabel-task-fridge-items.ipynb @@ -364,7 +364,7 @@ " min_instances=0,\n", " max_instances=4,\n", " )\n", - " ml_client.begin_create_or_update(compute_config)" + " ml_client.begin_create_or_update(compute_config).result()" ] }, { @@ -867,7 +867,7 @@ "metadata": {}, "outputs": [], "source": [ - "ml_client.begin_create_or_update(endpoint)" + "ml_client.begin_create_or_update(endpoint).result()" ] }, { @@ -960,7 +960,7 @@ "metadata": {}, "outputs": [], "source": [ - "ml_client.online_deployments.begin_create_or_update(deployment)" + "ml_client.online_deployments.begin_create_or_update(deployment).result()" ] }, { @@ -971,7 +971,7 @@ "source": [ "# ic ml fridge items deployment to take 100% traffic\n", "endpoint.traffic = {\"ic-ml-fridge-items-mlflow-dpl\": 100}\n", - "ml_client.begin_create_or_update(endpoint)" + "ml_client.begin_create_or_update(endpoint).result()" ] }, { diff --git a/sdk/python/jobs/automl-standalone-jobs/automl-image-instance-segmentation-task-fridge-items/automl-image-instance-segmentation-task-fridge-items.ipynb b/sdk/python/jobs/automl-standalone-jobs/automl-image-instance-segmentation-task-fridge-items/automl-image-instance-segmentation-task-fridge-items.ipynb index e186152a36a..28aa7898129 100644 --- a/sdk/python/jobs/automl-standalone-jobs/automl-image-instance-segmentation-task-fridge-items/automl-image-instance-segmentation-task-fridge-items.ipynb +++ b/sdk/python/jobs/automl-standalone-jobs/automl-image-instance-segmentation-task-fridge-items/automl-image-instance-segmentation-task-fridge-items.ipynb @@ -333,7 +333,7 @@ " min_instances=0,\n", " max_instances=4,\n", " )\n", - " ml_client.begin_create_or_update(compute_config)" + " ml_client.begin_create_or_update(compute_config).result()" ] }, { @@ -842,7 +842,7 @@ }, "outputs": [], "source": [ - "ml_client.begin_create_or_update(endpoint)" + "ml_client.begin_create_or_update(endpoint).result()" ] }, { @@ -929,7 +929,7 @@ "metadata": {}, "outputs": [], "source": [ - "ml_client.online_deployments.begin_create_or_update(deployment)" + "ml_client.online_deployments.begin_create_or_update(deployment).result()" ] }, { @@ -940,7 +940,7 @@ "source": [ "# is fridge items deployment to take 100% traffic\n", "endpoint.traffic = {\"is-fridge-items-mlflow-dpl\": 100}\n", - "ml_client.begin_create_or_update(endpoint)" + "ml_client.begin_create_or_update(endpoint).result()" ] }, { diff --git a/sdk/python/jobs/automl-standalone-jobs/automl-image-object-detection-task-fridge-items-batch-scoring/image-object-detection-batch-scoring-non-mlflow-model.ipynb b/sdk/python/jobs/automl-standalone-jobs/automl-image-object-detection-task-fridge-items-batch-scoring/image-object-detection-batch-scoring-non-mlflow-model.ipynb index 5b9a808e15d..26efc1f89f7 100644 --- a/sdk/python/jobs/automl-standalone-jobs/automl-image-object-detection-task-fridge-items-batch-scoring/image-object-detection-batch-scoring-non-mlflow-model.ipynb +++ b/sdk/python/jobs/automl-standalone-jobs/automl-image-object-detection-task-fridge-items-batch-scoring/image-object-detection-batch-scoring-non-mlflow-model.ipynb @@ -404,7 +404,7 @@ " min_instances=0,\n", " max_instances=4,\n", " )\n", - " ml_client.begin_create_or_update(compute_config)" + " ml_client.begin_create_or_update(compute_config).result()" ] }, { @@ -834,7 +834,7 @@ "metadata": {}, "outputs": [], "source": [ - "ml_client.begin_create_or_update(endpoint)" + "ml_client.begin_create_or_update(endpoint).result()" ] }, { @@ -871,7 +871,7 @@ " min_instances=0,\n", " max_instances=5,\n", " )\n", - " ml_client.begin_create_or_update(compute_config)" + " ml_client.begin_create_or_update(compute_config).result()" ] }, { @@ -949,7 +949,7 @@ "metadata": {}, "outputs": [], "source": [ - "ml_client.begin_create_or_update(deployment)" + "ml_client.begin_create_or_update(deployment).result()" ] }, { diff --git a/sdk/python/jobs/automl-standalone-jobs/automl-image-object-detection-task-fridge-items/automl-image-object-detection-task-fridge-items.ipynb b/sdk/python/jobs/automl-standalone-jobs/automl-image-object-detection-task-fridge-items/automl-image-object-detection-task-fridge-items.ipynb index 50789a2cfdd..d481c951df2 100644 --- a/sdk/python/jobs/automl-standalone-jobs/automl-image-object-detection-task-fridge-items/automl-image-object-detection-task-fridge-items.ipynb +++ b/sdk/python/jobs/automl-standalone-jobs/automl-image-object-detection-task-fridge-items/automl-image-object-detection-task-fridge-items.ipynb @@ -431,7 +431,7 @@ " min_instances=0,\n", " max_instances=4,\n", " )\n", - " ml_client.begin_create_or_update(compute_config)" + " ml_client.begin_create_or_update(compute_config).result()" ] }, { @@ -1000,7 +1000,7 @@ }, "outputs": [], "source": [ - "ml_client.begin_create_or_update(endpoint)" + "ml_client.begin_create_or_update(endpoint).result()" ] }, { @@ -1099,7 +1099,7 @@ }, "outputs": [], "source": [ - "ml_client.online_deployments.begin_create_or_update(deployment)" + "ml_client.online_deployments.begin_create_or_update(deployment).result()" ] }, { @@ -1112,7 +1112,7 @@ "source": [ "# od fridge items deployment to take 100% traffic\n", "endpoint.traffic = {\"od-fridge-items-mlflow-deploy\": 100}\n", - "ml_client.begin_create_or_update(endpoint)" + "ml_client.begin_create_or_update(endpoint).result()" ] }, { diff --git a/sdk/python/jobs/configuration.ipynb b/sdk/python/jobs/configuration.ipynb index ece4a0d1fe3..5791d392507 100644 --- a/sdk/python/jobs/configuration.ipynb +++ b/sdk/python/jobs/configuration.ipynb @@ -152,7 +152,7 @@ " compute = AmlCompute(\n", " name=cpu_compute_target, size=\"STANDARD_D2_V2\", min_instances=0, max_instances=4\n", " )\n", - " ml_client.compute.begin_create_or_update(compute)" + " ml_client.compute.begin_create_or_update(compute).result()" ] }, { @@ -175,7 +175,7 @@ " compute = AmlCompute(\n", " name=gpu_compute_target, size=\"STANDARD_NC6\", min_instances=0, max_instances=4\n", " )\n", - " ml_client.compute.begin_create_or_update(compute)" + " ml_client.compute.begin_create_or_update(compute).result()" ] }, { diff --git a/sdk/python/jobs/pipelines/1a_pipeline_with_components_from_yaml/pipeline_with_components_from_yaml.ipynb b/sdk/python/jobs/pipelines/1a_pipeline_with_components_from_yaml/pipeline_with_components_from_yaml.ipynb index 33f0fca9cd0..420f910bce2 100644 --- a/sdk/python/jobs/pipelines/1a_pipeline_with_components_from_yaml/pipeline_with_components_from_yaml.ipynb +++ b/sdk/python/jobs/pipelines/1a_pipeline_with_components_from_yaml/pipeline_with_components_from_yaml.ipynb @@ -116,9 +116,9 @@ "outputs": [], "source": [ "parent_dir = \".\"\n", - "train_model = load_component(path=parent_dir + \"/train_model.yml\")\n", - "score_data = load_component(path=parent_dir + \"/score_data.yml\")\n", - "eval_model = load_component(path=parent_dir + \"/eval_model.yml\")" + "train_model = load_component(source=parent_dir + \"/train_model.yml\")\n", + "score_data = load_component(source=parent_dir + \"/score_data.yml\")\n", + "eval_model = load_component(source=parent_dir + \"/eval_model.yml\")" ] }, { diff --git a/sdk/python/jobs/pipelines/1c_pipeline_with_hyperparameter_sweep/pipeline_with_hyperparameter_sweep.ipynb b/sdk/python/jobs/pipelines/1c_pipeline_with_hyperparameter_sweep/pipeline_with_hyperparameter_sweep.ipynb index b478c0efbe2..e30c2b3528a 100644 --- a/sdk/python/jobs/pipelines/1c_pipeline_with_hyperparameter_sweep/pipeline_with_hyperparameter_sweep.ipynb +++ b/sdk/python/jobs/pipelines/1c_pipeline_with_hyperparameter_sweep/pipeline_with_hyperparameter_sweep.ipynb @@ -128,8 +128,8 @@ }, "outputs": [], "source": [ - "train_component_func = load_component(path=\"./train.yml\")\n", - "score_component_func = load_component(path=\"./predict.yml\")\n", + "train_component_func = load_component(source=\"./train.yml\")\n", + "score_component_func = load_component(source=\"./predict.yml\")\n", "\n", "# define a pipeline\n", "@pipeline()\n", diff --git a/sdk/python/jobs/pipelines/1e_pipeline_with_registered_components/pipeline_with_registered_components.ipynb b/sdk/python/jobs/pipelines/1e_pipeline_with_registered_components/pipeline_with_registered_components.ipynb index 7ed3e42cc21..c43a901f6a2 100644 --- a/sdk/python/jobs/pipelines/1e_pipeline_with_registered_components/pipeline_with_registered_components.ipynb +++ b/sdk/python/jobs/pipelines/1e_pipeline_with_registered_components/pipeline_with_registered_components.ipynb @@ -112,8 +112,8 @@ "outputs": [], "source": [ "parent_dir = \".\"\n", - "train_model = load_component(path=parent_dir + \"/train_model.yml\")\n", - "score_data = load_component(path=parent_dir + \"/score_data.yml\")\n", + "train_model = load_component(source=parent_dir + \"/train_model.yml\")\n", + "score_data = load_component(source=parent_dir + \"/score_data.yml\")\n", "# print the component as yaml\n", "print(score_data)" ] diff --git a/sdk/python/jobs/pipelines/1g_pipeline_with_parallel_nodes/pipeline_with_parallel_nodes.ipynb b/sdk/python/jobs/pipelines/1g_pipeline_with_parallel_nodes/pipeline_with_parallel_nodes.ipynb index f9c8ecbc321..4905de44ecd 100644 --- a/sdk/python/jobs/pipelines/1g_pipeline_with_parallel_nodes/pipeline_with_parallel_nodes.ipynb +++ b/sdk/python/jobs/pipelines/1g_pipeline_with_parallel_nodes/pipeline_with_parallel_nodes.ipynb @@ -127,7 +127,7 @@ "outputs": [], "source": [ "# load component\n", - "prepare_data = load_component(path=\"./src/prepare_data.yml\")" + "prepare_data = load_component(source=\"./src/prepare_data.yml\")" ] }, { diff --git a/sdk/python/jobs/pipelines/1i_pipeline_with_spark_nodes/pipeline_with_spark_nodes.ipynb b/sdk/python/jobs/pipelines/1i_pipeline_with_spark_nodes/pipeline_with_spark_nodes.ipynb index 21064e17103..79803fcaa5a 100644 --- a/sdk/python/jobs/pipelines/1i_pipeline_with_spark_nodes/pipeline_with_spark_nodes.ipynb +++ b/sdk/python/jobs/pipelines/1i_pipeline_with_spark_nodes/pipeline_with_spark_nodes.ipynb @@ -134,7 +134,7 @@ "source": [ "# load component\n", "parent_dir = \".\"\n", - "spark_kmeans = load_component(path=parent_dir + \"/components/spark_kmeans.yml\")\n", + "spark_kmeans = load_component(source=parent_dir + \"/components/spark_kmeans.yml\")\n", "\n", "show_output_component = command(\n", " inputs=dict(spark_output=Input(type=AssetTypes.URI_FOLDER)),\n", diff --git a/sdk/python/jobs/pipelines/2b_train_cifar_10_with_pytorch/train_cifar_10_with_pytorch.ipynb b/sdk/python/jobs/pipelines/2b_train_cifar_10_with_pytorch/train_cifar_10_with_pytorch.ipynb index 5d942b825cf..cc68cd3c798 100644 --- a/sdk/python/jobs/pipelines/2b_train_cifar_10_with_pytorch/train_cifar_10_with_pytorch.ipynb +++ b/sdk/python/jobs/pipelines/2b_train_cifar_10_with_pytorch/train_cifar_10_with_pytorch.ipynb @@ -111,9 +111,9 @@ "outputs": [], "source": [ "parent_dir = \".\"\n", - "get_data_func = load_component(path=parent_dir + \"/get-data.yml\")\n", - "train_model_func = load_component(path=parent_dir + \"/train-model.yml\")\n", - "eval_model_func = load_component(path=parent_dir + \"/eval-model.yml\")" + "get_data_func = load_component(source=parent_dir + \"/get-data.yml\")\n", + "train_model_func = load_component(source=parent_dir + \"/train-model.yml\")\n", + "eval_model_func = load_component(source=parent_dir + \"/eval-model.yml\")" ] }, { diff --git a/sdk/python/jobs/pipelines/2c_nyc_taxi_data_regression/nyc_taxi_data_regression.ipynb b/sdk/python/jobs/pipelines/2c_nyc_taxi_data_regression/nyc_taxi_data_regression.ipynb index fd562aecac0..6720e82ff5a 100644 --- a/sdk/python/jobs/pipelines/2c_nyc_taxi_data_regression/nyc_taxi_data_regression.ipynb +++ b/sdk/python/jobs/pipelines/2c_nyc_taxi_data_regression/nyc_taxi_data_regression.ipynb @@ -112,11 +112,11 @@ "parent_dir = \"\"\n", "\n", "# 1. Load components\n", - "prepare_data = load_component(path=parent_dir + \"./prep.yml\")\n", - "transform_data = load_component(path=parent_dir + \"./transform.yml\")\n", - "train_model = load_component(path=parent_dir + \"./train.yml\")\n", - "predict_result = load_component(path=parent_dir + \"./predict.yml\")\n", - "score_data = load_component(path=parent_dir + \"./score.yml\")\n", + "prepare_data = load_component(source=parent_dir + \"./prep.yml\")\n", + "transform_data = load_component(source=parent_dir + \"./transform.yml\")\n", + "train_model = load_component(source=parent_dir + \"./train.yml\")\n", + "predict_result = load_component(source=parent_dir + \"./predict.yml\")\n", + "score_data = load_component(source=parent_dir + \"./score.yml\")\n", "\n", "# 2. Construct pipeline\n", "@pipeline()\n", diff --git a/sdk/python/jobs/pipelines/2d_image_classification_with_densenet/image_classification_with_densenet.ipynb b/sdk/python/jobs/pipelines/2d_image_classification_with_densenet/image_classification_with_densenet.ipynb index 681189b41e1..d09a5190d41 100644 --- a/sdk/python/jobs/pipelines/2d_image_classification_with_densenet/image_classification_with_densenet.ipynb +++ b/sdk/python/jobs/pipelines/2d_image_classification_with_densenet/image_classification_with_densenet.ipynb @@ -136,17 +136,17 @@ "outputs": [], "source": [ "apply_transform = load_component(\n", - " path=\"./apply_image_transformation/apply_image_transformation.yaml\"\n", + " source=\"./apply_image_transformation/apply_image_transformation.yaml\"\n", ")\n", "convert = load_component(\n", - " path=\"./convert_to_image_directory/convert_to_image_directory.yaml\"\n", + " source=\"./convert_to_image_directory/convert_to_image_directory.yaml\"\n", ")\n", "init_transform = load_component(\n", - " path=\"./init_image_transformation/init_image_transformation.yaml\"\n", + " source=\"./init_image_transformation/init_image_transformation.yaml\"\n", ")\n", "\n", "# this train component is an mpi component.\n", - "imagecnn_train = load_component(path=\"./imagecnn_train/entry.spec.yaml\")" + "imagecnn_train = load_component(source=\"./imagecnn_train/entry.spec.yaml\")" ] }, { diff --git a/sdk/python/jobs/pipelines/2e_image_classification_keras_minist_convnet/image_classification_keras_minist_convnet.ipynb b/sdk/python/jobs/pipelines/2e_image_classification_keras_minist_convnet/image_classification_keras_minist_convnet.ipynb index 1a98754bf46..f80c790edd3 100644 --- a/sdk/python/jobs/pipelines/2e_image_classification_keras_minist_convnet/image_classification_keras_minist_convnet.ipynb +++ b/sdk/python/jobs/pipelines/2e_image_classification_keras_minist_convnet/image_classification_keras_minist_convnet.ipynb @@ -214,7 +214,7 @@ "outputs": [], "source": [ "# load component function from yaml\n", - "keras_score_component = load_component(path=\"./score/score.yaml\")" + "keras_score_component = load_component(source=\"./score/score.yaml\")" ] }, { diff --git a/sdk/python/jobs/pipelines/2f_rai_pipeline_sample/rai_pipeline_sample.ipynb b/sdk/python/jobs/pipelines/2f_rai_pipeline_sample/rai_pipeline_sample.ipynb index ead58df62d8..19659c13769 100644 --- a/sdk/python/jobs/pipelines/2f_rai_pipeline_sample/rai_pipeline_sample.ipynb +++ b/sdk/python/jobs/pipelines/2f_rai_pipeline_sample/rai_pipeline_sample.ipynb @@ -196,28 +196,28 @@ "rai_components_path = f\"{rai_cli_example_path}/components\"\n", "\n", "train_log_reg_component = load_component(\n", - " path=f\"{rai_components_path}/component_train_logreg.yaml\"\n", + " source=f\"{rai_components_path}/component_train_logreg.yaml\"\n", ")\n", "register_model_component = load_component(\n", - " path=f\"{rai_components_path}/component_register_model.yaml\"\n", + " source=f\"{rai_components_path}/component_register_model.yaml\"\n", ")\n", "rai_constructor_component = load_component(\n", - " path=f\"{rai_components_path}/component_rai_insights.yaml\"\n", + " source=f\"{rai_components_path}/component_rai_insights.yaml\"\n", ")\n", "rai_explanation_component = load_component(\n", - " path=f\"{rai_components_path}/component_explain.yaml\"\n", + " source=f\"{rai_components_path}/component_explain.yaml\"\n", ")\n", "rai_causal_component = load_component(\n", - " path=f\"{rai_components_path}/component_causal.yaml\"\n", + " source=f\"{rai_components_path}/component_causal.yaml\"\n", ")\n", "rai_counterfactual_component = load_component(\n", - " path=f\"{rai_components_path}/component_counterfactual.yaml\"\n", + " source=f\"{rai_components_path}/component_counterfactual.yaml\"\n", ")\n", "rai_erroranalysis_component = load_component(\n", - " path=f\"{rai_components_path}/component_error_analysis.yaml\"\n", + " source=f\"{rai_components_path}/component_error_analysis.yaml\"\n", ")\n", "rai_gather_component = load_component(\n", - " path=f\"{rai_components_path}/component_gather_rai_insights.yaml\"\n", + " source=f\"{rai_components_path}/component_gather_rai_insights.yaml\"\n", ")" ] }, diff --git a/sdk/python/jobs/single-step/pytorch/train-hyperparameter-tune-deploy-with-pytorch/train-hyperparameter-tune-deploy-with-pytorch.ipynb b/sdk/python/jobs/single-step/pytorch/train-hyperparameter-tune-deploy-with-pytorch/train-hyperparameter-tune-deploy-with-pytorch.ipynb index 723fd9f3424..65e722ad12b 100644 --- a/sdk/python/jobs/single-step/pytorch/train-hyperparameter-tune-deploy-with-pytorch/train-hyperparameter-tune-deploy-with-pytorch.ipynb +++ b/sdk/python/jobs/single-step/pytorch/train-hyperparameter-tune-deploy-with-pytorch/train-hyperparameter-tune-deploy-with-pytorch.ipynb @@ -171,7 +171,7 @@ " )\n", "\n", " # Now, we pass the object to MLClient's create_or_update method\n", - " gpu_cluster = ml_client.begin_create_or_update(gpu_cluster)\n", + " gpu_cluster = ml_client.begin_create_or_update(gpu_cluster).result()\n", "\n", "print(\n", " f\"AMLCompute with name {gpu_cluster.name} is created, the compute size is {gpu_cluster.size}\"\n", diff --git a/sdk/python/jobs/single-step/scikit-learn/train-hyperparameter-tune-deploy-with-sklearn/train-hyperparameter-tune-with-sklearn.ipynb b/sdk/python/jobs/single-step/scikit-learn/train-hyperparameter-tune-deploy-with-sklearn/train-hyperparameter-tune-with-sklearn.ipynb index 20db26b493b..390df898eb2 100644 --- a/sdk/python/jobs/single-step/scikit-learn/train-hyperparameter-tune-deploy-with-sklearn/train-hyperparameter-tune-with-sklearn.ipynb +++ b/sdk/python/jobs/single-step/scikit-learn/train-hyperparameter-tune-deploy-with-sklearn/train-hyperparameter-tune-with-sklearn.ipynb @@ -168,7 +168,7 @@ " )\n", "\n", " # Now, we pass the object to MLClient's create_or_update method\n", - " cpu_cluster = ml_client.compute.begin_create_or_update(cpu_cluster)\n", + " cpu_cluster = ml_client.compute.begin_create_or_update(cpu_cluster).result()\n", "\n", "print(\n", " f\"AMLCompute with name {cpu_cluster.name} is created, the compute size is {cpu_cluster.size}\"\n", diff --git a/sdk/python/jobs/single-step/tensorflow/train-hyperparameter-tune-deploy-with-keras/train-hyperparameter-tune-deploy-with-keras.ipynb b/sdk/python/jobs/single-step/tensorflow/train-hyperparameter-tune-deploy-with-keras/train-hyperparameter-tune-deploy-with-keras.ipynb index 69c8f5a2174..b412b76b128 100644 --- a/sdk/python/jobs/single-step/tensorflow/train-hyperparameter-tune-deploy-with-keras/train-hyperparameter-tune-deploy-with-keras.ipynb +++ b/sdk/python/jobs/single-step/tensorflow/train-hyperparameter-tune-deploy-with-keras/train-hyperparameter-tune-deploy-with-keras.ipynb @@ -175,7 +175,7 @@ " )\n", "\n", " # Now, we pass the object to MLClient's create_or_update method\n", - " gpu_cluster = ml_client.begin_create_or_update(gpu_cluster)\n", + " gpu_cluster = ml_client.begin_create_or_update(gpu_cluster).result()\n", "\n", "print(\n", " f\"AMLCompute with name {gpu_cluster.name} is created, the compute size is {gpu_cluster.size}\"\n", @@ -610,7 +610,7 @@ " auth_mode=\"key\",\n", ")\n", "\n", - "endpoint = ml_client.begin_create_or_update(endpoint)\n", + "endpoint = ml_client.begin_create_or_update(endpoint).result()\n", "\n", "print(f\"Endpint {endpoint.name} provisioning state: {endpoint.provisioning_state}\")" ] @@ -675,7 +675,7 @@ " instance_count=1,\n", ")\n", "\n", - "blue_deployment = ml_client.begin_create_or_update(blue_deployment)" + "blue_deployment = ml_client.begin_create_or_update(blue_deployment).result()" ] }, { diff --git a/sdk/python/jobs/single-step/tensorflow/train-hyperparameter-tune-deploy-with-tensorflow/train-hyperparameter-tune-deploy-with-tensorflow.ipynb b/sdk/python/jobs/single-step/tensorflow/train-hyperparameter-tune-deploy-with-tensorflow/train-hyperparameter-tune-deploy-with-tensorflow.ipynb index e6b797082e5..36bda0615c3 100644 --- a/sdk/python/jobs/single-step/tensorflow/train-hyperparameter-tune-deploy-with-tensorflow/train-hyperparameter-tune-deploy-with-tensorflow.ipynb +++ b/sdk/python/jobs/single-step/tensorflow/train-hyperparameter-tune-deploy-with-tensorflow/train-hyperparameter-tune-deploy-with-tensorflow.ipynb @@ -172,7 +172,7 @@ " )\n", "\n", " # Now, we pass the object to MLClient's create_or_update method\n", - " gpu_cluster = ml_client.begin_create_or_update(gpu_cluster)\n", + " gpu_cluster = ml_client.begin_create_or_update(gpu_cluster).result()\n", "\n", "print(\n", " f\"AMLCompute with name {gpu_cluster.name} is created, the compute size is {gpu_cluster.size}\"\n", diff --git a/sdk/python/resources/compute/compute.ipynb b/sdk/python/resources/compute/compute.ipynb index 9d2964add13..284a10d3504 100644 --- a/sdk/python/resources/compute/compute.ipynb +++ b/sdk/python/resources/compute/compute.ipynb @@ -115,7 +115,7 @@ "ci_minimal_name = \"min-ci\" + datetime.datetime.now().strftime(\"%Y%m%d%H%M\")\n", "\n", "ci_minimal = ComputeInstance(name=ci_minimal_name)\n", - "ml_client.begin_create_or_update(ci_minimal)" + "ml_client.begin_create_or_update(ci_minimal).result()" ] }, { @@ -141,7 +141,7 @@ "\n", "ci_basic_name = \"basic-ci\" + datetime.datetime.now().strftime(\"%Y%m%d%H%M\")\n", "ci_basic = ComputeInstance(name=ci_basic_name, size=\"STANDARD_DS3_v2\")\n", - "ml_client.begin_create_or_update(ci_basic)" + "ml_client.begin_create_or_update(ci_basic).result()" ] }, { @@ -177,18 +177,7 @@ "from azure.ai.ml.entities import ComputeInstance, AmlCompute\n", "\n", "# Stop compute\n", - "ml_client.compute.begin_stop(ci_basic_name)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "import time\n", - "\n", - "time.sleep(120)" + "ml_client.compute.begin_stop(ci_basic_name).wait()" ] }, { @@ -202,16 +191,7 @@ "from azure.ai.ml.entities import ComputeInstance, AmlCompute\n", "\n", "# Start compute\n", - "ml_client.compute.begin_start(ci_basic_name)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "time.sleep(120)" + "ml_client.compute.begin_start(ci_basic_name).wait()" ] }, { @@ -225,7 +205,7 @@ "from azure.ai.ml.entities import ComputeInstance, AmlCompute\n", "\n", "# Restart compute\n", - "ml_client.compute.begin_restart(ci_basic_name)" + "ml_client.compute.begin_restart(ci_basic_name).wait()" ] }, { @@ -244,7 +224,7 @@ "source": [ "from azure.ai.ml.entities import ComputeInstance, AmlCompute\n", "\n", - "ml_client.compute.begin_delete(ci_minimal_name)" + "ml_client.compute.begin_delete(ci_minimal_name).wait()" ] }, { @@ -257,7 +237,7 @@ "source": [ "from azure.ai.ml.entities import ComputeInstance, AmlCompute\n", "\n", - "ml_client.compute.begin_delete(ci_basic_name)" + "ml_client.compute.begin_delete(ci_basic_name).wait()" ] }, { @@ -300,7 +280,7 @@ " max_instances=2,\n", " idle_time_before_scale_down=120,\n", ")\n", - "ml_client.begin_create_or_update(cluster_basic)" + "ml_client.begin_create_or_update(cluster_basic).result()" ] }, { @@ -329,7 +309,7 @@ " idle_time_before_scale_down=120,\n", " tier=\"low_priority\",\n", ")\n", - "ml_client.begin_create_or_update(cluster_low_pri)" + "ml_client.begin_create_or_update(cluster_low_pri).result()" ] } ], diff --git a/sdk/python/resources/workspace/workspace.ipynb b/sdk/python/resources/workspace/workspace.ipynb index 3b821381706..780041df81f 100644 --- a/sdk/python/resources/workspace/workspace.ipynb +++ b/sdk/python/resources/workspace/workspace.ipynb @@ -173,7 +173,7 @@ ")\n", "\n", "# uncomment this line after providing details of subscription, resource group and other details above\n", - "# ml_client.begin_create_or_update(ws_with_existing)" + "# ml_client.begin_create_or_update(ws_with_existing).result()" ] }, { diff --git a/sdk/python/schedules/job-schedule.ipynb b/sdk/python/schedules/job-schedule.ipynb index 4dcab71d79f..9263d2219dd 100644 --- a/sdk/python/schedules/job-schedule.ipynb +++ b/sdk/python/schedules/job-schedule.ipynb @@ -125,9 +125,9 @@ "outputs": [], "source": [ "parent_dir = \"../jobs/pipelines/1a_pipeline_with_components_from_yaml\"\n", - "train_model = load_component(path=parent_dir + \"/train_model.yml\")\n", - "score_data = load_component(path=parent_dir + \"/score_data.yml\")\n", - "eval_model = load_component(path=parent_dir + \"/eval_model.yml\")\n", + "train_model = load_component(source=parent_dir + \"/train_model.yml\")\n", + "score_data = load_component(source=parent_dir + \"/score_data.yml\")\n", + "eval_model = load_component(source=parent_dir + \"/eval_model.yml\")\n", "\n", "# Construct pipeline\n", "@pipeline()\n", @@ -260,7 +260,7 @@ }, "outputs": [], "source": [ - "job_schedule = ml_client.schedules.begin_create_or_update(schedule=job_schedule)\n", + "job_schedule = ml_client.schedules.begin_create_or_update(schedule=job_schedule).result()\n", "print(job_schedule)" ] }, @@ -279,7 +279,7 @@ }, "outputs": [], "source": [ - "job_schedule = ml_client.schedules.begin_disable(name=schedule_name)\n", + "job_schedule = ml_client.schedules.begin_disable(name=schedule_name).result()\n", "job_schedule.is_enabled" ] }, @@ -334,7 +334,7 @@ "metadata": {}, "outputs": [], "source": [ - "job_schedule = ml_client.schedules.begin_enable(name=schedule_name)\n", + "job_schedule = ml_client.schedules.begin_enable(name=schedule_name).result()\n", "job_schedule.is_enabled" ] }, @@ -355,7 +355,7 @@ "source": [ "# Update trigger expression\n", "job_schedule.trigger.expression = \"10 10 * * 1\"\n", - "job_schedule = ml_client.schedules.begin_create_or_update(schedule=job_schedule)\n", + "job_schedule = ml_client.schedules.begin_create_or_update(schedule=job_schedule).result()\n", "print(job_schedule)" ] }, @@ -375,8 +375,8 @@ "outputs": [], "source": [ "# Only disabled schedules can be deleted\n", - "ml_client.schedules.begin_disable(name=schedule_name)\n", - "ml_client.schedules.begin_delete(name=schedule_name)" + "ml_client.schedules.begin_disable(name=schedule_name).result()\n", + "ml_client.schedules.begin_delete(name=schedule_name).result()" ] } ], @@ -385,9 +385,9 @@ "description": "Create a component asset" }, "kernelspec": { - "display_name": "Python 3.10 - SDK V2", + "display_name": "Python 3.10.4 ('venv2')", "language": "python", - "name": "python310-sdkv2" + "name": "python3" }, "language_info": { "codemirror_mode": { @@ -399,11 +399,11 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.7.8" + "version": "3.10.4" }, "vscode": { "interpreter": { - "hash": "727b410030f20083a8dadbe78e3f0c3cba212580ac111eb7b243827f2188ccac" + "hash": "0d334cf3c07019271c164ebdcf351803825400d6a25940919e70ae20f27dcfe7" } } }, diff --git a/sdk/python/setup.sh b/sdk/python/setup.sh index c9ef55f97ab..0d0c8d3dbb8 100644 --- a/sdk/python/setup.sh +++ b/sdk/python/setup.sh @@ -16,7 +16,7 @@ pip install pandas # # pip install azure-ai-ml==0.1.0.b6 -pip install https://docsupport.blob.core.windows.net/ml-sample-submissions/1865587/azure_ai_ml-0.1.0b7-py3-none-any.whl +pip install https://docsupport.blob.core.windows.net/ml-sample-submissions/1902672/azure_ai_ml-0.1.0b8-py3-none-any.whl # pip list diff --git a/tutorials/e2e-ds-experience/e2e-ml-workflow.ipynb b/tutorials/e2e-ds-experience/e2e-ml-workflow.ipynb index bc98b314484..5a672aaddeb 100644 --- a/tutorials/e2e-ds-experience/e2e-ml-workflow.ipynb +++ b/tutorials/e2e-ds-experience/e2e-ml-workflow.ipynb @@ -812,7 +812,7 @@ "from azure.ai.ml import load_component\n", "\n", "# Loading the component from the yml file\n", - "train_component = load_component(path=os.path.join(train_src_dir, \"train.yml\"))" + "train_component = load_component(source=os.path.join(train_src_dir, \"train.yml\"))" ] }, {