Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions ml_service/util/attach_compute.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@

import traceback
from azureml.core import Workspace
from azureml.core.compute import AmlCompute
from azureml.core.compute import ComputeTarget
Expand Down Expand Up @@ -32,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:
print(ex)
except ComputeTargetException:
traceback.print_exc()
print("An error occurred trying to provision compute.")
exit(1)
5 changes: 3 additions & 2 deletions ml_service/util/manage_environment.py
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -35,6 +36,6 @@ def get_environment(
if restored_environment is not None:
print(restored_environment)
return restored_environment
except Exception as e:
print(e)
except Exception:
traceback.print_exc()
exit(1)