When I use az ml to deploy my model, I get into trouble with this code:
-
from azureml.core.model import Model
model = ws.models['churn-model-test']
service = Model.deploy(workspace=ws, name = 'churn-test-service', models = [model], inference_config = classifier_inference_config, deployment_config = classifier_deploy_config, deployment_target = production_cluster)
service.wait_for_deployment(show_output = True)
**
**
NameError Traceback (most recent call last) <ipython-input-56-cc3952c5e744> in <module> 7 inference_config = classifier_inference_config, 8 deployment_config = classifier_deploy_config, ----> 9 deployment_target = production_cluster) 10 service.wait_for_deployment(show_output = True) ~\anaconda3\lib\site-packages\azureml\core\model.py in deploy(workspace, name, models, inference_config, deployment_config, deployment_target, overwrite, show_output) 1660 # Environment-based webservice. 1661 if not deployment_config or deployment_config._webservice_type._webservice_type != IOT_WEBSERVICE_TYPE: -> 1662 inference_config, use_env_path = convert_parts_to_environment(name, inference_config) 1663 else: 1664 use_env_path = inference_config.environment is not None ~\anaconda3\lib\site-packages\azureml_model_management_util.py in convert_parts_to_environment(service_name, inference_config) 1220 else: 1221 conda_path = inference_config.conda_file -> 1222 env = Environment.from_conda_specification(env_name, conda_path) 1223 else: 1224 env = Environment(env_name) ~\anaconda3\lib\site-packages\azureml\core\environment.py in from_conda_specification(name, file_path) 1084 :rtype: azureml.core.environment.Environment 1085 """ # noqa: E501 -> 1086 conda_dependencies = CondaDependencies(conda_dependencies_file_path=file_path) 1087 if not conda_dependencies._python_version: 1088 module_logger.warning('No Python version provided, defaulting to "{}"'.format(PYTHON_DEFAULT_VERSION)) ~\anaconda3\lib\site-packages\azureml\core\conda_dependencies.py in init(self, conda_dependencies_file_path, _underlying_structure) 121 def init(self, conda_dependencies_file_path=None, _underlying_structure=None): 122 """Initialize a new object to manage dependencies.""" --> 123 if conda_dependencies_file_path: 124 with open(conda_dependencies_file_path, "r") as input: 125 self._conda_dependencies = ruamel.yaml.round_trip_load(input) NameError: name 'ruamel' is not defined