From 79cd04d451162b6d20dfc0818af4a1453ec37e91 Mon Sep 17 00:00:00 2001 From: Tim Johnson <43890311+Inevitable-Marzipan@users.noreply.github.com> Date: Tue, 6 Apr 2021 14:32:17 +0100 Subject: [PATCH 1/4] Update manage_environment.py --- ml_service/util/manage_environment.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ml_service/util/manage_environment.py b/ml_service/util/manage_environment.py index 54c5a72f..16677729 100644 --- a/ml_service/util/manage_environment.py +++ b/ml_service/util/manage_environment.py @@ -1,5 +1,6 @@ import os +import traceback from azureml.core import Workspace, Environment from ml_service.util.env_variables import Env from azureml.core.runconfig import DEFAULT_CPU_IMAGE, DEFAULT_GPU_IMAGE @@ -36,5 +37,5 @@ def get_environment( print(restored_environment) return restored_environment except Exception as e: - print(e) + traceback.print_exc() exit(1) From 204f0253d4987a5fcc0add7c24191c8136199f66 Mon Sep 17 00:00:00 2001 From: Tim Johnson <43890311+Inevitable-Marzipan@users.noreply.github.com> Date: Tue, 6 Apr 2021 14:32:49 +0100 Subject: [PATCH 2/4] Update attach_compute.py --- ml_service/util/attach_compute.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ml_service/util/attach_compute.py b/ml_service/util/attach_compute.py index ad9668db..ed2018f9 100644 --- a/ml_service/util/attach_compute.py +++ b/ml_service/util/attach_compute.py @@ -1,4 +1,5 @@ +import traceback from azureml.core import Workspace from azureml.core.compute import AmlCompute from azureml.core.compute import ComputeTarget @@ -33,6 +34,6 @@ def get_compute(workspace: Workspace, compute_name: str, vm_size: str, for_batch ) return compute_target except ComputeTargetException as ex: - print(ex) + traceback.print_exc() print("An error occurred trying to provision compute.") exit(1) From a439450286034c0d5e680eca6ea0909ffd04af7c Mon Sep 17 00:00:00 2001 From: Tim Johnson <43890311+Inevitable-Marzipan@users.noreply.github.com> Date: Tue, 6 Apr 2021 14:39:31 +0100 Subject: [PATCH 3/4] Update attach_compute.py --- ml_service/util/attach_compute.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ml_service/util/attach_compute.py b/ml_service/util/attach_compute.py index ed2018f9..cf8c07a6 100644 --- a/ml_service/util/attach_compute.py +++ b/ml_service/util/attach_compute.py @@ -33,7 +33,7 @@ def get_compute(workspace: Workspace, compute_name: str, vm_size: str, for_batch show_output=True, min_node_count=None, timeout_in_minutes=10 ) return compute_target - except ComputeTargetException as ex: + except ComputeTargetException: traceback.print_exc() print("An error occurred trying to provision compute.") exit(1) From 260596887e432bfc932a7db6d50da4df68d6d91b Mon Sep 17 00:00:00 2001 From: Tim Johnson <43890311+Inevitable-Marzipan@users.noreply.github.com> Date: Tue, 6 Apr 2021 14:40:09 +0100 Subject: [PATCH 4/4] Update manage_environment.py --- ml_service/util/manage_environment.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ml_service/util/manage_environment.py b/ml_service/util/manage_environment.py index 16677729..b61c97fe 100644 --- a/ml_service/util/manage_environment.py +++ b/ml_service/util/manage_environment.py @@ -36,6 +36,6 @@ def get_environment( if restored_environment is not None: print(restored_environment) return restored_environment - except Exception as e: + except Exception: traceback.print_exc() exit(1)