rom1504 / clip-retrieval

Easily compute clip embeddings and build a clip retrieval system with them
https://rom1504.github.io/clip-retrieval/
MIT License
2.42k stars 213 forks source link

FileNotFoundError: https://github.com/LAION-AI/aesthetic-predictor/blob/main/vit_b_32_embeddings/rating1.npy?raw=true #374

Closed IF-chan closed 7 months ago

IF-chan commented 8 months ago

When I run clip-retrieval back --port 1234 --indices-paths indices_paths.json ,the error below occurred: starting boot of clip back warming up with batch size 1 on cpu done warming up in 0.9266810417175293s Traceback (most recent call last): File "D:\Program Files\python310\lib\site-packages\aiohttp\connector.py", line 992, in _wrap_create_connection return await self._loop.create_connection(*args, **kwargs) File "D:\Program Files\python310\lib\asyncio\base_events.py", line 1064, in create_connection raise exceptions[0] File "D:\Program Files\python310\lib\asyncio\base_events.py", line 1049, in create_connection sock = await self._connect_sock( File "D:\Program Files\python310\lib\asyncio\base_events.py", line 960, in _connect_sock await self.sock_connect(sock, address) File "D:\Program Files\python310\lib\asyncio\selector_events.py", line 500, in sock_connect return await fut File "D:\Program Files\python310\lib\asyncio\selector_events.py", line 535, in _sock_connect_cb raise OSError(err, f'Connect call failed {address}') TimeoutError: [Errno 10060] Connect call failed ('20.205.243.166', 443)

The above exception was the direct cause of the following exception:

Traceback (most recent call last): File "D:\Program Files\python310\lib\site-packages\fsspec\implementations\http.py", line 419, in _info await _file_info( File "D:\Program Files\python310\lib\site-packages\fsspec\implementations\http.py", line 828, in _file_info r = await session.get(url, allow_redirects=ar, **kwargs) File "D:\Program Files\python310\lib\site-packages\aiohttp\client.py", line 578, in _request conn = await self._connector.connect( File "D:\Program Files\python310\lib\site-packages\aiohttp\connector.py", line 544, in connect proto = await self._create_connection(req, traces, timeout) File "D:\Program Files\python310\lib\site-packages\aiohttp\connector.py", line 911, in _createconnection , proto = await self._create_direct_connection(req, traces, timeout) File "D:\Program Files\python310\lib\site-packages\aiohttp\connector.py", line 1235, in _create_direct_connection raise last_exc File "D:\Program Files\python310\lib\site-packages\aiohttp\connector.py", line 1204, in _create_direct_connection transp, proto = await self._wrap_create_connection( File "D:\Program Files\python310\lib\site-packages\aiohttp\connector.py", line 1000, in _wrap_create_connection raise client_error(req.connection_key, exc) from exc aiohttp.client_exceptions.ClientConnectorError: Cannot connect to host github.com:443 ssl:default [Connect call failed ('20.205.243.166', 443)]

The above exception was the direct cause of the following exception:

Traceback (most recent call last): File "D:\Program Files\python310\lib\runpy.py", line 196, in _run_module_as_main return _run_code(code, main_globals, None, File "D:\Program Files\python310\lib\runpy.py", line 86, in _run_code exec(code, run_globals) File "D:\Program Files\python310\Scripts\clip-retrieval.exe__main__.py", line 7, in sys.exit(main()) File "D:\Program Files\python310\lib\site-packages\clip_retrieval\cli.py", line 18, in main fire.Fire( File "D:\Program Files\python310\lib\site-packages\fire\core.py", line 141, in Fire component_trace = _Fire(component, args, parsed_flag_args, context, name) File "D:\Program Files\python310\lib\site-packages\fire\core.py", line 475, in _Fire component, remaining_args = _CallAndUpdateTrace( File "D:\Program Files\python310\lib\site-packages\fire\core.py", line 691, in _CallAndUpdateTrace component = fn(*varargs, kwargs) File "D:\Program Files\python310\lib\site-packages\clip_retrieval\clip_back.py", line 974, in clip_back clip_resources = load_clip_indices( File "D:\Program Files\python310\lib\site-packages\clip_retrieval\clip_back.py", line 947, in load_clip_indices clip_resources[name] = load_clip_index(clip_options) File "D:\Program Files\python310\lib\site-packages\clip_retrieval\clip_back.py", line 880, in load_clip_index get_aesthetic_embedding(clip_options.clip_model) if clip_options.provide_aesthetic_embeddings else None File "D:\Program Files\python310\lib\site-packages\clip_retrieval\clip_back.py", line 694, in get_aestheticembedding for in pool.imap_unordered(get, range(10)): File "D:\Program Files\python310\lib\multiprocessing\pool.py", line 873, in next raise value File "D:\Program Files\python310\lib\multiprocessing\pool.py", line 125, in worker result = (True, func(args, kwds)) File "D:\Program Files\python310\lib\site-packages\clip_retrieval\clip_back.py", line 688, in get with fs.open( File "D:\Program Files\python310\lib\site-packages\fsspec\spec.py", line 1293, in open f = self._open( File "D:\Program Files\python310\lib\site-packages\fsspec\implementations\http.py", line 358, in _open size = size or self.info(path, kwargs)["size"] File "D:\Program Files\python310\lib\site-packages\fsspec\asyn.py", line 118, in wrapper return sync(self.loop, func, args, kwargs) File "D:\Program Files\python310\lib\site-packages\fsspec\asyn.py", line 103, in sync raise return_result File "D:\Program Files\python310\lib\site-packages\fsspec\asyn.py", line 56, in _runner result[0] = await coro File "D:\Program Files\python310\lib\site-packages\fsspec\implementations\http.py", line 432, in _info raise FileNotFoundError(url) from exc FileNotFoundError: https://github.com/LAION-AI/aesthetic-predictor/blob/main/vit_b_32_embeddings/rating1.npy?raw=true

rom1504 commented 8 months ago

Is your network blocking GitHub?

On Thu, Mar 14, 2024, 9:01 AM IF-chan @.***> wrote:

When I run clip-retrieval back --port 1234 --indices-paths indices_paths.json ,the error below occurred: starting boot of clip back warming up with batch size 1 on cpu done warming up in 0.9266810417175293s Traceback (most recent call last): File "D:\Program Files\python310\lib\site-packages\aiohttp\connector.py", line 992, in _wrap_create_connection return await self._loop.create_connection(*args, **kwargs) File "D:\Program Files\python310\lib\asyncio\base_events.py", line 1064, in create_connection raise exceptions[0] File "D:\Program Files\python310\lib\asyncio\base_events.py", line 1049, in create_connection sock = await self._connect_sock( File "D:\Program Files\python310\lib\asyncio\base_events.py", line 960, in _connect_sock await self.sock_connect(sock, address) File "D:\Program Files\python310\lib\asyncio\selector_events.py", line 500, in sock_connect return await fut File "D:\Program Files\python310\lib\asyncio\selector_events.py", line 535, in _sock_connect_cb raise OSError(err, f'Connect call failed {address}') TimeoutError: [Errno 10060] Connect call failed ('20.205.243.166', 443)

The above exception was the direct cause of the following exception:

Traceback (most recent call last): File "D:\Program Files\python310\lib\site-packages\fsspec\implementations\http.py", line 419, in _info await _file_info( File "D:\Program Files\python310\lib\site-packages\fsspec\implementations\http.py", line 828, in _file_info r = await session.get(url, allow_redirects=ar, **kwargs) File "D:\Program Files\python310\lib\site-packages\aiohttp\client.py", line 578, in _request conn = await self._connector.connect( File "D:\Program Files\python310\lib\site-packages\aiohttp\connector.py", line 544, in connect proto = await self._create_connection(req, traces, timeout) File "D:\Program Files\python310\lib\site-packages\aiohttp\connector.py", line 911, in _createconnection , proto = await self._create_direct_connection(req, traces, timeout) File "D:\Program Files\python310\lib\site-packages\aiohttp\connector.py", line 1235, in _create_direct_connection raise last_exc File "D:\Program Files\python310\lib\site-packages\aiohttp\connector.py", line 1204, in _create_direct_connection transp, proto = await self._wrap_create_connection( File "D:\Program Files\python310\lib\site-packages\aiohttp\connector.py", line 1000, in _wrap_create_connection raise client_error(req.connection_key, exc) from exc aiohttp.client_exceptions.ClientConnectorError: Cannot connect to host github.com:443 ssl:default [Connect call failed ('20.205.243.166', 443)]

The above exception was the direct cause of the following exception:

Traceback (most recent call last): File "D:\Program Files\python310\lib\runpy.py", line 196, in _run_module_as_main return _run_code(code, main_globals, None, File "D:\Program Files\python310\lib\runpy.py", line 86, in

run_code exec(code, run_globals) File "D:\Program Files\python310\Scripts\clip-retrieval.exe_main.py", line 7, in sys.exit(main()) File "D:\Program Files\python310\lib\site-packages\clip_retrieval\cli.py", line 18, in main fire.Fire( File "D:\Program Files\python310\lib\site-packages\fire\core.py", line 141, in Fire component_trace = _Fire(component, args, parsed_flag_args, context, name) File "D:\Program Files\python310\lib\site-packages\fire\core.py", line 475, in _Fire component, remaining_args = _CallAndUpdateTrace( File "D:\Program Files\python310\lib\site-packages\fire\core.py", line 691, in _CallAndUpdateTrace component = fn(*varargs, kwargs) File "D:\Program Files\python310\lib\site-packages\clip_retrieval\clip_back.py", line 974, in clip_back clip_resources = load_clip_indices( File "D:\Program Files\python310\lib\site-packages\clip_retrieval\clip_back.py", line 947, in load_clip_indices clip_resources[name] = load_clip_index(clip_options) File "D:\Program Files\python310\lib\site-packages\clip_retrieval\clip_back.py", line 880, in load_clip_index get_aesthetic_embedding(clip_options.clip_model) if clip_options.provide_aesthetic_embeddings else None File "D:\Program Files\python310\lib\site-packages\clip_retrieval\clip_back.py", line 694, in get_aestheticembedding for in pool.imap_unordered(get, range(10)): File "D:\Program Files\python310\lib\multiprocessing\pool.py", line 873, in next raise value File "D:\Program Files\python310\lib\multiprocessing\pool.py", line 125, in worker result = (True, func(args, kwds)) File "D:\Program Files\python310\lib\site-packages\clip_retrieval\clip_back.py", line 688, in get with fs.open( File "D:\Program Files\python310\lib\site-packages\fsspec\spec.py", line 1293, in open f = self._open( File "D:\Program Files\python310\lib\site-packages\fsspec\implementations\http.py", line 358, in _open size = size or self.info(path, kwargs)["size"] File "D:\Program Files\python310\lib\site-packages\fsspec\asyn.py", line 118, in wrapper return sync(self.loop, func, args, kwargs) File "D:\Program Files\python310\lib\site-packages\fsspec\asyn.py", line 103, in sync raise return_result File "D:\Program Files\python310\lib\site-packages\fsspec\asyn.py", line 56, in _runner result[0] = await coro File "D:\Program Files\python310\lib\site-packages\fsspec\implementations\http.py", line 432, in _info raise FileNotFoundError(url) from exc FileNotFoundError: https://github.com/LAION-AI/aesthetic-predictor/blob/main/vit_b_32_embeddings/rating1.npy?raw=true

— Reply to this email directly, view it on GitHub https://github.com/rom1504/clip-retrieval/issues/374, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAR437VYLRTTML52RDOSPBDYYFKPFAVCNFSM6AAAAABEVSVTHKVHI2DSMVQWIX3LMV43ASLTON2WKOZSGE4DKNRYG4YTMMY . You are receiving this because you are subscribed to this thread.Message ID: @.***>

IF-chan commented 8 months ago

Is your network blocking GitHub? On Thu, Mar 14, 2024, 9:01 AM IF-chan @.> wrote: When I run clip-retrieval back --port 1234 --indices-paths indices_paths.json ,the error below occurred: starting boot of clip back warming up with batch size 1 on cpu done warming up in 0.9266810417175293s Traceback (most recent call last): File "D:\Program Files\python310\lib\site-packages\aiohttp\connector.py", line 992, in _wrap_create_connection return await self._loop.create_connection(args, kwargs) File "D:\Program Files\python310\lib\asyncio\base_events.py", line 1064, in create_connection raise exceptions[0] File "D:\Program Files\python310\lib\asyncio\base_events.py", line 1049, in create_connection sock = await self._connect_sock( File "D:\Program Files\python310\lib\asyncio\base_events.py", line 960, in _connect_sock await self.sock_connect(sock, address) File "D:\Program Files\python310\lib\asyncio\selector_events.py", line 500, in sock_connect return await fut File "D:\Program Files\python310\lib\asyncio\selector_events.py", line 535, in _sock_connect_cb raise OSError(err, f'Connect call failed {address}') TimeoutError: [Errno 10060] Connect call failed ('20.205.243.166', 443) The above exception was the direct cause of the following exception: Traceback (most recent call last): File "D:\Program Files\python310\lib\site-packages\fsspec\implementations\http.py", line 419, in _info await _file_info( File "D:\Program Files\python310\lib\site-packages\fsspec\implementations\http.py", line 828, in _file_info r = await session.get(url, allow_redirects=ar, kwargs) File "D:\Program Files\python310\lib\site-packages\aiohttp\client.py", line 578, in _request conn = await self._connector.connect( File "D:\Program Files\python310\lib\site-packages\aiohttp\connector.py", line 544, in connect proto = await self._create_connection(req, traces, timeout) File "D:\Program Files\python310\lib\site-packages\aiohttp\connector.py", line 911, in _createconnection , proto = await self._create_direct_connection(req, traces, timeout) File "D:\Program Files\python310\lib\site-packages\aiohttp\connector.py", line 1235, in _create_direct_connection raise last_exc File "D:\Program Files\python310\lib\site-packages\aiohttp\connector.py", line 1204, in _create_direct_connection transp, proto = await self._wrap_create_connection( File "D:\Program Files\python310\lib\site-packages\aiohttp\connector.py", line 1000, in _wrap_create_connection raise client_error(req.connection_key, exc) from exc aiohttp.client_exceptions.ClientConnectorError: Cannot connect to host github.com:443 ssl:default [Connect call failed ('20.205.243.166', 443)] The above exception was the direct cause of the following exception: Traceback (most recent call last): File "D:\Program Files\python310\lib\runpy.py", line 196, in _run_module_as_main return _run_code(code, main_globals, None, File "D:\Program Files\python310\lib\runpy.py", line 86, in run_code exec(code, run_globals) File "D:\Program Files\python310\Scripts\clip-retrieval.exe_main.py", line 7, in sys.exit(main()) File "D:\Program Files\python310\lib\site-packages\clip_retrieval\cli.py", line 18, in main fire.Fire( File "D:\Program Files\python310\lib\site-packages\fire\core.py", line 141, in Fire component_trace = _Fire(component, args, parsed_flag_args, context, name) File "D:\Program Files\python310\lib\site-packages\fire\core.py", line 475, in _Fire component, remaining_args = _CallAndUpdateTrace( File "D:\Program Files\python310\lib\site-packages\fire\core.py", line 691, in _CallAndUpdateTrace component = fn(*varargs, *kwargs) File "D:\Program Files\python310\lib\site-packages\clip_retrieval\clip_back.py", line 974, in clip_back clip_resources = load_clip_indices( File "D:\Program Files\python310\lib\site-packages\clip_retrieval\clip_back.py", line 947, in load_clip_indices clip_resources[name] = load_clip_index(clip_options) File "D:\Program Files\python310\lib\site-packages\clip_retrieval\clip_back.py", line 880, in load_clip_index get_aesthetic_embedding(clip_options.clip_model) if clip_options.provide_aesthetic_embeddings else None File "D:\Program Files\python310\lib\site-packages\clip_retrieval\clip_back.py", line 694, in get_aestheticembedding for in pool.imap_unordered(get, range(10)): File "D:\Program Files\python310\lib\multiprocessing\pool.py", line 873, in next raise value File "D:\Program Files\python310\lib\multiprocessing\pool.py", line 125, in worker result = (True, func(args, kwds)) File "D:\Program Files\python310\lib\site-packages\clip_retrieval\clip_back.py", line 688, in get with fs.open( File "D:\Program Files\python310\lib\site-packages\fsspec\spec.py", line 1293, in open f = self._open( File "D:\Program Files\python310\lib\site-packages\fsspec\implementations\http.py", line 358, in _open size = size or self.info(path, kwargs)["size"] File "D:\Program Files\python310\lib\site-packages\fsspec\asyn.py", line 118, in wrapper return sync(self.loop, func, *args, *kwargs) File "D:\Program Files\python310\lib\site-packages\fsspec\asyn.py", line 103, in sync raise return_result File "D:\Program Files\python310\lib\site-packages\fsspec\asyn.py", line 56, in _runner result[0] = await coro File "D:\Program Files\python310\lib\site-packages\fsspec\implementations\http.py", line 432, in _info raise FileNotFoundError(url) from exc FileNotFoundError: https://github.com/LAION-AI/aesthetic-predictor/blob/main/vit_b_32_embeddings/rating1.npy?raw=true — Reply to this email directly, view it on GitHub <#374>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAR437VYLRTTML52RDOSPBDYYFKPFAVCNFSM6AAAAABEVSVTHKVHI2DSMVQWIX3LMV43ASLTON2WKOZSGE4DKNRYG4YTMMY . You are receiving this because you are subscribed to this thread.Message ID: @.>

I have used vpn but it still occurs

Maxwells-Demons commented 8 months ago

Just download it manually and put it into specified dir

IF-chan commented 8 months ago

Just download it manually and put it into specified dir

specified dir? more details?

Maxwells-Demons commented 8 months ago

Simply clone the repo of https://github.com/LAION-AI/aesthetic-predictor, and change corresponding https links in clip_back.py into absolute path.