Skip to content
Discussion options

You must be logged in to vote

and run train with --code custom_component.py, but think I need to edit my config file somewhere as well? I tried adding it to [nlp] pipeline with ["transformer", "ner", "remove_trf_data"] but this produced an error saying my pipeline was incorrect.

You are correct you need to edit your config to add the component, and that pipeline description looks fine.

Your custom code file is not correct, you shouldn't be creating a pipeline there - remove the lines with "nlp" on them. You just need to declare the component, which in this case is basically just a function that takes in a Doc, modifies it, and returns the modified Doc.

After you fix that you should be able to add the component to yo…

Replies: 1 comment 9 replies

Comment options

You must be logged in to vote
9 replies
@adrianeboyd
Comment options

@cgpeltier
Comment options

@cgpeltier
Comment options

@adrianeboyd
Comment options

@cgpeltier
Comment options

Answer selected by adrianeboyd
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
gpu Using spaCy on GPU feat / pipeline Feature: Processing pipeline and components perf / memory Performance: memory use feat / transformer Feature: Transformer
3 participants