question

DaenerysXiao-2858 avatar image
0 Votes"
DaenerysXiao-2858 asked SaurabhSharma-msft commented

NameError: name 'ruamel' is not defined for conda_dependencies.py

When I use az ml to deploy my model, I get into trouble with this code:

-

  • my code is:


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)



  • The Error is:


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




azure-databricks
· 2
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hello @@DaenerysXiao-2858 ,
We haven’t heard from you on the last response and was just checking back to see if you have a resolution yet .In case if you have any resolution please do share that same with the community as it can be helpful to others . Otherwise, will respond back with the more details and we will try to help .
Thanks
Himanshu

0 Votes 0 ·

Hi @DaenerysXiao-2858 ,


We have not heard back from you. Did @HimanshuSinha-MSFT's response resolve your issue? If so, please mark as accepted answer. If not, please let me know how I may better assist.

Thanks
Saurabh

0 Votes 0 ·

1 Answer

HimanshuSinha-MSFT avatar image
0 Votes"
HimanshuSinha-MSFT answered

Hello @DaenerysXiao-2858 ,
Thanks for the ask and using the Microsoft Q&A platform .

please upgrade to the latest version of the Azure ML SDK ands it should get fixed .


Please do let me know how it goes .
Thanks
Himanshu
Please do consider to click on "Accept Answer" and "Up-vote" on the post that helps you, as it can be beneficial to other community members

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.