from modelscope.pipelines import pipeline
from modelscope.utils.constant import Tasks
p = pipeline(Tasks.named_entity_recognition, '/data3/huyan/liheng/tmp/AdaSeq/AdaSeq/experiments/eBay/231125005305.028950/output_best')
result = p('Nike Reax TR Mesh Herren Sneaker low Turnschuhe Sportschuhe Freizeitschuhe')
print(result)
报错如下
2023-11-25 22:15:49,690 - modelscope - INFO - PyTorch version 2.1.1+cu118 Found.
2023-11-25 22:15:49,691 - modelscope - INFO - Loading ast index from /home/huyan/liheng/.cache/modelscope/ast_indexer
2023-11-25 22:15:49,788 - modelscope - INFO - Loading done! Current index file version is 1.9.5, with md5 c652a785900e4613e32639cfe65e325f and a total number of 945 components indexed
Traceback (most recent call last):
File "/data3/huyan/liheng/tmp/AdaSeq/AdaSeq/test.py", line 4, in
p = pipeline(Tasks.named_entity_recognition, '/data3/huyan/liheng/tmp/AdaSeq/AdaSeq/experiments/eBay/231125005305.028950/output_best')
File "/data3/huyan/liheng/conda/envs/pytorch_d/lib/python3.9/site-packages/modelscope/pipelines/builder.py", line 135, in pipeline
register_plugins_repo(cfg.safe_get('plugins'))
File "/data3/huyan/liheng/conda/envs/pytorch_d/lib/python3.9/site-packages/modelscope/utils/plugins.py", line 446, in register_plugins_repo
module_name, moduleversion, = get_modules_from_package(plugin)
File "/data3/huyan/liheng/conda/envs/pytorch_d/lib/python3.9/site-packages/modelscope/utils/plugins.py", line 736, in get_modules_from_package
data = get(package, tmpdir=tmpdir)
File "/data3/huyan/liheng/conda/envs/pytorch_d/lib/python3.9/site-packages/modelscope/utils/plugins.py", line 688, in get
target, _headers = _download_dist(url, scratch_file, index_url,
File "/data3/huyan/liheng/conda/envs/pytorch_d/lib/python3.9/site-packages/modelscope/utils/plugins.py", line 549, in _download_dist
target, _headers = urlretrieve(url, scratch_file, auth=auth)
File "/data3/huyan/liheng/conda/envs/pytorch_d/lib/python3.9/site-packages/modelscope/utils/plugins.py", line 504, in urlretrieve
res = opener.open(url, data=data)
File "/data3/huyan/liheng/conda/envs/pytorch_d/lib/python3.9/urllib/request.py", line 501, in open
req = Request(fullurl, data)
File "/data3/huyan/liheng/conda/envs/pytorch_d/lib/python3.9/urllib/request.py", line 320, in init
self.full_url = url
File "/data3/huyan/liheng/conda/envs/pytorch_d/lib/python3.9/urllib/request.py", line 346, in full_url
self._parse()
File "/data3/huyan/liheng/conda/envs/pytorch_d/lib/python3.9/urllib/request.py", line 375, in _parse
raise ValueError("unknown url type: %r" % self.full_url)
ValueError: unknown url type: 'adaseq-0.6.6-py3-none-any.whl.metadata'
但实际上我已经成功安装了 adaseq == 0.6.6
What have you tried?
尝试安装了各种版本的adaseq和modelscope
Code (if necessary)
from modelscope.pipelines import pipeline
from modelscope.utils.constant import Tasks
p = pipeline(Tasks.named_entity_recognition, '/data3/huyan/liheng/tmp/AdaSeq/AdaSeq/experiments/eBay/231125005305.028950/output_best')
result = p('Nike Reax TR Mesh Herren Sneaker low Turnschuhe Sportschuhe Freizeitschuhe')
print(result)
What's your environment?
AdaSeq Version (e.g., 1.0 or master): 0.6.6
ModelScope Version (e.g., 1.0 or master): 1.9.5
PyTorch Version (e.g., 1.12.1): 2.1.1
OS (e.g., Ubuntu 20.04): Ubuntu 20.04
Python version: 3.9
CUDA/cuDNN version: 11.8
GPU models and configuration:
Any other relevant information:
Code of Conduct
[X] I agree to follow this project's Code of Conduct
What is your question?
我在使用这个推理的时候,遇到了ValueError: unknown url type: 'adaseq-0.6.6-py3-none-any.whl.metadata' 请问这个是怎么回事呢
from modelscope.pipelines import pipeline from modelscope.utils.constant import Tasks
p = pipeline(Tasks.named_entity_recognition, '/data3/huyan/liheng/tmp/AdaSeq/AdaSeq/experiments/eBay/231125005305.028950/output_best') result = p('Nike Reax TR Mesh Herren Sneaker low Turnschuhe Sportschuhe Freizeitschuhe')
print(result)
报错如下 2023-11-25 22:15:49,690 - modelscope - INFO - PyTorch version 2.1.1+cu118 Found. 2023-11-25 22:15:49,691 - modelscope - INFO - Loading ast index from /home/huyan/liheng/.cache/modelscope/ast_indexer 2023-11-25 22:15:49,788 - modelscope - INFO - Loading done! Current index file version is 1.9.5, with md5 c652a785900e4613e32639cfe65e325f and a total number of 945 components indexed Traceback (most recent call last): File "/data3/huyan/liheng/tmp/AdaSeq/AdaSeq/test.py", line 4, in p = pipeline(Tasks.named_entity_recognition, '/data3/huyan/liheng/tmp/AdaSeq/AdaSeq/experiments/eBay/231125005305.028950/output_best') File "/data3/huyan/liheng/conda/envs/pytorch_d/lib/python3.9/site-packages/modelscope/pipelines/builder.py", line 135, in pipeline register_plugins_repo(cfg.safe_get('plugins')) File "/data3/huyan/liheng/conda/envs/pytorch_d/lib/python3.9/site-packages/modelscope/utils/plugins.py", line 446, in register_plugins_repo module_name, moduleversion, = get_modules_from_package(plugin) File "/data3/huyan/liheng/conda/envs/pytorch_d/lib/python3.9/site-packages/modelscope/utils/plugins.py", line 736, in get_modules_from_package data = get(package, tmpdir=tmpdir) File "/data3/huyan/liheng/conda/envs/pytorch_d/lib/python3.9/site-packages/modelscope/utils/plugins.py", line 688, in get target, _headers = _download_dist(url, scratch_file, index_url, File "/data3/huyan/liheng/conda/envs/pytorch_d/lib/python3.9/site-packages/modelscope/utils/plugins.py", line 549, in _download_dist target, _headers = urlretrieve(url, scratch_file, auth=auth) File "/data3/huyan/liheng/conda/envs/pytorch_d/lib/python3.9/site-packages/modelscope/utils/plugins.py", line 504, in urlretrieve res = opener.open(url, data=data) File "/data3/huyan/liheng/conda/envs/pytorch_d/lib/python3.9/urllib/request.py", line 501, in open req = Request(fullurl, data) File "/data3/huyan/liheng/conda/envs/pytorch_d/lib/python3.9/urllib/request.py", line 320, in init self.full_url = url File "/data3/huyan/liheng/conda/envs/pytorch_d/lib/python3.9/urllib/request.py", line 346, in full_url self._parse() File "/data3/huyan/liheng/conda/envs/pytorch_d/lib/python3.9/urllib/request.py", line 375, in _parse raise ValueError("unknown url type: %r" % self.full_url) ValueError: unknown url type: 'adaseq-0.6.6-py3-none-any.whl.metadata'
但实际上我已经成功安装了 adaseq == 0.6.6
What have you tried?
尝试安装了各种版本的adaseq和modelscope
Code (if necessary)
from modelscope.pipelines import pipeline from modelscope.utils.constant import Tasks
p = pipeline(Tasks.named_entity_recognition, '/data3/huyan/liheng/tmp/AdaSeq/AdaSeq/experiments/eBay/231125005305.028950/output_best') result = p('Nike Reax TR Mesh Herren Sneaker low Turnschuhe Sportschuhe Freizeitschuhe')
print(result)
What's your environment?
Code of Conduct