From c6cc9d57a8b6ecd50249bbd27584a271c0a5e0e7 Mon Sep 17 00:00:00 2001 From: Lillian-Violet Date: Wed, 4 Sep 2024 12:31:15 +0200 Subject: [PATCH] Add pyc files to gitignore, compute_aml runs too now --- .gitignore | 1 + azuremlpythonsdk-v2/compute_aml.py | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..7e99e36 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +*.pyc \ No newline at end of file diff --git a/azuremlpythonsdk-v2/compute_aml.py b/azuremlpythonsdk-v2/compute_aml.py index 474b48c..f9ee7d8 100644 --- a/azuremlpythonsdk-v2/compute_aml.py +++ b/azuremlpythonsdk-v2/compute_aml.py @@ -29,9 +29,9 @@ def create_or_load_aml( ml_client = create_or_load_ml_client() try: # let's see if the compute target already exists - cpu_cluster = ml_client.compute.get(XXXXX) + cpu_cluster = ml_client.compute.get(cpu_compute_target) print( - f"You already have a cluster named {XXXXX},", + f"You already have a cluster named {cpu_compute_target},", "we'll reuse it.", ) except Exception: @@ -54,7 +54,7 @@ def create_or_load_aml( ) # Now, we pass the object to MLClient's create_or_update method - cpu_cluster = ml_client.compute.begin_create_or_update(XXXXX) + cpu_cluster = ml_client.compute.begin_create_or_update(cpu_compute_target) return cpu_cluster