mismatched structure

Hi :slight_smile: !

I am creating a new model of NER.
I made my annotation in prodigy. I then proceeded to train it in prodigy to see the scores.
I then did the "data-to-spacy" command to convert my data. I then used the spacy train command. Until this step everything worked fine.
Finally, I wanted to generate the package of my model.
I used the following command line:
spacy package ./xxxxxx ./xxxxxi --meta-path ./xxxxo --name contractsrental
--version 1.0.0`

and I get the error on the picture :

cannot deserialize model : mismatched structure

how I resolve it ?

Thanks ! :slight_smile:


Hi @Lize!

Thanks for your question.

Two quick notes - please don't ping individual teammates. We answer questions as a team and it is very hard for any specific teammate to answer. Also, please avoid posting images. These are not searchable nor can we copy/paste so it's best practice to avoid post images. Since this is markdown, you can render output like that as code instead. Thanks for understanding :slight_smile:

You may have an config conflict/mismatch, e.g., see this spaCy discussion issue. You may want to try spacy debug to find the mismatch.

If you have further questions on this problem, I would suggest posting on the spaCy discussion forum. As the Explosion team has grown this year, we've divided support responsibilities between these two forums. This forum is generally for Prodigy specific questions while the spaCy core developer team supports the spaCy discussion forum.


I got it.
What I don't understand is that the config file is automatically generated so how can there be conflicts?

when I run "spacy debug config ./models/EN/contractsloueurs/pipelines/1/model-best/config.cfg"
I got :

====================== Config validation for [training] ======================
Traceback (most recent call last):
  File "/usr/lib/python3.8/runpy.py", line 194, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/usr/lib/python3.8/runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "/home/iateam/.local/lib/python3.8/site-packages/spacy/__main__.py", line 4, in <module>
  File "/home/iateam/.local/lib/python3.8/site-packages/spacy/cli/_util.py", line 69, in setup_cli
  File "/home/iateam/.local/lib/python3.8/site-packages/click/core.py", line 829, in __call__
    return self.main(*args, **kwargs)
  File "/home/iateam/.local/lib/python3.8/site-packages/click/core.py", line 782, in main
    rv = self.invoke(ctx)
  File "/home/iateam/.local/lib/python3.8/site-packages/click/core.py", line 1259, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/iateam/.local/lib/python3.8/site-packages/click/core.py", line 1259, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/iateam/.local/lib/python3.8/site-packages/click/core.py", line 1066, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/iateam/.local/lib/python3.8/site-packages/click/core.py", line 610, in invoke
    return callback(*args, **kwargs)
  File "/home/iateam/.local/lib/python3.8/site-packages/typer/main.py", line 497, in wrapper
    return callback(**use_params)  # type: ignore
  File "/home/iateam/.local/lib/python3.8/site-packages/spacy/cli/debug_config.py", line 41, in debug_config_cli
  File "/home/iateam/.local/lib/python3.8/site-packages/spacy/cli/debug_config.py", line 63, in debug_config
    T = registry.resolve(config["training"], schema=ConfigSchemaTraining)
  File "/home/iateam/.local/lib/python3.8/site-packages/thinc/config.py", line 727, in resolve
    resolved, _ = cls._make(
  File "/home/iateam/.local/lib/python3.8/site-packages/thinc/config.py", line 776, in _make
    filled, _, resolved = cls._fill(
  File "/home/iateam/.local/lib/python3.8/site-packages/thinc/config.py", line 830, in _fill
    promise_schema = cls.make_promise_schema(value, resolve=resolve)
  File "/home/iateam/.local/lib/python3.8/site-packages/thinc/config.py", line 1021, in make_promise_schema
    func = cls.get(reg_name, func_name)
  File "/home/iateam/.local/lib/python3.8/site-packages/spacy/util.py", line 136, in get
    raise RegistryError(
catalogue.RegistryError: [E893] Could not find function 'prodigy.ConsoleLogger.v1' in function registry 'loggers'. If you're using a custom function, make sure the code is available. If the function is provided by a third-party package, e.g. spacy-transformers, make sure the package is installed in your environment.

Available names: spacy-legacy.WandbLogger.v1, spacy.ConsoleLogger.v1, spacy.WandbLogger.v2

hi @Lize!

What versions of spaCy and Prodigy are you running? I think you may need to upgrade your spaCy. This error you're getting is more on the spaCy front that it can't find a logger that's available in Prodigy.

For Prodigy run:

python -m prodigy stats

For spaCy run:

python -m spacy info

The most current version of Prodigy is v1.11.8, which requires spacy>=3.1.1,<3.5.0. I'm wondering if this is the issue. After spaCy v3.2, spacy-loggers was created as it's own package outside of spaCy so this may be contributing. See if upgrading spaCy helps and if not, we can explore other options.

We upgraded spacy. I noticed that i have an error in my config file. The both soled my error.
Thanks !! :slight_smile:

1 Like