How to gather timing information on every step of a pipeline? #7445
Replies: 1 comment
-
(The original answer from @ines can be found at #7425 (comment).)
I agree that it's not nice to need twice as many components just to get timing information.
If you don't want the hook to modify the Doc object, how would the hook help me in gathering timing information? Where would it be stored if not in e.g. I guess it's meta information about the pipeline process and not about the document/text itself. At the moment, my component modifies the Doc twice, once with actual text related information and once with the meta timing information. Maybe there should be hidden meta components which aren't shown by default? Maybe there should be a different namespace I get that doing this only for timing is very specific and not flexible, but I currently can't think of other meta information that could be gathered during the pipeline process (hence my suggestion). Can you? |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
(This separates the two questions from #7425.)
I want to store how long each component in my pipeline took.
This kind of timing information would obviously best be gathered in
Language.__call__()
. As I do it, I get the timing information only for my custom components. I don't see a way to hook into the loop.Language.__call__()
:I guess my questions boil down to: 'Is timing information the only use case for global extension attributes not related to a specific component?' If so, it might make sense to include it in
Language.__call__()
. If not, it might make sense to give the user the option to add initialization code to a pipeline.Beta Was this translation helpful? Give feedback.
All reactions