MCPcopy Create free account
hub / github.com/THUDM/GLM / from_json_file

Method from_json_file

model/modeling_bert.py:246–250  ·  view source on GitHub ↗

Constructs a `BertConfig` from a json file of parameters.

(cls, json_file)

Source from the content-addressed store, hash-verified

244
245 @classmethod
246 def from_json_file(cls, json_file):
247 """Constructs a `BertConfig` from a json file of parameters."""
248 with open(json_file, "r", encoding='utf-8') as reader:
249 text = reader.read()
250 return cls.from_dict(json.loads(text))
251
252 def __repr__(self):
253 return str(self.to_json_string())

Callers 1

from_pretrainedMethod · 0.80

Calls 1

from_dictMethod · 0.80

Tested by

no test coverage detected