Skip to content

What is the purpose of thinc.Model.id? #9609

Discussion options

You must be logged in to vote

There's a couple of reasons, but one is that it lets us run the optimizer without relying on object identity on the arrays. So, let's say you have nlp1 and nlp2 there. The optimizer will need some way of distinguishing that those are different parameters, including across processes. We do that by giving the models a distinct ID, and then parameters are addressed as (model_id, param_id)

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@BramVanroy
Comment options

Answer selected by BramVanroy
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🔮 thinc spaCy's machine learning library Thinc
2 participants