def _save_summary_of_run(self, run_summary, data_summary):
    '\n        Saves 2 files:\n            - run_summary.txt: A user-friendly resume of the monte carlo run.\n            - models_details.json: A full serialized version of the models.\n                Contains info that lacks in the txt file like the loss or optimizer.\n        '
    with open(str((self.monte_carlo_analyzer.path / 'run_summary.txt')), 'w') as file:
        file.write(run_summary)
        file.write((data_summary + '\n'))
        file.write('Models:\n')
        for model in self.models:
            model.summary(print_fn=(lambda x: file.write((x + '\n'))))
    json_dict = {}
    for (i, model) in enumerate(self.models):
        json_dict[str(i)] = {'name': model.name, 'loss': (model.loss if isinstance(model.loss, str) else model.loss.get_config()), 'optimizer': model.optimizer.get_config(), 'layers': [layer.get_config() for layer in model.layers]}
    with open((self.monte_carlo_analyzer.path / 'models_details.json'), 'w') as fp:
        json.dump(str(json_dict), fp)
Saves 2 files:
    - run_summary.txt: A user-friendly resume of the monte carlo run.
    - models_details.json: A full serialized version of the models.
        Contains info that lacks in the txt file like the loss or optimizer.
def _save_summary_of_run(self, run_summary, data_summary):
    '\n        Saves 2 files:\n            - run_summary.txt: A user-friendly resume of the monte carlo run.\n            - models_details.json: A full serialized version of the models.\n                Contains info that lacks in the txt file like the loss or optimizer.\n        '
    with open(str((self.monte_carlo_analyzer.path / 'run_summary.txt')), 'w') as file:
        file.write(run_summary)
        file.write((data_summary + '\n'))
        file.write('Models:\n')
        for model in self.models:
            model.summary(print_fn=(lambda x: file.write((x + '\n'))))
    json_dict = {}
    for (i, model) in enumerate(self.models):
        json_dict[str(i)] = {'name': model.name, 'loss': (model.loss if isinstance(model.loss, str) else model.loss.get_config()), 'optimizer': model.optimizer.get_config(), 'layers': [layer.get_config() for layer in model.layers]}
    with open((self.monte_carlo_analyzer.path / 'models_details.json'), 'w') as fp:
        json.dump(str(json_dict), fp)