Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

is tensorflow and tensorrt necessary? #105

Open
Myfootnotsmelly opened this issue Sep 27, 2023 · 2 comments
Open

is tensorflow and tensorrt necessary? #105

Myfootnotsmelly opened this issue Sep 27, 2023 · 2 comments

Comments

@Myfootnotsmelly
Copy link

follow Running on localhost it shows

2023-09-27 07:34:52.128047: I tensorflow/tsl/cuda/cudart_stub.cc:28] Could not find cuda drivers on your machine, GPU will not be used.
2023-09-27 07:34:52.519193: I tensorflow/tsl/cuda/cudart_stub.cc:28] Could not find cuda drivers on your machine, GPU will not be used.
2023-09-27 07:34:52.521927: I tensorflow/core/platform/cpu_feature_guard.cc:182] This TensorFlow binary is optimized to use available CPU instructions in performance-critical operations.
To enable the following instructions: AVX2 FMA, in other operations, rebuild TensorFlow with the appropriate compiler flags.
2023-09-27 07:34:54.169346: W tensorflow/compiler/tf2tensorrt/utils/py_utils.cc:38] TF-TRT Warning: Could not find TensorRT
Traceback (most recent call last):
  File "/usr/local/lib/python3.10/urllib/request.py", line 1348, in do_open
    h.request(req.get_method(), req.selector, req.data, headers,
  File "/usr/local/lib/python3.10/http/client.py", line 1283, in request
    self._send_request(method, url, body, headers, encode_chunked)
  File "/usr/local/lib/python3.10/http/client.py", line 1329, in _send_request
    self.endheaders(body, encode_chunked=encode_chunked)
  File "/usr/local/lib/python3.10/http/client.py", line 1278, in endheaders
    self._send_output(message_body, encode_chunked=encode_chunked)
  File "/usr/local/lib/python3.10/http/client.py", line 1038, in _send_output
    self.send(msg)
  File "/usr/local/lib/python3.10/http/client.py", line 976, in send
    self.connect()
  File "/usr/local/lib/python3.10/http/client.py", line 1448, in connect
    super().connect()
  File "/usr/local/lib/python3.10/http/client.py", line 942, in connect
    self.sock = self._create_connection(
  File "/usr/local/lib/python3.10/socket.py", line 845, in create_connection
    raise err
  File "/usr/local/lib/python3.10/socket.py", line 833, in create_connection
    sock.connect(sa)
OSError: [Errno 99] Cannot assign requested address

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/user/app/app.py", line 164, in <module>
    recommender = SemanticSearch()
  File "/home/user/app/app.py", line 60, in __init__
    self.use = hub.load('https://tfhub.dev/google/universal-sentence-encoder/4')
  File "/home/user/.local/lib/python3.10/site-packages/tensorflow_hub/module_v2.py", line 93, in load
    module_path = resolve(handle)
  File "/home/user/.local/lib/python3.10/site-packages/tensorflow_hub/module_v2.py", line 48, in resolve
    return registry.resolver(handle)
  File "/home/user/.local/lib/python3.10/site-packages/tensorflow_hub/registry.py", line 49, in __call__
    return impl(*args, **kwargs)
  File "/home/user/.local/lib/python3.10/site-packages/tensorflow_hub/compressed_module_resolver.py", line 81, in __call__
    return resolver.atomic_download(handle, download, module_dir,
  File "/home/user/.local/lib/python3.10/site-packages/tensorflow_hub/resolver.py", line 421, in atomic_download
    download_fn(handle, tmp_dir)
  File "/home/user/.local/lib/python3.10/site-packages/tensorflow_hub/compressed_module_resolver.py", line 77, in download
    response = self._call_urlopen(request)
  File "/home/user/.local/lib/python3.10/site-packages/tensorflow_hub/resolver.py", line 528, in _call_urlopen
    return urllib.request.urlopen(request, context=self._context)
  File "/usr/local/lib/python3.10/urllib/request.py", line 216, in urlopen
    return opener.open(url, data, timeout)
  File "/usr/local/lib/python3.10/urllib/request.py", line 519, in open
    response = self._open(req, data)
  File "/usr/local/lib/python3.10/urllib/request.py", line 536, in _open
    result = self._call_chain(self.handle_open, protocol, protocol +
  File "/usr/local/lib/python3.10/urllib/request.py", line 496, in _call_chain
    result = func(*args)
  File "/usr/local/lib/python3.10/urllib/request.py", line 1391, in https_open
    return self.do_open(http.client.HTTPSConnection, req,
  File "/usr/local/lib/python3.10/urllib/request.py", line 1351, in do_open
    raise URLError(err)
urllib.error.URLError: <urlopen error [Errno 99] Cannot assign requested address>

Could it run under no gpu?

@oslijunw
Copy link

The error here is only reported by urllib2. According to the source code, this is an api such as openai, and there is no need for gpu.

@oslijunw
Copy link

The error here is only reported by urllib2. According to the source code, this is an api such as openai, and there is no need for gpu.

I'm wrong. He has a semantic model that will be downloaded from that place. It is reasonable to run hard without a gpu. The semantic model has little demand for computing power.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants