MAX-Text-Sentiment-Classifier
MAX-Text-Sentiment-Classifier copied to clipboard
Model Data Training showing error Network Unreachable in log file
I followed following tutorial to train the model with my data. https://github.com/IBM/MAX-Text-Sentiment-Classifier/tree/master/training
When I run command
python train_max_model.py max-text-classifier-training-config.yaml package
I get following error in file training-log.txt.
Downloading pre-trained model file...
Traceback (most recent call last):
File "/opt/anaconda/envs/wmlce/lib/python3.6/urllib/request.py", line 1757, in open
return getattr(self, name)(url)
File "/opt/anaconda/envs/wmlce/lib/python3.6/urllib/request.py", line 1967, in open_https
return self._open_generic_http(self._https_connection, url, data)
File "/opt/anaconda/envs/wmlce/lib/python3.6/urllib/request.py", line 1916, in _open_generic_http
http_conn.request("GET", selector, headers=headers)
File "/opt/anaconda/envs/wmlce/lib/python3.6/http/client.py", line 1262, in request
self._send_request(method, url, body, headers, encode_chunked)
File "/opt/anaconda/envs/wmlce/lib/python3.6/http/client.py", line 1308, in _send_request
self.endheaders(body, encode_chunked=encode_chunked)
File "/opt/anaconda/envs/wmlce/lib/python3.6/http/client.py", line 1257, in endheaders
self._send_output(message_body, encode_chunked=encode_chunked)
File "/opt/anaconda/envs/wmlce/lib/python3.6/http/client.py", line 1036, in _send_output
self.send(msg)
File "/opt/anaconda/envs/wmlce/lib/python3.6/http/client.py", line 974, in send
self.connect()
File "/opt/anaconda/envs/wmlce/lib/python3.6/http/client.py", line 1415, in connect
super().connect()
File "/opt/anaconda/envs/wmlce/lib/python3.6/http/client.py", line 946, in connect
(self.host,self.port), self.timeout, self.source_address)
File "/opt/anaconda/envs/wmlce/lib/python3.6/socket.py", line 724, in create_connection
raise err
File "/opt/anaconda/envs/wmlce/lib/python3.6/socket.py", line 713, in create_connection
sock.connect(sa)
OSError: [Errno 101] Network is unreachable
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "prepare_environment.py", line 97, in <module>
main()
File "prepare_environment.py", line 78, in main
opener.retrieve(download_base + model_file, archive_path)
File "/opt/anaconda/envs/wmlce/lib/python3.6/urllib/request.py", line 1791, in retrieve
fp = self.open(url, data)
File "/opt/anaconda/envs/wmlce/lib/python3.6/urllib/request.py", line 1763, in open
raise OSError('socket error', msg).with_traceback(sys.exc_info()[2])
File "/opt/anaconda/envs/wmlce/lib/python3.6/urllib/request.py", line 1757, in open
return getattr(self, name)(url)
File "/opt/anaconda/envs/wmlce/lib/python3.6/urllib/request.py", line 1967, in open_https
return self._open_generic_http(self._https_connection, url, data)
File "/opt/anaconda/envs/wmlce/lib/python3.6/urllib/request.py", line 1916, in _open_generic_http
http_conn.request("GET", selector, headers=headers)
File "/opt/anaconda/envs/wmlce/lib/python3.6/http/client.py", line 1262, in request
self._send_request(method, url, body, headers, encode_chunked)
File "/opt/anaconda/envs/wmlce/lib/python3.6/http/client.py", line 1308, in _send_request
self.endheaders(body, encode_chunked=encode_chunked)
File "/opt/anaconda/envs/wmlce/lib/python3.6/http/client.py", line 1257, in endheaders
self._send_output(message_body, encode_chunked=encode_chunked)
File "/opt/anaconda/envs/wmlce/lib/python3.6/http/client.py", line 1036, in _send_output
self.send(msg)
File "/opt/anaconda/envs/wmlce/lib/python3.6/http/client.py", line 974, in send
self.connect()
File "/opt/anaconda/envs/wmlce/lib/python3.6/http/client.py", line 1415, in connect
super().connect()
File "/opt/anaconda/envs/wmlce/lib/python3.6/http/client.py", line 946, in connect
(self.host,self.port), self.timeout, self.source_address)
File "/opt/anaconda/envs/wmlce/lib/python3.6/socket.py", line 724, in create_connection
raise err
File "/opt/anaconda/envs/wmlce/lib/python3.6/socket.py", line 713, in create_connection
sock.connect(sa)
OSError: [Errno socket error] [Errno 101] Network is unreachable
Error: Environment setup run exited with status code 1
Training exited with error code 1
Failed: learner_exit_code: 1
Do I need to change any thing in services of cloud IBM, do I need to open any port or something. Please help to solve this issue. I could not find help anywhere.
Thanks