Repository: towhee-io/towhee

Issue #327: [Enhancement]: Pipeline and operator updates should be automatically downloaded even if a cached version exists
Created: 2021-12-20T17:15:32Z
Is there an existing issue for this?

 I have searched the existing issues

What would you like to be added?
If a repository (either pipeline or operator) on the Towhee hub is updated, the changes are not automatically reflected during local runs if a prior version of said repository exists.
Why is this needed?
This seems to be unintended behavior.
Anything else?
No response

Duplicate issue #361: [Bug]: Torchvision stated in requirements.txt is too low.
Created: 2021-12-28T07:01:15Z
Is there an existing issue for this?

 I have searched the existing issues

Current Behavior
Error when embedding image with tutorial.
>>> output = embedding_pipeline('towhee.jpeg')
2021-12-28 14:51:10,457 - 123145613156352 - thread_pool_task_executor.py-thread_pool_task_executor:77 - ERROR: Traceback (most recent call last):
  File "/Users/zilliz/opt/miniconda3/envs/run-towhee/lib/python3.8/site-packages/towhee/engine/thread_pool_task_executor.py", line 69, in execute
    op = self._op_pool.acquire_op(runner.hub_op_id,
  File "/Users/zilliz/opt/miniconda3/envs/run-towhee/lib/python3.8/site-packages/towhee/engine/operator_pool.py", line 95, in acquire_op
    op = self._op_loader.load_operator(hub_op_id, op_args)
  File "/Users/zilliz/opt/miniconda3/envs/run-towhee/lib/python3.8/site-packages/towhee/engine/operator_loader.py", line 71, in load_operator
    spec.loader.exec_module(module)
  File "<frozen importlib._bootstrap_external>", line 843, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/Users/zilliz/.towhee/operators/resnet_image_embedding&towhee$main/resnet_image_embedding.py", line 23, in <module>
    from torchvision.transforms import InterpolationMode
ImportError: cannot import name 'InterpolationMode' from 'torchvision.transforms' (/Users/zilliz/opt/miniconda3/envs/run-towhee/lib/python3.8/site-packages/torchvision/transforms/__init__.py)

2021-12-28 14:51:10,457 - 123145613156352 - thread_pool_task_executor.py-thread_pool_task_executor:78 - ERROR: cannot import name 'InterpolationMode' from 'torchvision.transforms' (/Users/zilliz/opt/miniconda3/envs/run-towhee/lib/python3.8/site-packages/torchvision/transforms/__init__.py)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Users/zilliz/opt/miniconda3/envs/run-towhee/lib/python3.8/site-packages/towhee/__init__.py", line 69, in __call__
    out_df = self._pipeline(in_df)
  File "/Users/zilliz/opt/miniconda3/envs/run-towhee/lib/python3.8/site-packages/towhee/engine/pipeline.py", line 93, in __call__
    graph_ctx.join()
  File "/Users/zilliz/opt/miniconda3/envs/run-towhee/lib/python3.8/site-packages/towhee/engine/graph_context.py", line 95, in join
    op.join()
  File "/Users/zilliz/opt/miniconda3/envs/run-towhee/lib/python3.8/site-packages/towhee/engine/operator_context.py", line 137, in join
    runner.join()
  File "/Users/zilliz/opt/miniconda3/envs/run-towhee/lib/python3.8/site-packages/towhee/engine/operator_runner/runner_base.py", line 190, in join
    self._end_event.wait()
  File "/Users/zilliz/opt/miniconda3/envs/run-towhee/lib/python3.8/threading.py", line 558, in wait
    signaled = self._cond.wait(timeout)
  File "/Users/zilliz/opt/miniconda3/envs/run-towhee/lib/python3.8/threading.py", line 302, in wait
    waiter.acquire()
Expected Behavior
No error
Steps To Reproduce
1. Preinstall torchvision <=0.8.0 before install towhee
2. `pip install towhee`
3. Follow the official [tutorial](https://docs.towhee.io/get-started/quick-start/#running-your-first-pipeline)
Environment
- Towhee version(e.g. v0.1.3 or 8b23a93): 0.4.0rc1
- OS(Ubuntu or CentOS): mac
- CPU/Memory:
- GPU:
- Others:
Anything else?
torchvision.transforms.InterpolationMode is not added until v0.9.0. We didn't state it in the requirements.txt. There may also be same  problems with with numpy, torch, pandas.

Closing comment (2021-12-28T07:56:53Z): @shiyu22 I think this may be related to #327. Can you double-check?