Problem implementing custom pipeline component as independent class #12043
-
Hello, I am trying to implement a custom pipeline component as a class When I try to train my model I get the following error:
I don't understand why this is happening. Relevant sections of my code which define the component include: From the
and sections of the code defining
The function UPDATE I recently changed my code slightly and was able to integrate by component into the pipeline. The changes were: For
For the
I am still curious if anyone knows why the error above was caused by the lack of including |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hello, Yes, you're correct, you need to add the |
Beta Was this translation helpful? Give feedback.
Hello,
Yes, you're correct, you need to add the
nlp
argument to the factory initialization to make it work; it's simply the architecture template to adhere to when creating a new factory. If you want to evaluate your custom component you'd also need to write your own scoring function which compares the reference values with the predicted values. Every component should be evaluated individually, the order only matters if components depend on annotations of other components.