Cannot run tests on nightly
See original GitHub issueHow to reproduce the behaviour
Download spacy nightly and try to run the tests after installing the requirements. Pytest gives the following complaint.
_______________________________ ERROR collecting spacy/tests/regression/test_issue5230.py ________________________________
spacy/tests/regression/test_issue5230.py:89: in <module>
[nlp(), vectors(), custom_pipe(), tagger(), entity_linker()],
spacy/tests/regression/test_issue5230.py:61: in tagger
tagger = nlp.add_pipe("tagger")
spacy/language.py:687: in add_pipe
pipe_component = self.create_pipe(
spacy/language.py:585: in create_pipe
resolved, filled = registry.resolve(cfg, validate=validate)
../../anaconda3/envs/project/lib/python3.8/site-packages/thinc/config.py:542: in resolve
filled, _, resolved = cls._fill(
../../anaconda3/envs/project/lib/python3.8/site-packages/thinc/config.py:631: in _fill
filled[key], validation[v_key], final[key] = cls._fill(
../../anaconda3/envs/project/lib/python3.8/site-packages/thinc/config.py:692: in _fill
result = schema.parse_obj(validation)
pydantic/main.py:455: in pydantic.main.BaseModel.parse_obj
???
pydantic/main.py:344: in pydantic.main.BaseModel.__init__
???
pydantic/main.py:874: in pydantic.main.validate_model
???
E pydantic.errors.ConfigError: field "nlp" not yet prepared so type is still a ForwardRef, you might need to call ArgModel.update_forward_refs().
================================================ short test summary info =================================================
ERROR spacy/tests/regression/test_issue5230.py - pydantic.errors.ConfigError: field "nlp" not yet prepared so type is s...
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Interrupted: 1 error during collection !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Your Environment
- spaCy version: 3.0.0a7
- Platform: Linux-4.15.0-112-generic-x86_64-with-glibc2.10
- Python version: 3.8.5
➜ spaCy git:(5fdd6b460) pip show thinc
Name: thinc
Version: 8.0.0a27
Summary: A refreshing functional take on deep learning, compatible with your favorite libraries
Home-page: https://github.com/explosion/thinc
Author: Explosion
Author-email: contact@explosion.ai
License: MIT
Location: /home/user/anaconda3/envs/project/lib/python3.8/site-packages
Requires: numpy, murmurhash, srsly, setuptools, preshed, wasabi, pydantic, catalogue, cymem
Required-by: spacy-nightly
Issue Analytics
- State:
- Created 3 years ago
- Comments:9 (6 by maintainers)
Top Results From Across the Web
Unit Tests and Nightly Build - MSDN - Microsoft
I have a team using VS for Software Developers and I want to run the unit tests using Team Build. VS for SD...
Read more >Tests not running in Test Explorer - visual studio
All tests are running, all tests are showing the right test outcome. However, the tests are not running when using the Visual Studio...
Read more >Unit testing - GROMACS 2024-dev-20221124-bb312a6 ...
Some tests are skipped because they cannot run with the number of MPI ranks or GPU devices detected. Explicit information about such cases...
Read more >Test execution pauses during nightly runs when exc...
Hi, I have a query regarding a functionality.Whenever we run tests,sometimes some page is not opened in time or an object is not...
Read more >Nightly Builds Test against real database
The fact that you mention nightly builds, as opposed to continuous integration where builds run after each commit might indicate that the ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Thanks for the patience @svlandeg and @forgetso !
First, yeah, I have seen that error several times in other projects using Pydantic 😬 😅
Nevertheless, I started from a clean slate and I couldn’t reproduce the error in spaCy 😕
…But it took me a bit of work to actually start from a “clean slate”, and I think the error could be coming from one of the several “caches” interacting in this.
@forgetso could you try this?:
@tiangolo thanks. Updating setup tools and requirements seems to have done the trick.