Dark Mode

Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[Question] running self trained NER model causes errors #46

Open
Open
[Question] running self trained NER model causes errors#46
Labels
questionFurther information is requested

Description

What is your question?

error message:

Traceback (most recent call last):
File "/root/raid/electrolyte_papers_extraction/NER/ner.py", line 31, in <module>
ner = NER('ckpt/ner/240731013859.938009/output_best', device = 'gpu')
File "/root/raid/electrolyte_papers_extraction/NER/ner.py", line 12, in __init__
self.pipeline = pipeline(Tasks.named_entity_recognition, abspath(ckpt), device = device)
File "/usr/local/lib/python3.10/dist-packages/modelscope/pipelines/builder.py", line 169, in pipeline
return build_pipeline(cfg, task_name=task)
File "/usr/local/lib/python3.10/dist-packages/modelscope/pipelines/builder.py", line 65, in build_pipeline
return build_from_cfg(
File "/usr/local/lib/python3.10/dist-packages/modelscope/utils/registry.py", line 215, in build_from_cfg
raise type(e)(f'{obj_cls.__name__}: {e}')
RuntimeError: SequenceLabelingPipeline: SequenceLabelingModel: TransformerEmbedder: Try loading from huggingface and modelscope failed

huggingface:
The request model: google-bert/bert-base-cased does not exist!

modelscope:
The request model: google-bert/bert-base-cased does not exist!

self trained NER checkpoint:

https://github.com/breadbread1984/electrolyte_papers_extraction/tree/main/NER/ckpt/ner/240731013859.938009

What have you tried?

under ckpt/ner/. edit /output_best/configuration.json to change the following lines

from

"plugins": [
"adaseq"
]

to

"plugins": [
"https://files.pythonhosted.org/packages/49/47/ddf684253dbb4c3e0716fcda67094aa3c407237d5eb8930ede0a91b9feb8/adaseq-0.6.6-py3-none-any.whl"
]

Code (if necessary)

source code:

from os.path import abspath
from modelscope.pipelines import pipeline
from modelscope.utils.constant import Tasks
pipeline_ = pipeline(Tasks.named_entity_recognition, abspath('ckpt/ner/240731013859.938009/output_best'), device = 'gpu')

What's your environment?

  • AdaSeq Version (e.g., 1.0 or master): 0.6.6
  • ModelScope Version (e.g., 1.0 or master): 1.16.1
  • PyTorch Version (e.g., 1.12.1): 2.2.0a0+81ea7a4
  • OS (e.g., Ubuntu 20.04): Ubuntu 22.04.3 LTS
  • Python version: 3.10.12
  • CUDA/cuDNN version: 8.9.7.29-1+cuda12.2
  • GPU models and configuration: A100
  • Any other relevant information:

Code of Conduct

  • I agree to follow this project's Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions