Save this instance to a json file. Args: json_file_path (:obj:`string`): Path to the JSON file in which this configuration instance's parameters will be saved. use_diff (:obj:`bool`): If set to True, only the difference betwee
(self, json_file_path, use_diff=True)
| 384 | return json.dumps(config_dict, indent=2, sort_keys=True) + "\n" |
| 385 | |
| 386 | def to_json_file(self, json_file_path, use_diff=True): |
| 387 | """ |
| 388 | Save this instance to a json file. |
| 389 | |
| 390 | Args: |
| 391 | json_file_path (:obj:`string`): |
| 392 | Path to the JSON file in which this configuration instance's parameters will be saved. |
| 393 | use_diff (:obj:`bool`): |
| 394 | If set to True, only the difference between the config instance and the default PretrainedConfig() is serialized to JSON file. |
| 395 | """ |
| 396 | with open(json_file_path, "w", encoding="utf-8") as writer: |
| 397 | writer.write(self.to_json_string(use_diff=use_diff)) |
| 398 | |
| 399 | def update(self, config_dict: Dict): |
| 400 | """ |
no test coverage detected