<commit_before>package main;

import lstm.ABCIterator;
import lstm.LSTMTrainer;
import main.options.ExecutionParameters;
import org.junit.BeforeClass;
import org.junit.Test;
import tools.Misc;
import website.java.app.util.ResourceManager;

import java.io.IOException;

public class LSTMTest {
    @BeforeClass
    public static void initClass() {
        ExecutionParameters.verbose = false;
    }

    @Test
    public void lstmTest() throws IOException {
        LSTMTrainer trainer = new LSTMTrainer(Misc.getProjectPath() + "assets/abc/data.abc", 3657263);
        trainer.train();
        trainer.serialize(Misc.getProjectPath() + "serialized_lstm.bin");
    }

}
<commit_msg>tests: main: make LSTMTest use deserialized LSTM<commit_after>package main;

import lstm.ABCIterator;
import lstm.LSTMTrainer;
import main.options.ExecutionParameters;
import org.junit.BeforeClass;
import org.junit.Test;
import tools.Misc;
import website.java.app.util.ResourceManager;

import java.io.IOException;

public class LSTMTest {
    @BeforeClass
    public static void initClass() {
        ExecutionParameters.verbose = false;
    }

    @Test
    public void lstmTest() throws IOException {
        LSTMTrainer trainer = null;
        try {
            trainer = LSTMTrainer.deserialize(Misc.getProjectPath() + "lstm-epoch-98-lr0.04.bin");
            trainer.generateSample(1, 1);
        } catch (ClassNotFoundException e) {
            e.printStackTrace();
        }
    }

}

{'fraction_non_alphanumeric': 0.10054347826086957, 'fraction_numerical': 0.009510869565217392, 'mean_word_length': 3.3839285714285716, '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': '4790357', 'n_tokens_mistral': 461, 'n_tokens_neox': 460, 'n_words': 96}