[BUG Bash] Azure ML Model Local Deployment
Describe the bug While deploying ML Model to Local, getting the error as:- ModuleNotFoundError: No module named 'azureml.api' and ModuleNotFoundError: No module named 'azure.ml'
Exception or Stack Trace
PS C:\Users\nikhil.mundhra> docker run -p 6789:80 -it test
2021-08-09T13:15:30,156931600+00:00 - iot-server/run
2021-08-09T13:15:30,157256100+00:00 - rsyslog/run
2021-08-09T13:15:30,157309400+00:00 - gunicorn/run
2021-08-09T13:15:30,158387200+00:00 - nginx/run
/usr/sbin/nginx: /azureml-envs/azureml_750fff264b7151d70362c7892fec63f6/lib/libcrypto.so.1.0.0: no version information available (required by /usr/sbin/nginx)
/usr/sbin/nginx: /azureml-envs/azureml_750fff264b7151d70362c7892fec63f6/lib/libcrypto.so.1.0.0: no version information available (required by /usr/sbin/nginx)
/usr/sbin/nginx: /azureml-envs/azureml_750fff264b7151d70362c7892fec63f6/lib/libssl.so.1.0.0: no version information available (required by /usr/sbin/nginx)
/usr/sbin/nginx: /azureml-envs/azureml_750fff264b7151d70362c7892fec63f6/lib/libssl.so.1.0.0: no version information available (required by /usr/sbin/nginx)
/usr/sbin/nginx: /azureml-envs/azureml_750fff264b7151d70362c7892fec63f6/lib/libssl.so.1.0.0: no version information available (required by /usr/sbin/nginx)
EdgeHubConnectionString and IOTEDGE_IOTHUBHOSTNAME are not set. Exiting...
2021-08-09T13:15:30,239506000+00:00 - iot-server/finish 1 0
2021-08-09T13:15:30,241673800+00:00 - Exit code 1 is normal. Not restarting iot-server.
Starting gunicorn 20.1.0
Listening at: http://127.0.0.1:31311 (13)
Using worker: sync
worker timeout is set to 300
Booting worker with pid: 55
SPARK_HOME not set. Skipping PySpark Initialization.
/azureml-envs/azureml_750fff264b7151d70362c7892fec63f6/lib/python3.6/site-packages/tensorflow/python/framework/dtypes.py:516: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
_np_qint8 = np.dtype([("qint8", np.int8, 1)])
/azureml-envs/azureml_750fff264b7151d70362c7892fec63f6/lib/python3.6/site-packages/tensorflow/python/framework/dtypes.py:517: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
_np_quint8 = np.dtype([("quint8", np.uint8, 1)])
/azureml-envs/azureml_750fff264b7151d70362c7892fec63f6/lib/python3.6/site-packages/tensorflow/python/framework/dtypes.py:518: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
_np_qint16 = np.dtype([("qint16", np.int16, 1)])
/azureml-envs/azureml_750fff264b7151d70362c7892fec63f6/lib/python3.6/site-packages/tensorflow/python/framework/dtypes.py:519: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
_np_quint16 = np.dtype([("quint16", np.uint16, 1)])
/azureml-envs/azureml_750fff264b7151d70362c7892fec63f6/lib/python3.6/site-packages/tensorflow/python/framework/dtypes.py:520: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
_np_qint32 = np.dtype([("qint32", np.int32, 1)])
/azureml-envs/azureml_750fff264b7151d70362c7892fec63f6/lib/python3.6/site-packages/tensorflow/python/framework/dtypes.py:525: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
np_resource = np.dtype([("resource", np.ubyte, 1)])
Generating new fontManager, this may take some time...
/azureml-envs/azureml_750fff264b7151d70362c7892fec63f6/lib/python3.6/site-packages/tensorboard/compat/tensorflow_stub/dtypes.py:541: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
_np_qint8 = np.dtype([("qint8", np.int8, 1)])
/azureml-envs/azureml_750fff264b7151d70362c7892fec63f6/lib/python3.6/site-packages/tensorboard/compat/tensorflow_stub/dtypes.py:542: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
_np_quint8 = np.dtype([("quint8", np.uint8, 1)])
/azureml-envs/azureml_750fff264b7151d70362c7892fec63f6/lib/python3.6/site-packages/tensorboard/compat/tensorflow_stub/dtypes.py:543: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
_np_qint16 = np.dtype([("qint16", np.int16, 1)])
/azureml-envs/azureml_750fff264b7151d70362c7892fec63f6/lib/python3.6/site-packages/tensorboard/compat/tensorflow_stub/dtypes.py:544: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
_np_quint16 = np.dtype([("quint16", np.uint16, 1)])
/azureml-envs/azureml_750fff264b7151d70362c7892fec63f6/lib/python3.6/site-packages/tensorboard/compat/tensorflow_stub/dtypes.py:545: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
_np_qint32 = np.dtype([("qint32", np.int32, 1)])
/azureml-envs/azureml_750fff264b7151d70362c7892fec63f6/lib/python3.6/site-packages/tensorboard/compat/tensorflow_stub/dtypes.py:550: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
np_resource = np.dtype([("resource", np.ubyte, 1)])
Exception in worker process
Traceback (most recent call last):
File "/var/azureml-server/routes_common.py", line 37, in
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/azureml-envs/azureml_750fff264b7151d70362c7892fec63f6/lib/python3.6/site-packages/gunicorn/arbiter.py", line 589, in spawn_worker
worker.init_process()
File "/azureml-envs/azureml_750fff264b7151d70362c7892fec63f6/lib/python3.6/site-packages/gunicorn/workers/base.py", line 134, in init_process
self.load_wsgi()
File "/azureml-envs/azureml_750fff264b7151d70362c7892fec63f6/lib/python3.6/site-packages/gunicorn/workers/base.py", line 146, in load_wsgi
self.wsgi = self.app.wsgi()
File "/azureml-envs/azureml_750fff264b7151d70362c7892fec63f6/lib/python3.6/site-packages/gunicorn/app/base.py", line 67, in wsgi
self.callable = self.load()
File "/azureml-envs/azureml_750fff264b7151d70362c7892fec63f6/lib/python3.6/site-packages/gunicorn/app/wsgiapp.py", line 58, in load
return self.load_wsgiapp()
File "/azureml-envs/azureml_750fff264b7151d70362c7892fec63f6/lib/python3.6/site-packages/gunicorn/app/wsgiapp.py", line 48, in load_wsgiapp
return util.import_app(self.app_uri)
File "/azureml-envs/azureml_750fff264b7151d70362c7892fec63f6/lib/python3.6/site-packages/gunicorn/util.py", line 359, in import_app
mod = importlib.import_module(module)
File "/azureml-envs/azureml_750fff264b7151d70362c7892fec63f6/lib/python3.6/importlib/init.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "
To Reproduce Deploy a Tensorflow Model to local environment
Expected behavior Model gets deployed
Setup (please complete the following information):
- Python Version: Python 3.6
- SDK Version: azureml-core==1.26
Closing legacy issue.
Please consider upgrading to AzureML v2 CLI/SDK. https://learn.microsoft.com/en-us/azure/machine-learning/concept-v2
@luigiw
Facing the same issue. Can't upgrade to v2 CLI/SDK, because I need to use an endpoint in Power BI and Power BI only supports v1 CLI/SDK.
@eli-halych is there a tutorial you're following on using AzureML endpoints in PowerBI? I want to understand more on why PowerBI doesn't support v2.
@eli-halych is there a tutorial you're following on using AzureML endpoints in PowerBI? I want to understand more on why PowerBI doesn't support v2.
https://learn.microsoft.com/en-us/power-bi/connect-data/service-aml-integrate
It says in purple: "Currently, Online endpoints (v2 endpoint) are not supported in Power BI yet. ACI/AKS web services (v1 web services) are only supported."
@nikhilmundhra, this is what worked for me:
python==3.8.13 pip==22.3 azureml-defaults<=1.28.0 or azureml-defaults==1.28.0 (try both, sometimes there's weird behavior if it's just ==1.28.0)
azureml-defaults will install azureml-core, don't include it manually.