-
Notifications
You must be signed in to change notification settings - Fork 113
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
RuntimeError: Loading operator with error:Load operator failed #236
Comments
Any detail logs? |
It is saying I don't have required privilege, do I need Admin privileges to install it |
It may be that the Window has disabled the symlink: https://stackoverflow.com/questions/32877260/privlege-error-trying-to-create-symlink-using-python-on-windows-10 |
I tried this, but I can't do this. My system admin blocks it. Is there any other way |
yes follow this tut https://youtu.be/n_mmsnZ9BVE?si=xQQ7sKN8P-vCzDUk |
Hello Everyone,
I am new to using Towhee, I am trying to run a basic code provided in their user guide
I am trying to run this code
`from towhee import ops, pipe, DataCollection
p = (
pipe.input('file_name')
.map('file_name', 'img', ops.image_decode.cv2())
.map('img', 'vec', ops.image_text_embedding.clip(model_name='clip_vit_base_patch32', modality='image'))
.map('vec', 'vec', ops.towhee.np_normalize())
.map(('vec', 'file_name'), (), ops.ann_insert.faiss_index('./faiss', 512))
.output()
)
for f_name in ['https://raw.githubusercontent.com/towhee-io/towhee/main/assets/dog1.png',
'https://raw.githubusercontent.com/towhee-io/towhee/main/assets/dog2.png',
'https://raw.githubusercontent.com/towhee-io/towhee/main/assets/dog3.png']:
p(f_name)
p.flush()
search image by text
decode = ops.image_decode.cv2('rgb')
p = (
pipe.input('text')
.map('text', 'vec', ops.image_text_embedding.clip(model_name='clip_vit_base_patch32', modality='text'))
.map('vec', 'vec', ops.towhee.np_normalize())
# faiss op result format: [[id, score, [file_name], ...]
.map('vec', 'row', ops.ann_search.faiss_index('./faiss', 3))
.map('row', 'images', lambda x: [decode(item[2][0]) for item in x])
.output('text', 'images')
)
DataCollection(p('a cat')).show()`
But I am getting this error
`RuntimeError Traceback (most recent call last)
Cell In[1], line 9
1 from towhee import ops, pipe, DataCollection
2 # create image embeddings and build index
3 p = (
4 pipe.input('file_name')
5 .map('file_name', 'img', ops.image_decode.cv2())
6 .map('img', 'vec', ops.image_text_embedding.clip(model_name='clip_vit_base_patch32', modality='image'))
7 .map('vec', 'vec', ops.towhee.np_normalize())
8 .map(('vec', 'file_name'), (), ops.ann_insert.faiss_index('[./faiss], 512))
----> 9 .output()
10 )
12 for f_name in ['https://raw.githubusercontent.com/towhee-io/towhee/main/assets/dog1.png',
13 'https://raw.githubusercontent.com/towhee-io/towhee/main/assets/dog2.png',
14 'https://raw.githubusercontent.com/towhee-io/towhee/main/assets/dog3.png']:
15 p(f_name)
File c:\Anaconda3\envs\py310\lib\site-packages\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 c:\Anaconda3\envs\py310\lib\site-packages\towhee\runtime\runtime_pipeline.py:153, in RuntimePipeline.preload(self)
...
op = self._op_loader.load_operator(hub_op_id, op_args, op_kws, tag, latest)
File "c:\Anaconda3\envs\py310\lib\site-packages\towhee\runtime\operator_manager\operator_loader.py", line 158, in load_operator
raise RuntimeError('Load operator failed')
RuntimeError: Load operator failed`
Can some one let me know what is wrong
The text was updated successfully, but these errors were encountered: