MCPcopy
hub / github.com/QData/TextAttack / load

Method load

textattack/shared/checkpoint.py:224–229  ·  view source on GitHub ↗
(cls, path)

Source from the content-addressed store, hash-verified

222
223 @classmethod
224 def load(cls, path):
225 with open(path, "rb") as f:
226 checkpoint = pickle.load(f)
227 assert isinstance(checkpoint, cls)
228
229 return checkpoint
230
231 def _verify(self):
232 """Check that the checkpoint has no duplicates and is consistent."""

Callers 15

from_checkpointMethod · 0.80
trainMethod · 0.80
__init__Method · 0.80
load_modelMethod · 0.80
get_infersent_modelMethod · 0.80
__init__Method · 0.80
__setstate__Method · 0.80
encodeMethod · 0.80
flair_tagFunction · 0.80

Calls

no outgoing calls