mirror of
https://github.com/openai/CLIP.git
synced 2026-11-05 01:37:26 +00:00
[GH-ISSUE #357] 执行p = ( pipe.input('path') .map('path', 'img', ops.image_decode.cv2('rgb')) .map('img', 'vec', ops.image_text_embedding.clip(model_name='clip_vit_base_patch16', modality='image')) .map('vec', 'vec', lambda x: x / np.… #311
Labels
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
openai/CLIP#311
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @JN0925 on GitHub (May 11, 2023).
Original GitHub issue: https://github.com/openai/CLIP/issues/357
2023-05-11 02:57:33,299 - 4542615040 - hub_utils.py-hub_utils:443 - ERROR: HTTPSConnectionPool(host='towhee.io', port=443): Max retries exceeded with url: /towhee-api/v1/repos/image-text-embedding/clip/tree?recursive=true&ref=main (Caused by SSLError(SSLEOFError(8, 'EOF occurred in violation of protocol (_ssl.c:1129)'))), Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/urllib3/connectionpool.py", line 700, in urlopen
self._prepare_proxy(conn)
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/urllib3/connectionpool.py", line 996, in _prepare_proxy
conn.connect()
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/urllib3/connection.py", line 419, in connect
self.sock = ssl_wrap_socket(
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/urllib3/util/ssl_.py", line 449, in ssl_wrap_socket
ssl_sock = _ssl_wrap_socket_impl(
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/urllib3/util/ssl_.py", line 493, in _ssl_wrap_socket_impl
return ssl_context.wrap_socket(sock, server_hostname=server_hostname)
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/ssl.py", line 500, in wrap_socket
return self.sslsocket_class._create(
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/ssl.py", line 1040, in _create
self.do_handshake()
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/ssl.py", line 1309, in do_handshake
self._sslobj.do_handshake()
ssl.SSLEOFError: EOF occurred in violation of protocol (_ssl.c:1129)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/requests/adapters.py", line 489, in send
resp = conn.urlopen(
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/urllib3/connectionpool.py", line 787, in urlopen
retries = retries.increment(
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/urllib3/util/retry.py", line 592, in increment
raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='towhee.io', port=443): Max retries exceeded with url: /towhee-api/v1/repos/image-text-embedding/clip/tree?recursive=true&ref=main (Caused by SSLError(SSLEOFError(8, 'EOF occurred in violation of protocol (_ssl.c:1129)')))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/towhee-0.9.1.dev111-py3.9.egg/towhee/utils/hub_utils.py", line 438, in branch_tree
r = requests.get(url, timeout=(10, 10))
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/requests/api.py", line 73, in get
return request("get", url, params=params, **kwargs)
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/requests/api.py", line 59, in request
return session.request(method=method, url=url, **kwargs)
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/requests/sessions.py", line 587, in request
resp = self.send(prep, **send_kwargs)
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/requests/sessions.py", line 701, in send
r = adapter.send(request, **kwargs)
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/requests/adapters.py", line 563, in send
raise SSLError(e, request=request)
requests.exceptions.SSLError: HTTPSConnectionPool(host='towhee.io', port=443): Max retries exceeded with url: /towhee-api/v1/repos/image-text-embedding/clip/tree?recursive=true&ref=main (Caused by SSLError(SSLEOFError(8, 'EOF occurred in violation of protocol (_ssl.c:1129)')))
2023-05-11 02:57:33,316 - 4542615040 - operator_loader.py-operator_loader:131 - ERROR: Fetch op image-text-embedding/clip:main info failed, Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/towhee-0.9.1.dev111-py3.9.egg/towhee/runtime/operator_manager/operator_loader.py", line 128, in _load_operator_from_hub
path = get_operator(operator=function, tag=tag, latest=latest)
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/towhee-0.9.1.dev111-py3.9.egg/towhee/hub/init.py", line 23, in get_operator
return _CACHE_MANAGER.get_operator(operator, tag, install_reqs, latest)
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/towhee-0.9.1.dev111-py3.9.egg/towhee/hub/cache_manager.py", line 97, in get_operator
download_operator(author, repo, tag, download_path, install_reqs, latest)
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/towhee-0.9.1.dev111-py3.9.egg/towhee/hub/downloader.py", line 169, in download_operator
raise RuntimeError('Fetch op {}/{}:{} info failed'.format(author, repo, tag))
RuntimeError: Fetch op image-text-embedding/clip:main info failed
RuntimeError Traceback (most recent call last)
Cell In[5], line 2
1 p = (
----> 2 pipe.input('path')
3 .map('path', 'img', ops.image_decode.cv2('rgb'))
4 .map('img', 'vec', ops.image_text_embedding.clip(model_name='clip_vit_base_patch16', modality='image'))
5 .map('vec', 'vec', lambda x: x / np.linalg.norm(x))
6 .output('img', 'vec')
7 )
9 DataCollection(p('./teddy.png')).show()
File /Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/towhee-0.9.1.dev111-py3.9.egg/towhee/runtime/pipeline.py:101, in Pipeline.output(self, *output_schema)
98 dag_dict[self._clo_node]['next_nodes'].append(uid)
100 run_pipe = RuntimePipeline(dag_dict)
--> 101 run_pipe.preload()
102 return run_pipe
File /Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/towhee-0.9.1.dev111-py3.9.egg/towhee/runtime/runtime_pipeline.py:147, in RuntimePipeline.preload(self)
143 def preload(self):
144 """
145 Preload the operators.
146 """
--> 147 return _Graph(self._dag_repr.nodes, self._dag_repr.edges, self._operator_pool, self._thread_pool, TimeProfiler(False))
File /Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/towhee-0.9.1.dev111-py3.9.egg/towhee/runtime/runtime_pipeline.py:65, in _Graph.init(self, nodes, edges, operator_pool, thread_pool, time_profiler, trace_edges)
63 self.features = None
64 self._time_profiler.record(Event.pipe_name, Event.pipe_in)
---> 65 self.initialize()
66 self._input_queue = self._data_queues[0]
File /Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/towhee-0.9.1.dev111-py3.9.egg/towhee/runtime/runtime_pipeline.py:81, in _Graph.initialize(self)
79 node = create_node(self._nodes[name], self._operator_pool, in_queues, out_queues, self._time_profiler)
80 if not node.initialize():
---> 81 raise RuntimeError(node.err_msg)
82 self._node_runners.append(node)
RuntimeError: Node-image-text-embedding/clip-1 runs failed, error msg: Create image-text-embedding/clip-1 operator image-text-embedding/clip:main with args None and kws {'model_name': 'clip_vit_base_patch16', 'modality': 'image'} failed, err: Load operator failed, Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/towhee-0.9.1.dev111-py3.9.egg/towhee/runtime/nodes/node.py", line 88, in initialize
self._op = self._op_pool.acquire_op(
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/towhee-0.9.1.dev111-py3.9.egg/towhee/runtime/operator_manager/operator_pool.py", line 101, in acquire_op
op = self._op_loader.load_operator(hub_op_id, op_args, op_kws, tag, latest)
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/towhee-0.9.1.dev111-py3.9.egg/towhee/runtime/operator_manager/operator_loader.py", line 155, in load_operator
raise RuntimeError('Load operator failed')
RuntimeError: Load operator failed
@bakaEC commented on GitHub (May 30, 2023):
把代理设置好,要么就关了View