Azure-Samples / aml-hardware-accelerated-models

Sample client code for Azure ML HW Accelerated Models Powered by Project Brainwave
MIT License
6 stars 9 forks source link

Deploy to Edge via SDK - missing pip install azureml-contrib-iot #7

Open buswrecker opened 4 years ago

buswrecker commented 4 years ago

ipynb fails at Line 18

from azureml.contrib.core.compute import IotHubCompute

# If you haven't attached your Data Box Edge's IoT Hub as compute
config = IotHubCompute.attach_configuration(name=iot_hub_name, resource_group=resource_group, connection_string=connection_string)
iothub_compute = IotHubCompute.attach(ws, iot_device_id, config)
iothub_compute.wait_for_completion()

---------------------------------------------------------------------------
ImportError                               Traceback (most recent call last)
<ipython-input-18-9759e54235ca> in <module>
      1 #from azureml.contrib.iot.compute import IotHubCompute
----> 2 from azureml.contrib import IotHubCompute
      3 
      4 # If you haven't attached your Data Box Edge's IoT Hub as compute
      5 config = IotHubCompute.attach_configuration(name=iot_hub_name, resource_group=resource_group, connection_string=connection_string)

ImportError: cannot import name 'IotHubCompute'

Remedy is to edit package list

Change this code block

%%bash
pip install azure-cli # Install Azure CLI
az extension add --name azure-cli-iot-ext # Add IoT CLI extension
pip install -U jupyter_console # Fix Jupyter dependencies overridden by Azure CLI installation
pip install docker # Install Docker
pip install azureml-accel-models[cpu]
az login # Log into Azure account

and include

pip install azureml-contrib-iot
manashgoswami commented 4 years ago

@paledger can you please review this and merge?