Constructs a `Config` from the path to a json file of parameters. Args: json_file (:obj:`string`): Path to the JSON file containing the parameters. Returns: :class:`PretrainedConfig`: An instance of a configuration object
(cls, json_file: str)
| 305 | |
| 306 | @classmethod |
| 307 | def from_json_file(cls, json_file: str) -> "PretrainedConfig": |
| 308 | """ |
| 309 | Constructs a `Config` from the path to a json file of parameters. |
| 310 | |
| 311 | Args: |
| 312 | json_file (:obj:`string`): |
| 313 | Path to the JSON file containing the parameters. |
| 314 | |
| 315 | Returns: |
| 316 | :class:`PretrainedConfig`: An instance of a configuration object |
| 317 | |
| 318 | """ |
| 319 | config_dict = cls._dict_from_json_file(json_file) |
| 320 | return cls(**config_dict) |
| 321 | |
| 322 | @classmethod |
| 323 | def _dict_from_json_file(cls, json_file: str): |
nothing calls this directly
no test coverage detected