Save the configuration instance's parameters to a JSON file. Args: json_file_path (`str` or `os.PathLike`): Path to the JSON file to save a configuration instance's parameters.
(self, json_file_path: Union[str, os.PathLike])
| 594 | return json.dumps(config_dict, indent=2, sort_keys=True) + "\n" |
| 595 | |
| 596 | def to_json_file(self, json_file_path: Union[str, os.PathLike]): |
| 597 | """ |
| 598 | Save the configuration instance's parameters to a JSON file. |
| 599 | |
| 600 | Args: |
| 601 | json_file_path (`str` or `os.PathLike`): |
| 602 | Path to the JSON file to save a configuration instance's parameters. |
| 603 | """ |
| 604 | with open(json_file_path, "w", encoding="utf-8") as writer: |
| 605 | writer.write(self.to_json_string()) |
| 606 | |
| 607 | |
| 608 | def register_to_config(init): |
no test coverage detected