Comments (5)
感谢提问。单纯的推理功能正在开发,预计半个月到一个月,目前有 test 功能。
这个文件是 ner_dumpper
保存的,它就是一个在评测调用的特殊的 metric
。
from adaseq.
我在使用这个推理的时候,遇到了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, module_version, _ = 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
from adaseq.
谢谢您的回答!!!不过在我训练脚本完成后,模型保存的文件是best_model.pth,请问修改哪里可以将模型的保存结果保存为modelscope的中模型格式(含有这些:config.json configuration.json pytorch_model.bin README.md resources vocab.txt)
from adaseq.
谢谢您的回答!!!不过在我训练脚本完成后,模型保存的文件是best_model.pth,请问修改哪里可以将模型的保存结果保存为modelscope的中模型格式(含有这些:config.json configuration.json pytorch_model.bin README.md resources vocab.txt)
AdaSeq >= 0.6.0
刚刚支持这个功能,无须任何修改,训练完成后会生成output
或output_best
目录,这个目录和modelscope模型格式相同。
详见https://github.com/modelscope/AdaSeq/blob/master/docs/tutorials/model_inference_zh.md
from adaseq.
可以清空/data3/huyan/liheng/tmp/AdaSeq/AdaSeq/experiments/eBay/231125005305.028950/output_best/configuration.json最底下plugin的list中的内容,变成空list。但是运行可能还有其他问题。
from adaseq.
Related Issues (20)
- [Question] CUDA out of memory HOT 1
- 新增案例文档
- [Question] Can not import BERT model because config lacks `Task` field
- [Question] About the search engine
- FileNotFoundError of try HOT 2
- [Question] ner任务的evaluate标准是怎样的f1?evaluate的代码在哪里查看?
- [Question] 运行twitter-17-txt.yaml和twitter-17-img.yaml出错 HOT 1
- [Question] i can't find the TBD dataset
- [Question]How to solve [datasets.builder.DatasetGenerationError: An error occurred while generating the dataset] HOT 8
- 数据集格式[Question]
- [Question] ValueError: unknown url type: 'adaseq-0.6.6-py3-none-any.whl.metadata' HOT 2
- [Question] 大佬你好,请问可以上传一下论文Improving Low-resource Named Entity Recognition with Graph Propagated Data Augmentation的代码吗? HOT 1
- CRF训练loss不稳定 HOT 1
- [Question] Error loading inference after model fine-tuning 模型微调后加载时出错 HOT 1
- ncbi and bc5cd
- [Question]
- Dataset[Question]
- [Question] build_dataset error log: 'sequence-labeling-model is not in the custom_datasets registry group named-entity-recognition. Please make sure the correct version of ModelScope library is used HOT 1
- 请问有关系抽取任务的config样例吗,我在例子里没有看到[Question] HOT 1
- [Question] running self trained NER model causes errors HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from adaseq.