def run(self, data_loaders, workflow, max_epochs, **kwargs):
assert isinstance(data_loaders, list)<EOL>assert mmcv.is_list_of(workflow, tuple)<EOL>assert len(data_loaders) == len(workflow)<EOL>self._max_epochs = max_epochs<EOL>work_dir = self.work_dir if self.work_dir is not None else '<STR_LIT>'<EOL>self.logger.info('<STR_LIT>',<EOL>get_host_info(), work_dir)<EOL>self.logger.info('<STR_LIT>', workflow, max_epochs)<EOL>self.call_hook('<STR_LIT>')<EOL>while self.epoch < max_epochs:<EOL><INDENT>for i, flow in enumerate(workflow):<EOL><INDENT>mode, epochs = flow<EOL>if isinstance(mode, str):  <EOL><INDENT>if not hasattr(self, mode):<EOL><INDENT>raise ValueError(<EOL>'<STR_LIT>'.<EOL>format(mode))<EOL><DEDENT>epoch_runner = getattr(self, mode)<EOL><DEDENT>elif callable(mode):  <EOL><INDENT>epoch_runner = mode<EOL><DEDENT>else:<EOL><INDENT>raise TypeError('<STR_LIT>'<EOL>'<STR_LIT>'.format(<EOL>type(mode)))<EOL><DEDENT>for _ in range(epochs):<EOL><INDENT>if mode == '<STR_LIT:train>' and self.epoch >= max_epochs:<EOL><INDENT>return<EOL><DEDENT>epoch_runner(data_loaders[i], **kwargs)<EOL><DEDENT><DEDENT><DEDENT>time.sleep(<NUM_LIT:1>)  <EOL>self.call_hook('<STR_LIT>')<EOL>
Start running.

        Args:
            data_loaders (list[:obj:`DataLoader`]): Dataloaders for training
                and validation.
            workflow (list[tuple]): A list of (phase, epochs) to specify the
                running order and epochs. E.g, [('train', 2), ('val', 1)] means
                running 2 epochs for training and 1 epoch for validation,
                iteratively.
            max_epochs (int): Total training epochs.