[docs]defrun(self):# setup output dirifnotself.model_run_dir:self.model_run_dir=GenerateLosses._get_output_dir(self)self.kwargs['model_run_dir']=self.model_run_dir# Run chainifself.pre_loss_module:cmds=[(PreLoss,self.kwargs)]else:cmds=[]cmds+=[(GenerateLosses,self.kwargs)]ifself.post_analysis_module:cmds+=[(PostAnalysis,self.kwargs)]withtqdm(total=len(cmds))aspbar:forcmdincmds:cmd[0](**cmd[1]).run()pbar.update(1)self.logger.info(f'Losses generated in {self.model_run_dir}')