<jupyter_start><jupyter_text>Load Data<jupyter_code>from Coach import Coach
from NLP.NLPGame import NLPGame as Game
from NLP.keras_2.NNet import NNetWrapper as nn
from utils import *
args = dotdict({
    'numIters': 100,
    'numEps': 100,
    'tempThreshold': 15,
    'updateThreshold': 0.6,
    'maxlenOfQueue': 200000,
    'numMCTSSims': 25,
    'arenaCompare': 10,
    'cpuct': 1,

    'checkpoint': './temp/',
    'load_model': True,
    #'load_folder_file': ('/dev/models/8x100x50','best.pth.tar'),
    'load_folder_file': ('./temp','checkpoint_343.pth.tar'),
    'numItersForTrainExamplesHistory': 20,

})

if __name__=="__main__":
    g = Game(100)#done
    nnet = nn(g)
    target_sonnets=99
    
    if args.load_model:
        nnet.load_checkpoint(args.load_folder_file[0], args.load_folder_file[1])

    c = Coach(g, nnet, args)
    if args.load_model:
        print("Load trainExamples from file")
        c.loadTrainExamples()
    c.learn(target_sonnets)<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.1432865731462926, 'fraction_numerical': 0.04008016032064128, 'mean_word_length': 3.6901408450704225, 'pattern_counts': {'":': 1, '<': 5, '<?xml version=': 0, '>': 5, '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}}
{'chain_length': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '486626', 'license': 'Apache-2.0', 'n_tokens_mistral': 416, 'n_tokens_neox': 377, 'n_words': 71, 'path': 'alpha-zero-general/Demo Notebook.ipynb', 'repo_name': 'rubenrtorrado/NLP', 'size': '998'}