entity_ruler.patterns fails with srsly.read_jsonl.v1 in spaCy 3.8 #13966
Replies: 1 comment
-
|
This is a known breaking change in spaCy 3.8. The FixReplace the config block with the new Option 1 — Load patterns in Python (recommended): import spacy
import srsly
nlp = spacy.load("your_model")
ruler = nlp.get_pipe("entity_ruler")
patterns = list(srsly.read_jsonl("data/patterns/entity_ruler_patterns.jsonl"))
ruler.add_patterns(patterns)Option 2 — Update your config.cfg: [initialize.components.entity_ruler]
patterns_path = "data/patterns/entity_ruler_patterns.jsonl"The direct Option 3 — Pin srsly version (temporary workaround): See the spaCy 3.8 migration guide for other breaking changes. Hope this unblocks you! |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
This following config works in spaCy 3.7 but fails in 3.8:
Error:
It looks like
srsly.read_jsonl.v1returns a generator, butpatternsnow requires aSequence.Is this an intended change in 3.8?
Beta Was this translation helpful? Give feedback.
All reactions