jina-ai / clip-as-service

πŸ„ Scalable embedding, reasoning, ranking for images and sentences with CLIP
https://clip-as-service.jina.ai
Other
12.46k stars 2.07k forks source link

An exception when executing "python -m clip_server" #682

Open ShangwenWang opened 2 years ago

ShangwenWang commented 2 years ago

Hi,

Sorry for disturbing you. When I tried to use the latest version of this tool, I met a problem. That is, when I tried to start the server side after installing, it raises a FileNotFound error. I checked that the file _executors/cliptorch.py does exist. So why this happens and how to handle it?

Below is the complete stack info. I would appreciate it if you could help me.

C:\Users\Senkaka>python -m clip_server β Ή 0/2 waiting clip_t gateway to be ready... clip_t/rep-0@3424[E]:fail to load file dependency clip_t/rep-0@3424[E]:ExecutorFailToLoad() during <class 'jina.serve.runtimes.worker.WorkerRuntime'> initialization add "--quiet-error" to suppress the exception details Traceback (most recent call last): File "C:\Users\Senkaka\AppData\Local\Programs\Python\Python310\lib\site-packages\jina\serve\runtimes\request_handlers\data_request_handler.py", line 48, in _load_executor self._executor: BaseExecutor = BaseExecutor.load_config( File "C:\Users\Senkaka\AppData\Local\Programs\Python\Python310\lib\site-packages\jina\jaml__init__.py", line 723, in load_config load_py_modules( File "C:\Users\Senkaka\AppData\Local\Programs\Python\Python310\lib\site-packages\jina\jaml\helper.py", line 269, in load_py_modules mod = [complete_path(m, extra_search_paths) for m in mod] File "C:\Users\Senkaka\AppData\Local\Programs\Python\Python310\lib\site-packages\jina\jaml\helper.py", line 269, in mod = [complete_path(m, extra_search_paths) for m in mod] File "C:\Users\Senkaka\AppData\Local\Programs\Python\Python310\lib\site-packages\jina\jaml\helper.py", line 206, in complete_path raise FileNotFoundError(f'can not find {path}') FileNotFoundError: can not find executors/clip_torch.py

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

Traceback (most recent call last): File "C:\Users\Senkaka\AppData\Local\Programs\Python\Python310\lib\site-packages\jina\orchestrate\pods__init.py", line 81, in run runtime = runtime_cls( File "C:\Users\Senkaka\AppData\Local\Programs\Python\Python310\lib\site-packages\jina\serve\runtimes\worker__init.py", line 35, in init super().init__(args, cancel_event, **kwargs) File "C:\Users\Senkaka\AppData\Local\Programs\Python\Python310\lib\site-packages\jina\serve\runtimes\asyncio.py", line 67, in init self._loop.run_until_complete(self.async_setup()) File "C:\Users\Senkaka\AppData\Local\Programs\Python\Python310\lib\asyncio\base_events.py", line 641, in run_until_complete return future.result() File "C:\Users\Senkaka\AppData\Local\Programs\Python\Python310\lib\site-packages\jina\serve\runtimes\worker__init__.py", line 41, in async_setup await self._async_setup_grpc_server() File "C:\Users\Senkaka\AppData\Local\Programs\Python\Python310\lib\site-packages\jina\serve\runtimes\worker__init.py", line 62, in _async_setup_grpc_server self._data_request_handler = DataRequestHandler(self.args, self.logger) File "C:\Users\Senkaka\AppData\Local\Programs\Python\Python310\lib\site-packages\jina\serve\runtimes\request_handlers\data_request_handler.py", line 40, in init__ self._load_executor(metrics_registry) File "C:\Users\Senkaka\AppData\Local\Programs\Python\Python310\lib\site-packages\jina\serve\runtimes\request_handlers\data_request_handler.py", line 73, in _load_executor raise ExecutorFailToLoad from ex jina.excepts.ExecutorFailToLoad β ¦ 1/2 waiting clip_t to be ready... Flow@10932[E]:Flow is aborted due to ['clip_t'] can not be started. ⠏ 2/2 waiting to be ready... gateway/rep-0@10932[W]:Pod was forced to close after 1 second. Graceful closing is not available on Windows. β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€ Traceback (most recent call last) ────────────────────────────────┐ β”‚ β”‚ β”‚ C:\Users\Senkaka\AppData\Local\Programs\Python\Python310\lib\runpy.py:196 in _run_module_as_main β”‚ β”‚ β”‚ β”‚ 193 β”‚ main_globals = sys.modules["main"].dict β”‚ β”‚ 194 β”‚ if alter_argv: β”‚ β”‚ 195 β”‚ β”‚ sys.argv[0] = mod_spec.origin β”‚ β”‚ > 196 β”‚ return _run_code(code, main_globals, None, β”‚ β”‚ 197 β”‚ β”‚ β”‚ β”‚ β”‚ "main", mod_spec) β”‚ β”‚ 198 β”‚ β”‚ 199 def run_module(mod_name, init_globals=None, β”‚ β”‚ C:\Users\Senkaka\AppData\Local\Programs\Python\Python310\lib\runpy.py:86 in _run_code β”‚ β”‚ β”‚ β”‚ 83 β”‚ β”‚ β”‚ β”‚ β”‚ loader = loader, β”‚ β”‚ 84 β”‚ β”‚ β”‚ β”‚ β”‚ package = pkg_name, β”‚ β”‚ 85 β”‚ β”‚ β”‚ β”‚ β”‚ spec = mod_spec) β”‚ β”‚ > 86 β”‚ exec(code, run_globals) β”‚ β”‚ 87 β”‚ return run_globals β”‚ β”‚ 88 β”‚ β”‚ 89 def _run_module_code(code, init_globals=None, β”‚ β”‚ β”‚ β”‚ C:\Users\Senkaka\AppData\Local\Programs\Python\Python310\lib\site-packages\clip_server__main. β”‚ β”‚ py:7 in β”‚ β”‚ β”‚ β”‚ 4 β”‚ β”‚ 5 if name == 'main__': β”‚ β”‚ 6 β”‚ f = Flow.load_config('torch-flow.yml' if len(sys.argv) == 1 else sys.argv[1]) β”‚ β”‚ > 7 β”‚ with f: β”‚ β”‚ 8 β”‚ β”‚ f.block() β”‚ β”‚ 9 β”‚ β”‚ β”‚ β”‚ C:\Users\Senkaka\AppData\Local\Programs\Python\Python310\lib\site-packages\jina\orchestrate\flow β”‚ β”‚ \base.py:1123 in enter β”‚ β”‚ β”‚ β”‚ 1120 β”‚ β”‚ β”‚ 1121 β”‚ def enter(self): β”‚ β”‚ 1122 β”‚ β”‚ with CatchAllCleanupContextManager(self): β”‚ β”‚ > 1123 β”‚ β”‚ β”‚ return self.start() β”‚ β”‚ 1124 β”‚ β”‚ β”‚ 1125 β”‚ def exit__(self, exc_type, exc_val, exc_tb): β”‚ β”‚ 1126 β”‚ β”‚ if hasattr(self, '_stop_event'): β”‚ β”‚ β”‚ β”‚ C:\Users\Senkaka\AppData\Local\Programs\Python\Python310\lib\site-packages\jina\orchestrate\flow β”‚ β”‚ \base.py:1178 in start β”‚ β”‚ β”‚ β”‚ 1175 β”‚ β”‚ β”‚ if not v.external: β”‚ β”‚ 1176 β”‚ β”‚ β”‚ β”‚ self.enter_context(v) β”‚ β”‚ 1177 β”‚ β”‚ β”‚ β”‚ > 1178 β”‚ β”‚ self._wait_until_all_ready() β”‚ β”‚ 1179 β”‚ β”‚ β”‚ β”‚ 1180 β”‚ β”‚ self._build_level = FlowBuildLevel.RUNNING β”‚ β”‚ 1181 β”‚ β”‚ β”‚ β”‚ C:\Users\Senkaka\AppData\Local\Programs\Python\Python310\lib\site-packages\jina\orchestrate\flow β”‚ β”‚ \base.py:1258 in _wait_until_all_ready β”‚ β”‚ β”‚ β”‚ 1255 β”‚ β”‚ β”‚ β”‚ β”‚ f'Flow is aborted due to {error_deployments} can not be started.' β”‚ β”‚ 1256 β”‚ β”‚ β”‚ β”‚ ) β”‚ β”‚ 1257 β”‚ β”‚ β”‚ β”‚ self.close() β”‚ β”‚ > 1258 β”‚ β”‚ β”‚ β”‚ raise RuntimeFailToStart β”‚ β”‚ 1259 β”‚ β”‚ β”‚ β”‚ 1260 β”‚ β”‚ if addr_table: β”‚ β”‚ 1261 β”‚ β”‚ β”‚ print( β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ RuntimeFailToStart

numb3r3 commented 2 years ago

ah, maybe this is the bug on Windows we did not observe before. Thanks for your report, we will look into it. BTW., what's the clip_server version are you using?

pip show clip_server
ShangwenWang commented 2 years ago

Thanks for your quick response.

Actually, I now turn to use the old version "bert_as_service" and successfully opened the server. It is sad that my laptop cannot open the clip_server now. But anyway, thanks for your help.

JosephFATucker commented 2 years ago

ah, maybe this is the bug on Windows we did not observe before. Thanks for your report, we will look into it. BTW., what's the clip_server version are you using?

pip show clip_server

I'm experiencing this same issue. My "pip show clip_server" displays this:

Name: clip-server
Version: 0.2.0
Summary: Embed images and sentences into fixed-length vectors via CLIP
Home-page: https://github.com/jina-ai/clip-as-service
Author: Jina AI
Author-email: hello@jina.ai
License: Apache 2.0
Location: c:\users\MyUserNameGoesHere\appdata\local\packages\pythonsoftwarefoundation.python.3.10_qbz5n2kfra8p0\localcache\local-packages\python310\site-packages
Requires: docarray, ftfy, jina, regex, torch, torchvision
Required-by:
hanxiao commented 2 years ago

@numb3r3 could you take a look with the core team, I'm afraid that complete_path function from Jina core is not really Windows-friendly, i.e. it doesn't work.

numb3r3 commented 2 years ago

I'm looking into it. this is related spawn context.

numb3r3 commented 2 years ago

@ShangwenWang @JosephFATucker windows supported in latest jina and clip-as-service:

pip install --upgrade jina>=3.3.4 clip-server>=0.2.1
JosephFATucker commented 2 years ago

@ShangwenWang @JosephFATucker windows supported in latest jina and clip-as-service:

pip install --upgrade jina>=3.3.4 clip-server>=0.2.1

Thanks, the update works and I was able to run

python -m clip_server

with no errors.

numb3r3 commented 2 years ago

windows supporting problem seems to have been addressed in the latest version (jina>=3.3.4, clip-server>=0.2.1). I will close this issue.

161424 commented 2 years ago

I have a similar problem

python -m clip_server β ‡ Waiting clip_t gateway... ━━━━━━━━━━━━━╺━━━━━━━━━━━━━━━━━━━━━━━━━━ 1/3 0:00:02ERROR clip_t/rep-0@12624 fail to load file dependency [10/10/22 16:31:37] β ™ Waiting clip_t gateway... ━━━━━━━━━━━━━╺━━━━━━━━━━━━━━━━━━━━━━━━━━ 1/3 0:00:02ERROR clip_t/rep-1@25224 fail to load file dependency [10/10/22 16:31:38] ERROR clip_t/rep-0@12624 FileNotFoundError('can not find clip_server.executors.clip_torch') during [10/10/22 16:31:37] <class 'jina.serve.runtimes.worker.WorkerRuntime'> initialization add "--quiet-error" to suppress the exception details

pip show clip_server Name: clip-server Version: 0.7.0 Summary: Embed images and sentences into fixed-length vectors via CLIP Home-page: https://github.com/jina-ai/clip-as-service Author: Jina AI Author-email: hello@jina.ai License: Apache 2.0 Location: d:\program_data\anaconda3\lib\site-packages Requires: ftfy, jina, open-clip-torch, prometheus-client, regex, torch, torchvision Required-by:

I think it should be a software compatibility problem, but I don't know which one. Because it can work normally before

numb3r3 commented 2 years ago

@161424 Could you provide more context for your problem? Are you working on windows? What's the output of jina -vf?

161424 commented 2 years ago

jina -vf

161424 commented 2 years ago

At first, it was jina/jmal/helper.py 227 line parameters of _ p. When Parallel operation run p, the first two paths are normal as absolute path of the torch-flow. yml, and the last ones are None. This is the initial error. Take me P is specified as torch-flow.yml path, the input parameter spec of 126 lines of modules in the Jina/Importer is null, and an error is reported. Spec_ name and absolute_paths point to the absolute paths of torch-flow. yml and absolute path of the torch-flow. yml , but the output of the spec is None. It's beyond my ability to get here

numb3r3 commented 2 years ago

@161424 Thanks for your information, that helps us a lot. We will look into it.

161424 commented 2 years ago

The output singularities of the parallel run of "complete_path" are

”torch-flow.yml ['D:\Program_Data\Anaconda3\lib\site-packages\clip_server'] True {"jtype": "CLIPEncoder", "metas": {"py_modules": ["clip_server.executors.clip_torch"]}} None True clip_server.executors.clip_torch None Trueβ€œγ€‚

Is there a problem with my path?

161424 commented 2 years ago

A few days later, I still haven't solved this problem. The following is all the error information

[ 20:37:15 ] D:....\Scripts ❯ python -m clip_server β ‡ Waiting clip_t gateway... ━━━━━━━━━━━━━╺━━━━━━━━━━━━━━━━━━━━━━━━━━ 1/3 0:00:03ERROR clip_t/rep-0@35540 fail to load file dependency [10/19/22 20:37:28] ERROR clip_t/rep-0@35540 FileNotFoundError('can not find clip_server.executors.clip_torch') during [10/19/22 20:37:28] <class 'jina.serve.runtimes.worker.WorkerRuntime'> initialization add "--quiet-error" to suppress the exception details Traceback (most recent call last): File "D:\IDE\Anaconda3\lib\site-packages\jina\orchestrate\pods__init.py", line 74, in run runtime = runtime_cls( File "D:\IDE\Anaconda3\lib\site-packages\jina\serve\runtimes\worker__init.py", line 33, in init super().init(args, **kwargs) File "D:\IDE\Anaconda3\lib\site-packages\jina\serve\runtimes\asyncio.py", line 70, in init__ self._loop.run_until_complete(self.async_setup()) File "D:\IDE\Anaconda3\lib\asyncio\base_events.py", line 647, in run_until_complete return future.result() File "D:\IDE\Anaconda3\lib\site-packages\jina\serve\runtimes\worker__init__.py", line 81, in async_setup self._data_request_handler = DataRequestHandler( File "D:\IDE\Anaconda3\lib\site-packages\jina\serve\runtimes\request_handlers\data_request_handle… line 44, in init self._load_executor(metrics_registry) File "D:\IDE\Anaconda3\lib\site-packages\jina\serve\runtimes\request_handlers\data_request_handle… line 94, in _load_executor self._executor: BaseExecutor = BaseExecutor.load_config( File "D:\IDE\Anaconda3\lib\site-packages\jina\jaml__init__.py", line 730, in load_config load_py_modules( File "D:\IDE\Anaconda3\lib\site-packages\jina\jaml\helper.py", line 285, in load_py_modules PathImporter.add_modules(*mod) File "D:\IDE\Anaconda3\lib\site-packages\jina\importer.py", line 159, in add_modules _path_import(complete_path(m)) File "D:\IDE\Anaconda3\lib\site-packages\jina\jaml\helper.py", line 229, in complete_path raise FileNotFoundError(f'can not find {path}') FileNotFoundError: can not find clip_server.executors.clip_torch ERROR Flow@41968 Flow is aborted due to ['clip_t'] can not be started. [10/19/22 20:37:30] WARNI… gateway/rep-0@41968 Pod was forced to close after 1 second. Graceful closing is not available [10/19/22 20:37:31] on Windows. Traceback (most recent call last): File "D:\IDE\Anaconda3\lib\runpy.py", line 197, in _run_module_as_main return _run_code(code, main_globals, None, File "D:\IDE\Anaconda3\lib\runpy.py", line 87, in _run_code exec(code, run_globals) File "D:\IDE\Anaconda3\lib\site-packages\clip_server\main.py", line 25, in with f: File "D:\IDE\Anaconda3\lib\site-packages\jina\orchestrate\flow\base.py", line 1474, in enter__ return self.start() File "D:\IDE\Anaconda3\lib\site-packages\jina\orchestrate\flow\builder.py", line 33, in arg_wrapper return func(self, *args, **kwargs) File "D:\IDE\Anaconda3\lib\site-packages\jina\orchestrate\flow\base.py", line 1538, in start self._wait_until_all_ready() File "D:\IDE\Anaconda3\lib\site-packages\jina\orchestrate\flow\base.py", line 1637, in _wait_until_all_ready raise RuntimeFailToStart jina.excepts.RuntimeFailToStart

When using the latest clip-server, because my sys.path is disk D, there will be a "DLL load failed while importing win32api:" error. The solution is as follows: https://blog.csdn.net/ljr_123/article/details/104693372

161424 commented 2 years ago

When I convert clip_server.executors.clip_torch to executors\clip_torch.py, I am prompted "ImportError: DLL load failed while importing _imaging: the specified module cannot be found." So pip uninstall pillow and pip install pillow , 'Downloading https://pypi.tuna.tsinghua.edu.cn/packages/19/3f/b4d4bcf05dbcbe07f2e9613a8f4180c297395e73a91d8ad22c32c6624f8c/Pillow-9.2.0-cp39-cp39-win_amd64.whl (3.3 MB)β€˜

The program is ready to run

flamz3d commented 1 year ago

I get a similar problem on linux Debian

       FileNotFoundError: can not find clip_server.executors.clip_torch                                                          
ERROR  Flow@18076 Flow is aborted due to ['clip_t'] can not be started. 
numb3r3 commented 1 year ago

@flamz3d Could you provide more context for your problem? what's the output of jina -vf on your side?

numb3r3 commented 1 year ago

And what's more, what's the output of pip show clip_server

flamz3d commented 1 year ago

To reproduce, I created a clean py3.7 environment via conda on PRETTY_NAME="Debian GNU/Linux 10 (buster)" , then ran

pip install clip-server
python -m clip_server

output of pip show

Name: pip
Version: 22.3.1
Summary: The PyPA recommended tool for installing Python packages.
Home-page: https://pip.pypa.io/
Author: The pip developers
Author-email: distutils-sig@python.org
License: MIT
Location: /opt/conda/envs/jina/lib/python3.7/site-packages
Requires: 
Required-by: 
---
Name: clip-server
Version: 0.8.1
Summary: Embed images and sentences into fixed-length vectors via CLIP
Home-page: https://github.com/jina-ai/clip-as-service
Author: Jina AI
Author-email: hello@jina.ai
License: Apache 2.0
Location: /opt/conda/envs/jina/lib/python3.7/site-packages
Requires: ftfy, jina, open-clip-torch, prometheus-client, regex, torch, torchvision
Required-by:

output of python -m clip_server

β ‹ Waiting ... ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 0/0 -:--:--ERROR  clip_t/rep-0@2172 fail to load file dependency                                       [11/23/22 12:45:01]
ERROR  clip_t/rep-0@2172 FileNotFoundError('can not find clip_server.executors.clip_torch') [11/23/22 12:45:01]
       during <class 'jina.serve.runtimes.worker.WorkerRuntime'> initialization                                
        add "--quiet-error" to suppress the exception details                                                  
       Traceback (most recent call last):                                                                      
         File                                                                                                  
       "/opt/conda/envs/jina/lib/python3.7/site-packages/jina/orchestrate/pods/__init__.py…                    
       line 75, in run                                                                                         
           args=args,                                                                                          
         File                                                                                                  
       "/opt/conda/envs/jina/lib/python3.7/site-packages/jina/serve/runtimes/worker/__init…                    
       line 36, in __init__                                                                                    
           super().__init__(args, **kwargs)                                                                    
         File                                                                                                  
       "/opt/conda/envs/jina/lib/python3.7/site-packages/jina/serve/runtimes/asyncio.py",                      
       line 80, in __init__                                                                                    
           self._loop.run_until_complete(self.async_setup())                                                   
         File "/opt/conda/envs/jina/lib/python3.7/asyncio/base_events.py", line 587, in                        
       run_until_complete                                                                                      
           return future.result()                                                                              
         File                                                                                                  
       "/opt/conda/envs/jina/lib/python3.7/site-packages/jina/serve/runtimes/worker/__init…                    
       line 106, in async_setup                                                                                
           self.meter_provider,                                                                                
         File                                                                                                  
       "/opt/conda/envs/jina/lib/python3.7/site-packages/jina/serve/runtimes/request_handl…                    
       line 52, in __init__                                                                                    
           meter_provider=meter_provider,                                                                      
         File                                                                                                  
       "/opt/conda/envs/jina/lib/python3.7/site-packages/jina/serve/runtimes/request_handl…                    
       line 155, in _load_executor                                                                             
           extra_search_paths=self.args.extra_search_paths,                                                    
         File "/opt/conda/envs/jina/lib/python3.7/site-packages/jina/jaml/__init__.py",                        
       line 734, in load_config                                                                                
           else _extra_search_paths,                                                                           
         File "/opt/conda/envs/jina/lib/python3.7/site-packages/jina/jaml/helper.py", line                     
       285, in load_py_modules                                                                                 
           PathImporter.add_modules(*mod)                                                                      
         File "/opt/conda/envs/jina/lib/python3.7/site-packages/jina/importer.py", line                        
       159, in add_modules                                                                                     
           _path_import(complete_path(m))                                                                      
         File "/opt/conda/envs/jina/lib/python3.7/site-packages/jina/jaml/helper.py", line                     
       229, in complete_path                                                                                   
           raise FileNotFoundError(f'can not find {path}')                                                     
       FileNotFoundError: can not find clip_server.executors.clip_torch                                        
ERROR  Flow@2164 Flow is aborted due to ['clip_t'] can not be started.                      [11/23/22 12:45:02]
Traceback (most recent call last):
  File "/opt/conda/envs/jina/lib/python3.7/runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "/opt/conda/envs/jina/lib/python3.7/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/opt/conda/envs/jina/lib/python3.7/site-packages/clip_server/__main__.py", line 25, in <module>
    with f:
  File "/opt/conda/envs/jina/lib/python3.7/site-packages/jina/orchestrate/flow/base.py", line 1556, in __enter__
    return self.start()
  File "/opt/conda/envs/jina/lib/python3.7/site-packages/jina/orchestrate/flow/builder.py", line 33, in arg_wrapper
    return func(self, *args, **kwargs)
  File "/opt/conda/envs/jina/lib/python3.7/site-packages/jina/orchestrate/flow/base.py", line 1620, in start
    self._wait_until_all_ready()
  File "/opt/conda/envs/jina/lib/python3.7/site-packages/jina/orchestrate/flow/base.py", line 1719, in _wait_until_all_ready
    raise RuntimeFailToStart
jina.excepts.RuntimeFailToStart
ZiniuYu commented 1 year ago

@flamz3d What's your output of jina -vf?

Justin-sky commented 1 year ago

I have the error too: justin@DESKTOP-ROS689L:~$ python3.7 -m clip_server ERROR clip_t/rep-0@14397 fail to load file dependency [11/02/23 16:47:37] ERROR clip_t/rep-0@14397 FileNotFoundError('can not find clip_server.executors.clip_torch') during 'WorkerRuntime' initialization add "--quiet-error" to suppress the exception details Traceback (most recent call last): File "/usr/local/src/python37/lib/python3.7/site-packages/jina/serve/executors/run.py", line 144, in run signal_handlers_installed_event=is_signal_handlers_installed File "/usr/local/src/python37/lib/python3.7/site-packages/jina/serve/runtimes/asyncio.py", line 92, in init self._loop.run_until_complete(self.async_setup()) File "/usr/local/src/python37/lib/python3.7/asyncio/base_events.py", line 579, in run_until_complete return future.result() File "/usr/local/src/python37/lib/python3.7/site-packages/jina/serve/runtimes/asyncio.py", line 309, in async_setup self.server = self._get_server() File "/usr/local/src/python37/lib/python3.7/site-packages/jina/serve/runtimes/asyncio.py", line 221, in _get_server proxy=getattr(self.args, 'proxy', None), File "/usr/local/src/python37/lib/python3.7/site-packages/jina/serve/runtimes/servers/grpc.py", line 34, in init super().init(kwargs) File "/usr/local/src/python37/lib/python3.7/site-packages/jina/serve/runtimes/servers/init.py", line 63, in init ] = (req_handler or self._get_request_handler()) File "/usr/local/src/python37/lib/python3.7/site-packages/jina/serve/runtimes/servers/init.py", line 100, in _get_request_handler works_as_load_balancer=self.works_as_load_balancer, File "/usr/local/src/python37/lib/python3.7/site-packages/jina/serve/runtimes/worker/request_handling.py", line 142, in init meter_provider=meter_provider, File "/usr/local/src/python37/lib/python3.7/site-packages/jina/serve/runtimes/worker/request_handling.py", line 392, in _load_executor extra_search_paths=self.args.extra_search_paths, File "/usr/local/src/python37/lib/python3.7/site-packages/jina/jaml/init.py", line 746, in load_config else _extra_search_paths, File "/usr/local/src/python37/lib/python3.7/site-packages/jina/jaml/helper.py", line 285, in load_py_modules PathImporter.add_modules(mod) File "/usr/local/src/python37/lib/python3.7/site-packages/jina/importer.py", line 182, in add_modules _path_import(complete_path(m)) File "/usr/local/src/python37/lib/python3.7/site-packages/jina/jaml/helper.py", line 229, in complete_path raise FileNotFoundError(f'can not find {path}') FileNotFoundError: can not find clip_server.executors.clip_torch ERROR Flow@14373 An exception occurred: [11/02/23 16:47:37] ERROR Flow@14373 Flow is aborted due to ['clip_t', 'gateway'] can not be started. E1102 16:47:37.327415100 14398 socket_utils_common_posix.cc:223] check for SO_REUSEPORT: {"created":"@1698914857.327366700","description":"Protocol not available","errno":92,"file":"src/core/lib/iomgr/socket_utils_common_posix.cc","file_line":202,"os_error":"Protocol not available","syscall":"getsockopt(SO_REUSEPORT)"} INFO gateway/rep-0@14398 start server bound to 0.0.0.0:51000 [11/02/23 16:47:37] Traceback (most recent call last): File "/usr/local/src/python37/lib/python3.7/runpy.py", line 193, in _run_module_as_main "main", mod_spec) File "/usr/local/src/python37/lib/python3.7/runpy.py", line 85, in _run_code exec(code, run_globals) File "/usr/local/src/python37/lib/python3.7/site-packages/clip_server/main.py", line 25, in with f: File "/usr/local/src/python37/lib/python3.7/site-packages/jina/orchestrate/orchestrator.py", line 14, in enter return self.start() File "/usr/local/src/python37/lib/python3.7/site-packages/jina/orchestrate/flow/builder.py", line 33, in arg_wrapper return func(self, args, kwargs) File "/usr/local/src/python37/lib/python3.7/site-packages/jina/orchestrate/flow/base.py", line 1846, in start self._wait_until_all_ready() File "/usr/local/src/python37/lib/python3.7/site-packages/jina/orchestrate/flow/base.py", line 2012, in _wait_until_all_ready raise RuntimeFailToStart jina.excepts.RuntimeFailToStart

Justin-sky commented 1 year ago

justin@DESKTOP-ROS689L:~$ python3.7 -m jina -vf

Justin-sky commented 1 year ago

justin@DESKTOP-ROS689L:~$ pip show clip_server Name: clip-server Version: 0.8.2 Summary: Embed images and sentences into fixed-length vectors via CLIP Home-page: https://github.com/jina-ai/clip-as-service Author: Jina AI Author-email: hello@jina.ai License: Apache 2.0 Location: /usr/local/src/python37/lib/python3.7/site-packages Requires: docarray, ftfy, jina, open-clip-torch, prometheus-client, regex, torch, torchvision Required-by: