<commit_before>#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Main code for evaluating NN's.
It can also be called via a parser by running this python module as follows:

Usage:
    eval_nn.py FOLDER LIST CONFIG MODEL
    eval_nn.py (-h | --help)

Arguments:
    FOLDER  Path to the folder where everything gets saved to, e.g. the summary.txt, the plots, the trained models, etc.
    LIST    A .toml file which contains the pathes of the training and validation files.
            An example can be found in config/lists/example_list.toml
    CONFIG  A .toml file which sets up the training.
            An example can be found in config/models/example_config.toml. The possible parameters are listed in
            utilities/input_output_utilities.py in the class Settings.
    MODEL   Path to a .toml file with infos about a model.

Options:
    -h --help                       Show this screen.

"""

import matplotlib as mpl
from docopt import docopt
mpl.use('Agg')
from utilities.nn_utilities import load_zero_center_data
from utilities.evaluation_utilities import *
from utilities.losses import get_all_loss_functions
from utilities.input_output_utilities import Settings


# TODO Remove unnecessary input parameters to the following functions if they are already in the cfg<commit_msg>Fix for import.<commit_after>#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Main code for evaluating NN's.
It can also be called via a parser by running this python module as follows:

Usage:
    eval_nn.py FOLDER LIST CONFIG MODEL
    eval_nn.py (-h | --help)

Arguments:
    FOLDER  Path to the folder where everything gets saved to, e.g. the summary.txt, the plots, the trained models, etc.
    LIST    A .toml file which contains the pathes of the training and validation files.
            An example can be found in config/lists/example_list.toml
    CONFIG  A .toml file which sets up the training.
            An example can be found in config/models/example_config.toml. The possible parameters are listed in
            utilities/input_output_utilities.py in the class Settings.
    MODEL   Path to a .toml file with infos about a model.

Options:
    -h --help                       Show this screen.

"""

import matplotlib as mpl
from docopt import docopt
mpl.use('Agg')
from orcanet.utilities.nn_utilities import load_zero_center_data
from orcanet.utilities.evaluation_utilities import *
from orcanet.utilities.losses import get_all_loss_functions
from orcanet.utilities.input_output_utilities import Settings


# TODO Remove unnecessary input parameters to the following functions if they are already in the cfg
{'fraction_non_alphanumeric': 0.05983231707317073, 'fraction_numerical': 0.0007621951219512195, 'mean_word_length': 3.206730769230769, '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': '1311105', 'n_tokens_mistral': 753, 'n_tokens_neox': 724, 'n_words': 317}