towhee icon indicating copy to clipboard operation
towhee copied to clipboard

[Bug]: grcpio VersionConflict

Open shiyu22 opened this issue 3 years ago • 1 comments

Is there an existing issue for this?

  • [X] I have searched the existing issues

Current Behavior

When I start triton server, and run the following code

res = towhee.dc['path'](['https://github.com/towhee-io/towhee/blob/main/towhee_logo.png?raw=true']) \
    .remote['path', 'vec'](url='172.16.70.4:8001', mode='infer', protocol='grpc') \
    .ann_insert.milvus['vec','mr'](uri='tcp://172.16.70.4:19530/triton')

It will show the VersionConflict error:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Users/chenshiyu/workspace/git/towhee/towhee/hparam/hyperparameter.py", line 200, in __call__
    return self._func(*args, **kws)
  File "/Users/chenshiyu/workspace/git/towhee/towhee/functional/data_collection.py", line 143, in wrapper
    return self.map(op)
  File "/Users/chenshiyu/workspace/git/towhee/towhee/functional/data_collection.py", line 587, in map
    arg[0].__check_init__()
  File "/Users/chenshiyu/workspace/git/towhee/towhee/engine/factory.py", line 94, in __check_init__
    self._op = op(self._name,
  File "/Users/chenshiyu/workspace/git/towhee/towhee/engine/factory.py", line 61, in op
    return loader.load_operator(operator_src, arg, kwargs, tag)
  File "/Users/chenshiyu/workspace/git/towhee/towhee/engine/operator_loader.py", line 162, in load_operator
    op = factory(function, arg, kws, tag)
  File "/Users/chenshiyu/workspace/git/towhee/towhee/engine/operator_loader.py", line 141, in load_operator_from_cache
    return self.load_operator_from_path(path, arg, kws)
  File "/Users/chenshiyu/workspace/git/towhee/towhee/engine/operator_loader.py", line 101, in load_operator_from_path
    pkg_resources.require(req)
  File "/Users/chenshiyu/miniconda3/envs/shiyu/lib/python3.9/site-packages/pkg_resources/__init__.py", line 897, in require
    needed = self.resolve(parse_requirements(requirements))
  File "/Users/chenshiyu/miniconda3/envs/shiyu/lib/python3.9/site-packages/pkg_resources/__init__.py", line 788, in resolve
    raise VersionConflict(dist, req).with_context(dependent_req)
pkg_resources.ContextualVersionConflict: (grpcio 1.41.0 (/Users/chenshiyu/miniconda3/envs/shiyu/lib/python3.9/site-packages), Requirement.parse('grpcio>=1.47.0'), {'pymilvus'})

And when I reinstall grpcio>=1.47.0 it will show that tritonclient requires grpcio==1.41.0.

Expected Behavior

No response

Steps To Reproduce

No response

Environment

- Towhee version(e.g. v0.1.3 or 8b23a93):
- OS(Ubuntu or CentOS):
- CPU/Memory:
- GPU:
- Others:

Anything else?

No response

shiyu22 avatar Aug 26 '22 02:08 shiyu22

There is a PR to solve the VersionConflict, maybe we can use it.

shiyu22 avatar Aug 26 '22 02:08 shiyu22

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.

stale[bot] avatar Sep 26 '22 11:09 stale[bot]