Hi,
I am training a TF lite model on a HPC Cluster. While executing the script I get a URLError: <urlopen error [Errno 110] Connection timed out>.
The main challenge here is that the cluster is not connected to the internet. Is there anyway to resolve this error other than connecting to internet like installing some packages offile?
Below is the output that I get
Traceback (most recent call last):
File “/users/analysis/e40070822/anaconda3/lib/python3.10/urllib/request.py”, line 1348, in do_open
h.request(req.get_method(), req.selector, req.data, headers,
File “/users/analysis/e40070822/anaconda3/lib/python3.10/http/client.py”, line 1282, in request
self._send_request(method, url, body, headers, encode_chunked)
File “/users/analysis/e40070822/anaconda3/lib/python3.10/http/client.py”, line 1328, in _send_request
self.endheaders(body, encode_chunked=encode_chunked)
File “/users/analysis/e40070822/anaconda3/lib/python3.10/http/client.py”, line 1277, in endheaders
self._send_output(message_body, encode_chunked=encode_chunked)
File “/users/analysis/e40070822/anaconda3/lib/python3.10/http/client.py”, line 1037, in _send_output
self.send(msg)
File “/users/analysis/e40070822/anaconda3/lib/python3.10/http/client.py”, line 975, in send
self.connect()
File “/users/analysis/e40070822/anaconda3/lib/python3.10/http/client.py”, line 1447, in connect
super().connect()
File “/users/analysis/e40070822/anaconda3/lib/python3.10/http/client.py”, line 941, in connect
self.sock = self._create_connection(
File “/users/analysis/e40070822/anaconda3/lib/python3.10/socket.py”, line 845, in create_connection
raise err
File “/users/analysis/e40070822/anaconda3/lib/python3.10/socket.py”, line 833, in create_connection
sock.connect(sa)
TimeoutError: [Errno 110] Connection timed out
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File “/users/analysis/e40070822/SeatCV/src/train_test_model.py”, line 249, in
main()
File “/users/analysis/e40070822/SeatCV/src/train_test_model.py”, line 233, in main
_, output_dir, model_fp = train_test(dataset_dir)
File “/users/analysis/e40070822/SeatCV/src/train_test_model.py”, line 191, in train_test
model, model_name = tune(train_data, validation_data, True)
File “/users/analysis/e40070822/SeatCV/src/train_test_model.py”, line 167, in tune
model = object_detector.create(train_data=train_data,
File “/users/analysis/e40070822/anaconda3/lib/python3.10/site-packages/tensorflow_examples/lite/model_maker/core/task/object_detector.py”, line 260, in create
object_detector.train(train_data, validation_data, epochs, batch_size)
File “/users/analysis/e40070822/anaconda3/lib/python3.10/site-packages/tensorflow_examples/lite/model_maker/core/task/object_detector.py”, line 118, in train
self.create_model()
File “/users/analysis/e40070822/anaconda3/lib/python3.10/site-packages/tensorflow_examples/lite/model_maker/core/task/object_detector.py”, line 74, in create_model
self.model = self.model_spec.create_model()
File “/users/analysis/e40070822/anaconda3/lib/python3.10/site-packages/tensorflow_examples/lite/model_maker/core/task/model_spec/object_detector_spec.py”, line 238, in create_model
return train_lib.EfficientDetNetTrainHub(
File “/users/analysis/e40070822/anaconda3/lib/python3.10/site-packages/tensorflow_examples/lite/model_maker/third_party/efficientdet/keras/train_lib.py”, line 862, in init
self.base_model = hub.KerasLayer(hub_module_url, trainable=True)
File “/users/analysis/e40070822/anaconda3/lib/python3.10/site-packages/tensorflow_hub/keras_layer.py”, line 153, in init
self._func = load_module(handle, tags, self._load_options)
File “/users/analysis/e40070822/anaconda3/lib/python3.10/site-packages/tensorflow_hub/keras_layer.py”, line 449, in load_module
return module_v2.load(handle, tags=tags, options=set_load_options)
File “/users/analysis/e40070822/anaconda3/lib/python3.10/site-packages/tensorflow_hub/module_v2.py”, line 92, in load
module_path = resolve(handle)
File “/users/analysis/e40070822/anaconda3/lib/python3.10/site-packages/tensorflow_hub/module_v2.py”, line 47, in resolve
return registry.resolver(handle)
File “/users/analysis/e40070822/anaconda3/lib/python3.10/site-packages/tensorflow_hub/registry.py”, line 51, in call
return impl(*args, **kwargs)
File “/users/analysis/e40070822/anaconda3/lib/python3.10/site-packages/tensorflow_hub/compressed_module_resolver.py”, line 67, in call
return resolver.atomic_download(handle, download, module_dir,
File “/users/analysis/e40070822/anaconda3/lib/python3.10/site-packages/tensorflow_hub/resolver.py”, line 418, in atomic_download
download_fn(handle, tmp_dir)
File “/users/analysis/e40070822/anaconda3/lib/python3.10/site-packages/tensorflow_hub/compressed_module_resolver.py”, line 63, in download
response = self._call_urlopen(request)
File “/users/analysis/e40070822/anaconda3/lib/python3.10/site-packages/tensorflow_hub/resolver.py”, line 522, in _call_urlopen
return urllib.request.urlopen(request)
File “/users/analysis/e40070822/anaconda3/lib/python3.10/urllib/request.py”, line 216, in urlopen
return opener.open(url, data, timeout)
File “/users/analysis/e40070822/anaconda3/lib/python3.10/urllib/request.py”, line 519, in open
response = self._open(req, data)
File “/users/analysis/e40070822/anaconda3/lib/python3.10/urllib/request.py”, line 536, in _open
result = self._call_chain(self.handle_open, protocol, protocol +
File “/users/analysis/e40070822/anaconda3/lib/python3.10/urllib/request.py”, line 496, in _call_chain
result = func(*args)
File “/users/analysis/e40070822/anaconda3/lib/python3.10/urllib/request.py”, line 1391, in https_open
return self.do_open(http.client.HTTPSConnection, req,
File “/users/analysis/e40070822/anaconda3/lib/python3.10/urllib/request.py”, line 1351, in do_open
raise URLError(err)
urllib.error.URLError: <urlopen error [Errno 110] Connection timed out>
Thanks in advance!!!