chain "before_init" callbacks? #10805
-
Is there a way to specify more than 1 callback for the "@callbacks" in the project configuration's "before_Init"? (given that "@callbacks" is plural, I would think you could... but can't figure out how). So specifically I have a callback for customizing the tokenizer based on the examples in the documentation that says to place it in the [initialize.before_init] section of the configuration. Problem I already have the "spacy.copy_from_base_model.v1" callback in the [initalize.before_init] section. Is there a way to chain the callbacks so that the "spacy.copy_from_base_model.v1" runs 1st, followed by my tokenizer custimzation callback? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
No, there's not currently a way to provide multiple callbacks or to chain them, other than by hand with an additional function that calls both. This has come up in several places (also for augmenters, for example) but we don't have a good solution that would work with the current config schema. |
Beta Was this translation helpful? Give feedback.
No, there's not currently a way to provide multiple callbacks or to chain them, other than by hand with an additional function that calls both.
This has come up in several places (also for augmenters, for example) but we don't have a good solution that would work with the current config schema.