Skip to content
Discussion options

You must be logged in to vote

This isn't related to trf or GPU, just how extensions are set globally. With fork it would work, but with spawn the child processes don't get the global context with the Span.set_extension line. You would need to check that the extension is set somehow in a custom component.

You can see an example from the transformer component where we always check for the extension in __call__ so that spawn works:

https://github.com/explosion/spacy-transformers/blob/ecf619d9df645dbbd3648481afd547bc9f84a5e8/spacy_transformers/pipeline_component.py#L181-L194

I also suspect you've simplified your example for the report above? I can't replicate this directly. This works fine, aside from some warnings (multi…

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@hardianlawi
Comment options

@adrianeboyd
Comment options

@hardianlawi
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
scaling Scaling, serving and parallelizing spaCy
2 participants
Converted from issue

This discussion was converted from issue #9999 on January 10, 2022 12:02.