def limited_epoch_train(file_path, max_epochs=1):
 train = load_train_file(file_path)
 train.algorithm.termination_criterion = EpochCounter(max_epochs=max_epochs)
 train.main_loop()

def limited_epoch_train ( file_path , max_epochs = 1 ) : train = load_train_file ( file_path ) train . algorithm . termination_criterion = EpochCounter ( max_epochs = max_epochs ) train . main_loop ( )
this method trains a given yaml file for a single epoch parameters file_path : str the path to the yaml file to be trained max_epochs : int the number of epochs to train this yaml file for .