Closed bjj closed 2 weeks ago
I'm a little confused. Would unload() raise an exception?
Turns out del self.embedding
is an error if the attribute doesn't exist. It's not even necessary according to my understanding: Setting to None
is just as good.
(that attribute doesn't have an initializer, it just has a type)
Oh yeah, I misread it. It was supposed to be None. Fixed now.
You're probably right that del
is redundant, though people seem to disagree on what it does exactly. I'll leave it as and investigate later.
This means model also can't be unloaded if it (partially) failed to load due to running out of memory