2017-11-25 114 views
0

我对Python很陌生,所以我可能不完全了解如何将这些库正确导入到Azure ML中。在AzureML中使用Azure存储库 - 自定义python库

我有一堆数据存储在表存储中,我有本地Python代码成功加入所有这些作为ML实验的准备。我了解到,AzureML环境没有安装Azure存储库,因此按照this的步骤上传包含我在anaconda3 \ lib \ site-packages下找到的Azure存储库的ZIP文件。我把所有的azure目录都捆绑在一个zip文件中,然后在链接中的文档底部将zip文件作为DataSet上传,并将数据集附加到ML中的Execute Python脚本节点。

我收到了这样的错误,当我尝试运行的节点:

requestId = 825883c7ccb74f7e869e68e60d3cd919 errorComponent=Module. taskStatusCode=400. e "C:\pyhome\lib\ssl.py", line 856, in send return self._sslobj.write(data) File "C:\pyhome\lib\ssl.py", line 581, in write return self._sslobj.write(data)socket.timeout: The write operation timed outDuring handling of the above exception, another exception occurred:Traceback (most recent call last): File "C:\pyhome\lib\site-packages\requests\adapters.py", line 376, in send timeout=timeout File "C:\pyhome\lib\site-packages\requests\packages\urllib3\connectionpool.py", line 609, in urlopen _stacktrace=sys.exc_info()[2]) File "C:\pyhome\lib\site-packages\requests\packages\urllib3\util\retry.py", line 247, in increment raise six.reraise(type(error), error, _stacktrace) File "C:\pyhome\lib\site-packages\requests\packages\urllib3\packages\six.py", line 309, in reraise raise value.with_traceback(tb) File "C:\pyhome\lib\site-packages\requests\packages\urllib3\connectionpool.py", line 559, in urlopen body=body, headers=headers) File "C:\pyhome\lib\site-packages\requests\packages\urllib3\connectionpool.py", line 353, in _make_request conn.request(method, url, **httplib_request_kw) File "C:\pyhome\lib\http\client.py", line 1083, in request self._send_request(method, url, body, headers) File "C:\pyhome\lib\http\client.py", line 1128, in _send_request self.endheaders(body) File "C:\pyhome\lib\http\client.py", line 1079, in endheaders self._send_output(message_body) File "C:\pyhome\lib\http\client.py", line 911, in _send_output self.send(msg) File "C:\pyhome\lib\http\client.py", line 885, in send self.sock.sendall(data) File "C:\pyhome\lib\ssl.py", line 886, in sendall v = self.send(data[count:]) File "C:\pyhome\lib\ssl.py", line 856, in send return self._sslobj.write(data) File "C:\pyhome\lib\ssl.py", line 581, in write return self._sslobj.write(data)requests.packages.urllib3.exceptions.ProtocolError: ('Connection aborted.', timeout('The write operation timed out',))During handling of the above exception, another exception occurred:Traceback (most recent call last): File "c:\temp\script bundle\azure\storage\storageclient.py", line 221, in _perform_request response = self._httpclient.perform_request(request) File "c:\temp\script bundle\azure\storage\_http\httpclient.py", line 114, in perform_request proxies=self.proxies) File "C:\pyhome\lib\site-packages\requests\sessions.py", line 468, in request resp = self.send(prep, **send_kwargs) File "C:\pyhome\lib\site-packages\requests\sessions.py", line 576, in send r = adapter.send(request, **kwargs) File "C:\pyhome\lib\site-packages\requests\adapters.py", line 426, in send raise ConnectionError(err, request=request)requests.exceptions.ConnectionError: ('Connection aborted.', timeout('The write operation timed out',))During handling of the above exception, another exception occurred:Traceback (most recent call last): File "C:\server\invokepy.py", line 199, in batch odfs = mod.azureml_main(*idfs) File "C:\temp\fa22884a19884f658d411dc0bdf05715.py", line 33, in azureml_main data = table_service.query_entities(table_name) File "c:\temp\script bundle\azure\storage\table\tableservice.py", line 728, in query_entities resp = self._query_entities(*args, **kwargs) File "c:\temp\script bundle\azure\storage\table\tableservice.py", line 795, in _query_entities operation_context=_context) File "c:\temp\script bundle\azure\storage\table\tableservice.py", line 1093, in _perform_request return super(TableService, self)._perform_request(request, parser, parser_args, operation_context) File "c:\temp\script bundle\azure\storage\storageclient.py", line 279, in _perform_request raise ex File "c:\temp\script bundle\azure\storage\storageclient.py", line 251, in _perform_request raise AzureException(ex.args[0])azure.common.AzureException: ('Connection aborted.', timeout('The write operation timed out',))Process returned with non-zero exit code 

我不知道我做错了

回答

0

在Azure的ML工作室,Python脚本(和R脚本这个问题)在沙箱中运行,所以无法通过网络访问资源。见limitations

的执行Python脚本目前有以下限制:

  1. 沙盒执行。 Python运行时正在沙箱,并为 因此,不允许访问网络...

所以,如果你想从一个blob读取使用单独的进口数据模块,如果你想要写入blob,请使用单独的Export Data模块。

相关问题