def train(self, rdd, nb_epoch=10, batch_size=32,
              verbose=0, validation_split=0.1):
        rdd = rdd.repartition(self.num_workers)
        master_url = self.determine_master()

        if self.mode in ['asynchronous', 'synchronous', 'hogwild']:
            self._train(rdd, nb_epoch, batch_size, verbose, validation_split, master_url)
        else:
            print("""Choose from one of the modes: asynchronous, synchronous or hogwild""")
Subscribe to a Nvim event.
dataset/ETHPy150Open maxpumperla/elephas/elephas/spark_model.py/SparkModel.train--crossover with--dataset/ETHPy150Open neovim/python-client/neovim/api/nvim.py/Nvim.subscribe