Coder Social home page Coder Social logo

Comments (5)

rmitsch avatar rmitsch commented on May 16, 2024

Hi @innocent-charles, please provide

  • your config,
  • the full stack trace and
  • a minimal reproducible example.

Thank you!

from spacy-llm.

innocent-charles avatar innocent-charles commented on May 16, 2024

Thank you ! ,

Here's my
config :

[nlp]
lang = "en"
pipeline = ["llm"]

[components]

[components.llm]
factory = "llm"

[components.llm.task]
@llm_tasks = "spacy.NER.v3"
labels =First Name,Middle Name,Surname

[components.llm.cache]
@llm_misc = "spacy.BatchCache.v1"
path = "cache/"
batch_size = 512
max_batches_in_mem = 300

[components.llm.task.examples]
@misc = "spacy.FewShotReader.v1"
path = "Examples.yaml"

[components.llm.model]
@llm_models = "spacy.GPT-3-5.v2"
name = "gpt-3.5-turbo-16k"
config = {"temperature": 0.3}
max_tries = 10
  • I have just updated the spacy-llm from 0.4.0 to 0.5.1 and changed the config to spacy.NER.v3 and spacy.GPT-3-5.v2. Then unfortunely I end up getting this below error .

The error I got is :

  File "/home/innocent/.local/lib/python3.11/site-packages/confection/__init__.py", line 756, in resolve
    resolved, _ = cls._make(
                  ^^^^^^^^^^
  File "/home/innocent/.local/lib/python3.11/site-packages/confection/__init__.py", line 805, in _make
    filled, _, resolved = cls._fill(
                          ^^^^^^^^^^
  File "/home/innocent/.local/lib/python3.11/site-packages/confection/__init__.py", line 860, in _fill
    filled[key], validation[v_key], final[key] = cls._fill(
                                                 ^^^^^^^^^^
  File "/home/innocent/.local/lib/python3.11/site-packages/confection/__init__.py", line 877, in _fill
    getter_result = getter(*args, **kwargs)
                    ^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/innocent/.local/lib/python3.11/site-packages/spacy_llm/tasks/ner/registry.py", line 162, in make_ner_task_v3
    [example_type(**eg) for eg in raw_examples] if raw_examples else None
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/innocent/.local/lib/python3.11/site-packages/spacy_llm/tasks/ner/registry.py", line 162, in <listcomp>
    [example_type(**eg) for eg in raw_examples] if raw_examples else None
     ^^^^^^^^^^^^^^^^^^
  File "pydantic/main.py", line 342, in pydantic.main.BaseModel.__init__
pydantic.error_wrappers.ValidationError: 1 validation error for NERCoTExample
spans
  field required (type=value_error.missing)

from spacy-llm.

rmitsch avatar rmitsch commented on May 16, 2024

Can you post the content of your Examples.yaml? The examples required for CoT look a bit different, so you'll have to update those as well.

from spacy-llm.

innocent-charles avatar innocent-charles commented on May 16, 2024

Hello @rmitsch , please may you share the structure of those new examples.

from spacy-llm.

rmitsch avatar rmitsch commented on May 16, 2024

The NER.v3 showcase in the repo includes examples.

from spacy-llm.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.