TypeError Traceback (most recent call last)
Cell In[5], line 15
11 yield item
13 # Embedding pipeline
14 p_embed = (
---> 15 pipe.input('src')
16 .flat_map('src', 'img_path', load_image)
17 .map('img_path', 'img', ops.image_decode())
18 .map('img', 'vec', ops.image_embedding.timm(model_name=MODEL, device=DEVICE))
19 )
File ~/Desktop/Projects/vector_database/milvus/venv/lib/python3.8/site-packages/towhee/runtime/pipeline.py:143, in Pipeline.map(self, input_schema, output_schema, fn, config)
141 uid = uuid.uuid4().hex
142 fn_action = self._to_action(fn)
--> 143 dag_dict = deepcopy(self._dag)
144 dag_dict[uid] = {
145 'inputs': input_schema,
146 'outputs': output_schema,
(...)
153 'next_nodes': [],
154 }
155 dag_dict[self._clo_node]['next_nodes'].append(uid)
File /usr/lib/python3.8/copy.py:146, in deepcopy(x, memo, _nil)
144 copier = _deepcopy_dispatch.get(cls)
145 if copier is not None:
--> 146 y = copier(x, memo)
147 else:
148 if issubclass(cls, type):
File /usr/lib/python3.8/copy.py:230, in _deepcopy_dict(x, memo, deepcopy)
228 memo[id(x)] = y
229 for key, value in x.items():
--> 230 y[deepcopy(key, memo)] = deepcopy(value, memo)
231 return y
File /usr/lib/python3.8/copy.py:146, in deepcopy(x, memo, _nil)
144 copier = _deepcopy_dispatch.get(cls)
145 if copier is not None:
--> 146 y = copier(x, memo)
147 else:
148 if issubclass(cls, type):
File /usr/lib/python3.8/copy.py:230, in _deepcopy_dict(x, memo, deepcopy)
228 memo[id(x)] = y
229 for key, value in x.items():
--> 230 y[deepcopy(key, memo)] = deepcopy(value, memo)
231 return y
File /usr/lib/python3.8/copy.py:146, in deepcopy(x, memo, _nil)
144 copier = _deepcopy_dispatch.get(cls)
145 if copier is not None:
--> 146 y = copier(x, memo)
147 else:
148 if issubclass(cls, type):
File /usr/lib/python3.8/copy.py:230, in _deepcopy_dict(x, memo, deepcopy)
228 memo[id(x)] = y
229 for key, value in x.items():
--> 230 y[deepcopy(key, memo)] = deepcopy(value, memo)
231 return y
File /usr/lib/python3.8/copy.py:172, in deepcopy(x, memo, _nil)
170 y = x
171 else:
--> 172 y = _reconstruct(x, memo, *rv)
174 # If is its own copy, don't memoize.
175 if y is not x:
File /usr/lib/python3.8/copy.py:270, in _reconstruct(x, memo, func, args, state, listiter, dictiter, deepcopy)
268 if state is not None:
269 if deep:
--> 270 state = deepcopy(state, memo)
271 if hasattr(y, 'setstate'):
272 y.setstate(state)
File /usr/lib/python3.8/copy.py:146, in deepcopy(x, memo, _nil)
144 copier = _deepcopy_dispatch.get(cls)
145 if copier is not None:
--> 146 y = copier(x, memo)
147 else:
148 if issubclass(cls, type):
File /usr/lib/python3.8/copy.py:230, in _deepcopy_dict(x, memo, deepcopy)
228 memo[id(x)] = y
229 for key, value in x.items():
--> 230 y[deepcopy(key, memo)] = deepcopy(value, memo)
231 return y
File /usr/lib/python3.8/copy.py:161, in deepcopy(x, memo, _nil)
159 reductor = getattr(x, "reduce_ex", None)
160 if reductor is not None:
--> 161 rv = reductor(4)
162 else:
163 reductor = getattr(x, "reduce", None)
TypeError: cannot pickle '_thread.lock' object