<commit_before>import os
from AlphaGo.training.supervised_policy_trainer import supervised_policy_trainer
from AlphaGo.models.policy import CNNPolicy
import unittest

class TestSupervisedPolicyTrainer(unittest.TestCase):
    def testTrain(self):
        net = CNNPolicy.create_network(input_dim=46)
        trainer = supervised_policy_trainer(train_batch_size=3,nb_epoch=2)
        trainer.train(
            net,
            train_folder='tests/test_data/pickle/train',
            test_folder = 'tests/test_data/pickle/test',
            model_folder = 'tests/test_data',
            checkpt_prefix="test")
        #TODO: What's a good check that training has been conducted as expected?

        # Remove files created during testing
        [os.remove(os.path.join("tests/test_data",f)) for
            f in os.listdir("tests/test_data")
            if f.split('.')[0]=="test"]

if __name__=='__main__':
    unittest.main()<commit_msg>fixed E225 missing whitespace around operator<commit_after>import os
from AlphaGo.training.supervised_policy_trainer import supervised_policy_trainer
from AlphaGo.models.policy import CNNPolicy
import unittest

class TestSupervisedPolicyTrainer(unittest.TestCase):
    def testTrain(self):
        net = CNNPolicy.create_network(input_dim=46)
        trainer = supervised_policy_trainer(train_batch_size=3,nb_epoch=2)
        trainer.train(
            net,
            train_folder='tests/test_data/pickle/train',
            test_folder = 'tests/test_data/pickle/test',
            model_folder = 'tests/test_data',
            checkpt_prefix="test")
        #TODO: What's a good check that training has been conducted as expected?

        # Remove files created during testing
        [os.remove(os.path.join("tests/test_data",f)) for
            f in os.listdir("tests/test_data")
            if f.split('.')[0] == "test"]

if __name__ == '__main__':
    unittest.main()
{'fraction_non_alphanumeric': 0.09926854754440961, 'fraction_numerical': 0.006792058516196447, 'mean_word_length': 3.1630434782608696, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3616768', 'n_tokens_mistral': 574, 'n_tokens_neox': 562, 'n_words': 116}