Closed wangdabee closed 1 year ago
towhee 版本为 1.1.1 timm 版本为 0.9.2
/assign @Chiiizzzy
Hi, please try to clear your isc operator cache in .towhee folder, by default the path should be ~/.towhee/operators/image-embedding/isc
. The model has been renamed in timm of version 0.9.0 and above, we've just updated the operator accordingly. @wangdabee
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. Rotten issues close after 30d of inactivity. Close the stale issues and pull requests after 7 days of inactivity. Reopen the issue with /reopen
.
Is there an existing issue for this?
Current Behavior
运行 video embedding 以下示例代码时:
from towhee import AutoPipes, AutoConfig
emb_conf = AutoConfig.load_config('video_embedding') emb_conf.collection='video_copy_detections' emb_conf.start_time = None emb_conf.end_time = None emb_conf.device = -1 # 0
use leveldb
emb_conf.leveldb_path = 'url_vec.db'
emb_conf.hbase_table='video_copy_detection' emb_pipe = AutoPipes.pipeline('video_embedding', emb_conf)
报以下错误:
Traceback (most recent call last): File "test.py", line 13, in
emb_pipe = AutoPipes.pipeline('video_embedding', emb_conf)
File "/home/zg/anaconda-zg/anaconda3/envs/wd/lib/python3.7/site-packages/towhee/runtime/auto_pipes.py", line 83, in pipeline
return AutoPipes._PIPES_DEF[name](*args, kwargs)
File "/home/zg/anaconda-zg/anaconda3/envs/wd/lib/python3.7/site-packages/towhee/runtime/auto_pipes.py", line 68, in wrapper
return pipe_def(*args, *kwargs)
File "/home/zg/anaconda-zg/anaconda3/envs/wd/lib/python3.7/site-packages/towhee/pipelines/video_embedding.py", line 145, in video_embedding
return _video_embedding(decode_op, emb_op, milvus_op, kv_op, norm_op, allow_triton, config.device)
File "/home/zg/anaconda-zg/anaconda3/envs/wd/lib/python3.7/site-packages/towhee/pipelines/video_embedding.py", line 89, in _video_embedding
return _unnorm()
File "/home/zg/anaconda-zg/anaconda3/envs/wd/lib/python3.7/site-packages/towhee/pipelines/video_embedding.py", line 83, in _unnorm
.map(('url', 'video_emb'), ('insert_status'), kv_op)
File "/home/zg/anaconda-zg/anaconda3/envs/wd/lib/python3.7/site-packages/towhee/runtime/pipeline.py", line 101, in output
run_pipe.preload()
File "/home/zg/anaconda-zg/anaconda3/envs/wd/lib/python3.7/site-packages/towhee/runtime/runtime_pipeline.py", line 153, in preload
return _Graph(self._dag_repr.nodes, self._dag_repr.edges, self._operator_pool, self._thread_pool, TimeProfiler(False))
File "/home/zg/anaconda-zg/anaconda3/envs/wd/lib/python3.7/site-packages/towhee/runtime/runtime_pipeline.py", line 67, in init
self._initialize()
File "/home/zg/anaconda-zg/anaconda3/envs/wd/lib/python3.7/site-packages/towhee/runtime/runtime_pipeline.py", line 83, in _initialize
raise RuntimeError(node.err_msg)
RuntimeError: Node-image-embedding/isc-1 runs failed, error msg: Create image-embedding/isc-1 operator image-embedding/isc:main with args None and kws {'img_size': 512, 'device': 'cpu'} failed, err: 'NoneType' object is not subscriptable, Traceback (most recent call last):
File "/home/zg/anaconda-zg/anaconda3/envs/wd/lib/python3.7/site-packages/towhee/runtime/nodes/node.py", line 94, in initialize
self._node_repr.op_info.latest,
File "/home/zg/anaconda-zg/anaconda3/envs/wd/lib/python3.7/site-packages/towhee/runtime/operator_manager/operator_pool.py", line 106, in acquire_op
op = self._op_loader.load_operator(hub_op_id, op_args, op_kws, tag, latest)
File "/home/zg/anaconda-zg/anaconda3/envs/wd/lib/python3.7/site-packages/towhee/runtime/operator_manager/operator_loader.py", line 154, in load_operator
op = factory(function, arg, kws, tag, latest)
File "/home/zg/anaconda-zg/anaconda3/envs/wd/lib/python3.7/site-packages/towhee/runtime/operator_manager/operator_loader.py", line 137, in _load_operator_from_hub
return self._load_operator_from_path(path, function, arg, kws, tag)
File "/home/zg/anaconda-zg/anaconda3/envs/wd/lib/python3.7/site-packages/towhee/runtime/operator_manager/operator_loader.py", line 125, in _load_operator_from_path
return self._instance_operator(op, arg, kws) if op is not None else None
File "/home/zg/anaconda-zg/anaconda3/envs/wd/lib/python3.7/site-packages/towhee/runtime/operator_manager/operator_loader.py", line 163, in _instance_operator
return op(arg, kws) if kws is not None else op(*arg)
File "/root/.towhee/operators/image-embedding/isc/versions/main/init.py", line 19, in isc
return Isc(**kwargs)
File "/root/.towhee/operators/image-embedding/isc/versions/main/isc.py", line 99, in init
interpolation=self.config['interpolation'],
TypeError: 'NoneType' object is not subscriptable
最后定位到是 timm 没有 tf_efficientnetv2_m_in21ft1k 模型 ,导致 self.config 为 None
Expected Behavior
No response
Steps To Reproduce
No response
Environment
Anything else?
No response